| 1 | /* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ | 
| 2 |  | 
| 3 | /* Copyright (C) 1993-2009 Free Software Foundation, Inc. | 
| 4 |  | 
| 5 |    This file is part of the GNU Readline Library (Readline), a library | 
| 6 |    for reading lines of text with interactive input and history editing.       | 
| 7 |  | 
| 8 |    Readline is free software: you can redistribute it and/or modify | 
| 9 |    it under the terms of the GNU General Public License as published by | 
| 10 |    the Free Software Foundation, either version 3 of the License, or | 
| 11 |    (at your option) any later version. | 
| 12 |  | 
| 13 |    Readline is distributed in the hope that it will be useful, | 
| 14 |    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 15 |    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
| 16 |    GNU General Public License for more details. | 
| 17 |  | 
| 18 |    You should have received a copy of the GNU General Public License | 
| 19 |    along with Readline.  If not, see <http://www.gnu.org/licenses/>. | 
| 20 | */ | 
| 21 |  | 
| 22 | #if !defined (_RL_STDC_H_) | 
| 23 | #define _RL_STDC_H_ | 
| 24 |  | 
| 25 | /* Adapted from BSD /usr/include/sys/cdefs.h. */ | 
| 26 |  | 
| 27 | /* A function can be defined using prototypes and compile on both ANSI C | 
| 28 |    and traditional C compilers with something like this: | 
| 29 | 	extern char *func PARAMS((char *, char *, int)); */ | 
| 30 |  | 
| 31 | #if !defined (PARAMS) | 
| 32 | #  if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) | 
| 33 | #    define PARAMS(protos) protos | 
| 34 | #  else | 
| 35 | #    define PARAMS(protos) () | 
| 36 | #  endif | 
| 37 | #endif | 
| 38 |  | 
| 39 | #if defined(__GNUC__) && __GNUC__ >= 2 | 
| 40 | #  define __rl_attribute__(x) __attribute__(x) | 
| 41 | #else | 
| 42 | #  define __rl_attribute__(x) | 
| 43 | #endif | 
| 44 |  | 
| 45 | /* Moved from config.h.in because readline.h:rl_message depends on these | 
| 46 |    defines. */ | 
| 47 | #if defined (__STDC__) && defined (HAVE_STDARG_H) | 
| 48 | #  define PREFER_STDARG | 
| 49 | #  define USE_VARARGS | 
| 50 | #else | 
| 51 | #  if defined (HAVE_VARARGS_H) | 
| 52 | #    define PREFER_VARARGS | 
| 53 | #    define USE_VARARGS | 
| 54 | #  endif | 
| 55 | #endif | 
| 56 |  | 
| 57 | #endif /* !_RL_STDC_H_ */ | 
| 58 |  |