1 /* Copyright (C) 1989 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
18 /* ANSI and traditional C compatibility macros
20 ANSI C is assumed if __STDC__ is #defined.
23 PTR - Generic pointer type
24 LONG_DOUBLE - `long double' type
25 CONST - `const' keyword
26 VOLATILE - `volatile' keyword
27 SIGNED - `signed' keyword
28 PTRCONST - Generic const pointer (void *const)
30 EXFUN(name, prototype) - declare external function NAME
31 with prototype PROTOTYPE
32 DEFUN(name, arglist, args) - define function NAME with
33 args ARGLIST of types in ARGS
34 DEFUN_VOID(name) - define function NAME with no args
35 AND - argument separator for ARGS
40 extern int EXFUN(printf, (CONST char *format DOTS));
41 int DEFUN(fprintf, (stream, format),
42 FILE *stream AND CONST char *format DOTS) { ... }
43 void DEFUN_VOID(abort) { ... }
51 /* Every source file includes this file,
52 so they will all get the switch for lint. */
59 #define PTRCONST void *CONST
60 #define LONG_DOUBLE long double
65 #define VOLATILE volatile
69 #define EXFUN(name, proto) name proto
70 #define DEFUN(name, arglist, args) name(args)
71 #define DEFUN_VOID(name) name(NOARGS)
73 #else /* Not ANSI C. */
77 #define LONG_DOUBLE double
86 #define EXFUN(name, proto) name()
87 #define DEFUN(name, arglist, args) name arglist args;
88 #define DEFUN_VOID(name) name()
93 #endif /* ansidecl.h */
This page took 0.030615 seconds and 4 git commands to generate.