defines.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. Feeble attempt to document the horde of #defines we deal with.
  2. Editors, plese make your descriptions short but informative.
  3. __BEGIN_DECLS, __END_DECLS
  4. Defined to either empty or 'extern "C" {' and '}' if included by C++.
  5. __USE_GNU, __USE_BSD, __USE_XOPEN[2K], __USE_SVID, __USE_POSIX...
  6. If defined, user program which included us requests compat additions
  7. from relevant standard or Unix flavor. See features.h for full list.
  8. __USE_FILE_OFFSET64
  9. __USE_LARGEFILE[64]
  10. _LARGEFILE[64]_SOURCE
  11. _FILE_OFFSET_BITS
  12. ???
  13. __NTH(fct)
  14. __THROW
  15. __REDIRECT(name, proto, alias)
  16. __REDIRECT_NTH(name, proto, alias)
  17. ???
  18. __BIG_ENDIAN 4321
  19. __LITTLE_ENDIAN 1234
  20. Should be always as shown. __PDP_ENDIAN is historic, ignore?
  21. __BYTE_ORDER, __FLOAT_WORD_ORDER
  22. Should be defined to __BIG_ENDIAN or __LITTLE_ENDIAN.
  23. Usage: "#if __BYTE_ORDER == __LITTLE_ENDIAN ..."
  24. __USE_BSD adds versions without leading "__" for above four defines.
  25. _BIG_ENDIAN, __BIG_ENDIAN__
  26. _LITTLE_ENDIAN, __LITTLE_ENDIAN__
  27. Defined (to what?) by gcc for some architectures to indicate endianness.
  28. Seems that the fact of defined-ness is an indicator, not the value.
  29. __USE_EXTERN_INLINES
  30. If defined, headers will supply some function as inlines.
  31. uclibc itself is built with this option off and provides
  32. out-of-line version of every inlined function in case user program
  33. calls it instead of using an inline.
  34. _EXTERN_INLINE
  35. Define it to replace "extern __inline" string in inline definitions
  36. (those enabled by __USE_EXTERN_INLINES) with something else.
  37. A few uclibc .c files use it to create non-inlined functions
  38. by defining it to "".
  39. _LIBC
  40. UCLIBC_INTERNAL
  41. Defined only at libc build time. _LIBC is probably from glibc,
  42. and UCLIBC_INTERNAL is added by vda (he didn't know about _LIBC).
  43. Both defines are physically deleted from headers (using unifdef tool)
  44. in installed headers ("make install").
  45. __UCLIBC_XXX
  46. uclibc-internal and uclibc-specific defines. In particular:
  47. __UCLIBC_HAS_XXX__, __UCLIBC_HAVE_XXX__
  48. __UCLIBC_HAS_XXX__ are booleans (defined/undefined), defined in
  49. uClibc_config.h and generated from uclibc .config file.
  50. __UCLIBC_HAVE_XXX__ are booleans from bits/uClibc_arch_features.h
  51. (there are more __UCLIBC_XXX defines there)