defines.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. Feeble attempt to document the horde of #defines we deal with.
  2. Editors, please 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. If not defined by user prior to #include, will be defined to
  36. "extern inline" or equivalent. IOW, if user defines it prior
  37. #include, it replaces "extern __inline" string in inline definitions
  38. (those enabled by __USE_EXTERN_INLINES) with something else.
  39. A few uclibc .c files use it to create non-inlined functions
  40. by defining it to "".
  41. __extern_inline
  42. Defined to "extern inline", modulo gcc/C standard deviations.
  43. Can't be used by user to play tricks as with _EXTERN_INLINE.
  44. internal_function
  45. Used to modify function's calling convention, if "standard" one
  46. is suboptimal. Examples:
  47. int func(params) internal_function;
  48. int internal_function func(params) { body }
  49. _LIBC
  50. Defined only at libc build time. It is physically deleted
  51. from the headers (using unifdef tool) in installed headers ("make install").
  52. __UCLIBC_XXX
  53. uclibc-internal and uclibc-specific defines. In particular:
  54. __UCLIBC_HAS_XXX__, __UCLIBC_HAVE_XXX__
  55. __UCLIBC_HAS_XXX__ are booleans (defined/undefined), defined in
  56. uClibc_config.h and generated from uclibc .config file.
  57. __UCLIBC_HAVE_XXX__ are booleans from bits/uClibc_arch_features.h
  58. (there are more __UCLIBC_XXX defines there)
  59. _IEEE_LIBM
  60. Always defined at libm build time