cdefs.h 792 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef __SYS_CDEFS_H
  2. #define __SYS_CDEFS_H
  3. #include <features.h>
  4. #if defined (__STDC__) && __STDC__
  5. #define __CONCAT(x,y) x ## y
  6. #define __STRING(x) #x
  7. /* This is not a typedef so `const __ptr_t' does the right thing. */
  8. #define __ptr_t void *
  9. #else
  10. #define __CONCAT(x,y) x/**/y
  11. #define __STRING(x) "x"
  12. #define __ptr_t char *
  13. #endif
  14. /* No C++ */
  15. #define __BEGIN_DECLS
  16. #define __END_DECLS
  17. /* GNUish things */
  18. #define __CONSTVALUE
  19. #define __CONSTVALUE2
  20. #ifdef __GNUC__
  21. /* GCC can always grok prototypes. For C++ programs we add throw()
  22. to help it optimize the function calls. But this works only with
  23. gcc 2.8.x and egcs. */
  24. #if defined __cplusplus && __GNUC_PREREQ (2,8)
  25. #define __THROW throw()
  26. #else
  27. #define __THROW
  28. #endif
  29. #else /* GCC */
  30. #define __THROW
  31. #endif
  32. #endif