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