features.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #ifndef __FEATURES_H
  2. #define __FEATURES_H
  3. /* Major and minor version number of the uClibc library package. Use
  4. these macros to test for features in specific releases. */
  5. #define __UCLIBC__ 0
  6. #define __UCLIBC_MAJOR__ 9
  7. #define __UCLIBC_MINOR__ 5
  8. /* There is an unwholesomely huge amount of code out there that depends on the
  9. * presence of GNU libc header files. We have GNU libc header files. So here
  10. * we commit a horrible sin. At this point, we _lie_ and claim to be GNU libc
  11. * to make things like /usr/include/linux/socket.h and lots of apps work as
  12. * their developers intended. This is IMHO, pardonable, since these defines
  13. * are not really intended to check for the presence of a particular library,
  14. * but rather are used to define an _interface_. */
  15. #define __GNU_LIBRARY__ 6
  16. #define __GLIBC__ 2
  17. #define __GLIBC_MINOR__ 1
  18. /* Make a half-hearted attempt to accomodate non-gcc compilers */
  19. #ifndef __GNUC__
  20. #define __attribute(foo) /* Ignore */
  21. #endif
  22. /* __restrict is known in EGCS 1.2 and above. */
  23. #if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 92)
  24. # define __restrict /* Ignore */
  25. #endif
  26. #ifdef __STDC__
  27. #define __P(x) x
  28. #define __PMT(x) x
  29. #ifndef __const
  30. #define __const const
  31. #endif
  32. /* Almost ansi */
  33. #if __STDC__ != 1
  34. #ifndef const
  35. #define const
  36. #endif
  37. #define volatile
  38. #endif
  39. #else /* K&R */
  40. #define __P(x) ()
  41. #ifndef __const
  42. #define __const
  43. #endif
  44. #ifndef const
  45. #define const
  46. #endif
  47. #define volatile
  48. #endif
  49. /* No C++ */
  50. #define __BEGIN_DECLS
  51. #define __END_DECLS
  52. /* GNUish things */
  53. #define __CONSTVALUE
  54. #define __CONSTVALUE2
  55. #define __USE_BSD
  56. #define __USE_MISC
  57. #define __USE_POSIX
  58. #define __USE_POSIX2
  59. #define __USE_XOPEN
  60. #undef __KERNEL_STRICT_NAMES
  61. #ifndef _LOOSE_KERNEL_NAMES
  62. # define __KERNEL_STRICT_NAMES
  63. #endif
  64. #include <sys/cdefs.h>
  65. #endif