]>
Commit | Line | Data |
---|---|---|
6599da04 JM |
1 | #include <ansidecl.h> |
2 | ||
3 | #ifdef __STDC__ | |
4 | #include <stddef.h> | |
5 | #define clock_t unsigned long | |
6 | #define DEF(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (ARGS); | |
7 | #define DEFFUNC(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (ARGS); | |
8 | #else | |
9 | #define void int | |
10 | #define size_t unsigned long | |
11 | #define clock_t unsigned long | |
12 | #define DEF(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (); | |
13 | #define DEFFUNC(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (); | |
14 | #endif | |
15 | ||
16 | #define DEFVAR(NAME,DECL,USE) extern DECL; | |
17 | ||
18 | #define NOTHING /*nothing*/ | |
19 | ||
20 | #include "alloca-conf.h" | |
21 | #include "functions.def" | |
22 | ||
23 | /* Always use our: getopt.o getopt1.o obstack.o spaces.o */ | |
24 | ||
25 | int | |
26 | main (argc, argv) | |
27 | int argc; char **argv; | |
28 | { | |
29 | ||
30 | /* Create a dummy function call for each DEF-defined function. */ | |
31 | ||
32 | #undef DEF | |
33 | #undef DEFVAR | |
34 | #undef DEFFUNC | |
35 | #undef AND | |
36 | #define AND = 0; | |
37 | /* ARGS expands into a set of declaration. NAME ARG_LIST expands | |
38 | info a function call that uses those variables as actual parameters. | |
39 | If the function has been DEF'ed correctly, we can pass the right | |
40 | number and types of parameters, which is nice. (E.g. gcc may | |
41 | otherwise complain about the wrong number of parameters to certain | |
42 | builtins.) */ | |
43 | #define DEF(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; } | |
44 | #define DEFVAR(NAME, DECL, USE) { USE; } | |
45 | #define DEFFUNC(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; } | |
46 | #include "functions.def" | |
47 | ||
48 | return (0); | |
49 | } |