Commit | Line | Data |
---|---|---|
cc88a640 | 1 | /* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ |
c862e87b | 2 | |
cc88a640 | 3 | /* Copyright (C) 1993-2009 Free Software Foundation, Inc. |
c862e87b | 4 | |
cc88a640 JK |
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. | |
c862e87b | 7 | |
cc88a640 JK |
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. | |
c862e87b | 12 | |
cc88a640 JK |
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. | |
c862e87b JM |
17 | |
18 | You should have received a copy of the GNU General Public License | |
cc88a640 JK |
19 | along with Readline. If not, see <http://www.gnu.org/licenses/>. |
20 | */ | |
c862e87b JM |
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: | |
9255ee31 | 29 | extern char *func PARAMS((char *, char *, int)); */ |
c862e87b | 30 | |
9255ee31 | 31 | #if !defined (PARAMS) |
1b17e766 | 32 | # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) |
9255ee31 | 33 | # define PARAMS(protos) protos |
1b17e766 | 34 | # else |
9255ee31 EZ |
35 | # define PARAMS(protos) () |
36 | # endif | |
37 | #endif | |
38 | ||
39 | #ifndef __attribute__ | |
5bdf8622 | 40 | # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) |
9255ee31 | 41 | # define __attribute__(x) |
c862e87b | 42 | # endif |
1b17e766 | 43 | #endif |
c862e87b JM |
44 | |
45 | #endif /* !_RL_STDC_H_ */ |