summary refs log tree commit diff
path: root/NOTES
diff options
context:
space:
mode:
Diffstat (limited to 'NOTES')
-rw-r--r--NOTES36
1 files changed, 32 insertions, 4 deletions
diff --git a/NOTES b/NOTES
index 2af653c5f9..4477110d97 100644
--- a/NOTES
+++ b/NOTES
@@ -53,12 +53,26 @@ self-contained way.
 
  - Macro: _SVID_SOURCE
      If you define this macro, functionality derived from SVID is
-     included as well as the ANSI C, POSIX.1, and POSIX.2 material.
+     included as well as the ANSI C, POSIX.1, POSIX.2, and X/Open
+     material.
+
+ - Macro: _XOPEN_SOURCE
+     If you define these macro, functionality described in the X/Open
+     Portability Guide is included.  This is an superset of the POSIX.1
+     and POSIX.2 functionality and in fact `_POSIX_SOURCE' and
+     `_POSIX_C_SOURCE' get automatically be defined.
+
+     But as the great unifaction of all Unices there is also
+     functionality only available in BSD and SVID is included.
+
+     If the macro `_XOPEN_SOURCE_EXTENDED' is also defined, even more
+     functionality is available.  The extra functions will make all
+     functions available which are necessary for the X/Open Unix brand.
 
  - Macro: _GNU_SOURCE
      If you define this macro, everything is included: ANSI C, POSIX.1,
-     POSIX.2, BSD, SVID, and GNU extensions.  In the cases where POSIX.1
-     conflicts with BSD, the POSIX definitions take precedence.
+     POSIX.2, BSD, SVID, X/Open, and GNU extensions.  In the cases where
+     POSIX.1 conflicts with BSD, the POSIX definitions take precedence.
 
      If you want to get the full effect of `_GNU_SOURCE' but make the
      BSD definitions take precedence over the POSIX definitions, use
@@ -73,9 +87,23 @@ self-contained way.
      compiler or linker.  *Note:* If you forget to do this, you may get
      very strange errors at run time.
 
+ - Macro: _REENTRANT,_THREAD_SAFE
+     If you define one this macro, reentrant versions of several
+     functions get declared.  Some of the functions are specified in
+     POSIX.1c but many others are only available on a few other systems
+     or are unique to GNU libc.  The problem is that the
+     standardization of the thread safe C library interface still is
+     behind.
+
+     Unlike on some other systems no special version of the C library
+     must be used for linking.  There is only one version but while
+     compiling this it must have been specified to compile as thread
+     safe.
+
    We recommend you use `_GNU_SOURCE' in new programs.  If you don't
 specify the `-ansi' option to GCC and don't define any of these macros
-explicitly, the effect is the same as defining `_GNU_SOURCE'.
+explicitly, the effect is the same as defining `_POSIX_C_SOURCE' to 2
+and `_POSIX_SOURCE', `_SVID_SOURCE', and `_BSD_SOURCE' to 1.
 
    When you define a feature test macro to request a larger class of
 features, it is harmless to define in addition a feature test macro for