OSDN Git Service

docs/defines.txt: add a note about possibly obsolete __LDBL_COMPAT
[uclinux-h8/uClibc.git] / docs / defines.txt
1 Feeble attempt to document the horde of #defines we deal with.
2 Editors, please make your descriptions short but informative.
3
4
5
6 __BEGIN_DECLS, __END_DECLS
7     Defined to either empty or 'extern "C" {' and '}' if included by C++.
8
9 __USE_GNU, __USE_BSD, __USE_XOPEN[2K], __USE_SVID, __USE_POSIX...
10     If defined, user program which included us requests compat additions
11     from relevant standard or Unix flavor. See features.h for full list.
12
13 __USE_FILE_OFFSET64
14 __USE_LARGEFILE[64]
15 _LARGEFILE[64]_SOURCE
16 _FILE_OFFSET_BITS
17     ???
18
19 __NTH(fct)
20 __THROW
21 __REDIRECT(name, proto, alias)
22 __REDIRECT_NTH(name, proto, alias)
23     ???
24
25 __BIG_ENDIAN    4321
26 __LITTLE_ENDIAN 1234
27     Should be always as shown. __PDP_ENDIAN is historic, ignore?
28 __BYTE_ORDER, __FLOAT_WORD_ORDER
29     Should be defined to __BIG_ENDIAN or __LITTLE_ENDIAN.
30     Usage: "#if __BYTE_ORDER == __LITTLE_ENDIAN ..."
31     __USE_BSD adds versions without leading "__" for above four defines.
32 _BIG_ENDIAN, __BIG_ENDIAN__
33 _LITTLE_ENDIAN, __LITTLE_ENDIAN__
34     Defined (to what?) by gcc for some architectures to indicate endianness.
35     Seems that the fact of defined-ness is an indicator, not the value.
36
37 __USE_EXTERN_INLINES
38     If defined, headers will supply some function as inlines.
39     uclibc itself is built with this option off and provides
40     out-of-line version of every inlined function in case user program
41     calls it instead of using an inline.
42 _EXTERN_INLINE
43     If not defined by user prior to #include, will be defined to
44     "extern inline" or equivalent. IOW, if user defines it prior
45     #include, it replaces "extern __inline" string in inline definitions
46     (those enabled by __USE_EXTERN_INLINES) with something else.
47     A few uclibc .c files use it to create non-inlined functions
48     by defining it to "".
49 __extern_inline
50     Defined to "extern inline", modulo gcc/C standard deviations.
51     Can't be used by user to play tricks as with _EXTERN_INLINE.
52 internal_function
53     Used to modify function's calling convention, if "standard" one
54     is suboptimal. Examples:
55         int func(params) internal_function;
56         int internal_function func(params) { body }
57
58 _LIBC
59     Defined only at libc build time. It is physically deleted
60 from the headers (using unifdef tool) in installed headers ("make install").
61
62 __UCLIBC_XXX
63     uclibc-internal and uclibc-specific defines. In particular:
64 __UCLIBC_HAS_XXX__, __UCLIBC_HAVE_XXX__
65     __UCLIBC_HAS_XXX__ are booleans (defined/undefined), defined in
66     uClibc_config.h and generated from uclibc .config file.
67     __UCLIBC_HAVE_XXX__ are booleans from bits/uClibc_arch_features.h
68     (there are more __UCLIBC_XXX defines there)
69
70 _IEEE_LIBM
71     Always defined at libm build time
72 __LDBL_COMPAT
73     Never defined, TODO: remove?