[prev in list] [next in list] [prev in thread] [next in thread]
List: glibc-alpha
Subject: [patch] errno.texi: Clarify some GNU extensions
From: Ben Collins <bcollins () debian ! org>
Date: 2001-10-24 15:57:13
[Download RAW message or body]
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 '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
["errno.texi.diff" (text/plain)]
--- 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>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic