]>
Commit | Line | Data |
---|---|---|
726f6388 JA |
1 | /* stdc.h -- macros to make source compile on both ANSI C and K&R C |
2 | compilers. */ | |
3 | ||
4 | /* Copyright (C) 1993 Free Software Foundation, Inc. | |
5 | ||
6 | This file is part of GNU Bash, the Bourne Again SHell. | |
7 | ||
8 | Bash is free software; you can redistribute it and/or modify it | |
9 | under the terms of the GNU General Public License as published by | |
bb70624e | 10 | the Free Software Foundation; either version 2, or (at your option) |
726f6388 JA |
11 | any later version. |
12 | ||
13 | Bash is distributed in the hope that it will be useful, but WITHOUT | |
14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
15 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
16 | License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
19 | along with Bash; see the file COPYING. If not, write to the Free | |
bb70624e | 20 | Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ |
726f6388 | 21 | |
ccc6cda3 JA |
22 | #if !defined (_STDC_H_) |
23 | #define _STDC_H_ | |
726f6388 JA |
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 __P((char *, char *, int)); */ | |
ccc6cda3 | 30 | |
bb70624e JA |
31 | #if !defined (__P) |
32 | # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) | |
726f6388 | 33 | # define __P(protos) protos |
bb70624e JA |
34 | # else |
35 | # define __P(protos) () | |
726f6388 | 36 | # endif |
bb70624e JA |
37 | #endif |
38 | ||
39 | #if defined (__STDC__) | |
40 | ||
726f6388 JA |
41 | # define __STRING(x) #x |
42 | ||
43 | # if !defined (__GNUC__) | |
44 | # define inline | |
45 | # endif | |
46 | ||
47 | #else /* !__STDC__ */ | |
48 | ||
726f6388 JA |
49 | # define __STRING(x) "x" |
50 | ||
51 | #if defined (__GNUC__) /* gcc with -traditional */ | |
52 | # if !defined (const) | |
53 | # define const __const | |
54 | # endif | |
55 | # if !defined (inline) | |
56 | # define inline __inline | |
57 | # endif | |
58 | # if !defined (signed) | |
59 | # define signed __signed | |
60 | # endif | |
61 | # if !defined (volatile) | |
62 | # define volatile __volatile | |
63 | # endif | |
64 | #else /* !__GNUC__ */ | |
65 | # if !defined (const) | |
66 | # define const | |
67 | # endif | |
68 | # if !defined (inline) | |
69 | # define inline | |
70 | # endif | |
71 | # if !defined (signed) | |
72 | # define signed | |
73 | # endif | |
74 | # if !defined (volatile) | |
75 | # define volatile | |
76 | # endif | |
77 | #endif /* !__GNUC__ */ | |
78 | ||
79 | #endif /* !__STDC__ */ | |
80 | ||
ccc6cda3 | 81 | #endif /* !_STDC_H_ */ |