This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] errno.texi: Clarify some GNU extensions


2001-10-24  Ben Collins  <bcollins@debian.org>

	* manual/errno.texi: Clarify that program_invocation_name and
	program_invocation_short_name require _GNU_SOURCE. Also fix
	example usage to reflect this.

-- 
 .----------=======-=-======-=========-----------=====------------=-=-----.
/                   Ben Collins    --    Debian GNU/Linux                  \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'
--- manual/errno.texi  Sat Jun  2 05:02:00 2001
+++ manual/errno.texi  Sat Jun  2 05:01:38 2001
@@ -1331,7 +1331,8 @@
 value of @code{argv[0]} in @code{main}, and then strip off the directory
 names yourself.  We added these extensions to make it possible to write
 self-contained error-reporting subroutines that require no explicit
-cooperation from @code{main}.
+cooperation from @code{main}. To use these variables with GNU libraries,
+you must define the feature test macro @code{_GNU_SOURCE};  @xref{Feature Test Macros}.

 Here is an example showing how to handle failure to open a file
 correctly.  The function @code{open_sesame} tries to open the named file
@@ -1345,6 +1346,7 @@
 functions might overwrite @code{errno} in the meantime.

 @smallexample
+#define _GNU_SOURCE
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]