home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / libg++-2.6-fsf.lha / libg++-2.6 / libiberty / dummy.c < prev    next >
C/C++ Source or Header  |  1994-01-28  |  1KB  |  49 lines

  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 "functions.def"
  21.  
  22. /* Always use our: getopt.o getopt1.o obstack.o spaces.o */
  23.  
  24. int
  25. main (argc, argv)
  26.      int argc; char **argv;
  27. {
  28.  
  29. /* Create a dummy function call for each DEF-defined function. */
  30.  
  31. #undef DEF
  32. #undef DEFVAR
  33. #undef DEFFUNC
  34. #undef AND
  35. #define AND = 0;
  36. /* ARGS expands into a set of declaration.  NAME ARG_LIST expands
  37.    info a function call that uses those variables as actual parameters.
  38.    If the function has been DEF'ed correctly, we can pass the right
  39.    number and types of parameters, which is nice.  (E.g. gcc may
  40.    otherwise complain about the wrong number of parameters to certain
  41.    builtins.) */
  42. #define DEF(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; }
  43. #define DEFVAR(NAME, DECL, USE) { USE; }
  44. #define DEFFUNC(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; }
  45. #include "functions.def"
  46.  
  47.   return (0);
  48. }
  49.