svn commit: trunk/uClibc/docs
vda at uclibc.org
vda at uclibc.org
Sat Dec 13 15:02:31 UTC 2008
Author: vda
Date: 2008-12-13 07:02:30 -0800 (Sat, 13 Dec 2008)
New Revision: 24406
Log:
doc snippets about defines we provide and/or use
Added:
trunk/uClibc/docs/defines.txt
Changeset:
Added: trunk/uClibc/docs/defines.txt
===================================================================
--- trunk/uClibc/docs/defines.txt (rev 0)
+++ trunk/uClibc/docs/defines.txt 2008-12-13 15:02:30 UTC (rev 24406)
@@ -0,0 +1,61 @@
+Feeble attempt to document the horde of #defines we deal with.
+Editors, plese make your descriptions short but informative.
+
+
+
+__BEGIN_DECLS, __END_DECLS
+ Defined to either empty or 'extern "C" {' and '}' if included by C++.
+
+__USE_GNU, __USE_BSD, __USE_XOPEN[2K], __USE_SVID, __USE_POSIX...
+ If defined, user program which included us requests compat additions
+ from relevant standard or Unix flavor. See features.h for full list.
+
+__USE_FILE_OFFSET64
+__USE_LARGEFILE[64]
+_LARGEFILE[64]_SOURCE
+_FILE_OFFSET_BITS
+ ???
+
+__NTH(fct)
+__THROW
+__REDIRECT(name, proto, alias)
+__REDIRECT_NTH(name, proto, alias)
+ ???
+
+__BIG_ENDIAN 4321
+__LITTLE_ENDIAN 1234
+ Should be always as shown. __PDP_ENDIAN is historic, ignore?
+__BYTE_ORDER, __FLOAT_WORD_ORDER
+ Should be defined to __BIG_ENDIAN or __LITTLE_ENDIAN.
+ Usage: "#if __BYTE_ORDER == __LITTLE_ENDIAN ..."
+ __USE_BSD adds versions without leading "__" for above four defines.
+_BIG_ENDIAN, __BIG_ENDIAN__
+_LITTLE_ENDIAN, __LITTLE_ENDIAN__
+ Defined (to what?) by gcc for some architectures to indicate endianness.
+ Seems that the fact of defined-ness is an indicator, not the value.
+
+__USE_EXTERN_INLINES
+ If defined, headers will supply some function as inlines.
+ uclibc itself is built with this option off and provides
+ out-of-line version of every inlined function in case user program
+ calls it instead of using an inline.
+_EXTERN_INLINE
+ Define it to replace "extern __inline" string in inline definitions
+ (those enabled by __USE_EXTERN_INLINES) with something else.
+ A few uclibc .c files use it to create non-inlined functions
+ by defining it to "".
+
+_LIBC
+UCLIBC_INTERNAL
+ Defined only at libc build time. _LIBC is probably from glibc,
+and UCLIBC_INTERNAL is added by vda (he didn't know about _LIBC).
+Both defines are physically deleted from headers (using unifdef tool)
+in installed headers ("make install").
+
+__UCLIBC_XXX
+ uclibc-internal and uclibc-specific defines. In particular:
+__UCLIBC_HAS_XXX__, __UCLIBC_HAVE_XXX__
+ __UCLIBC_HAS_XXX__ are booleans (defined/undefined), defined in
+ uClibc_config.h and generated from uclibc .config file.
+ __UCLIBC_HAVE_XXX__ are booleans from bits/uClibc_arch_features.h
+ (there are more __UCLIBC_XXX defines there)
More information about the uClibc-cvs
mailing list