aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorRical Jasan <ricaljasan@pacific.net>2015-03-06 00:59:49 -0500
committerMike Frysinger <vapier@gentoo.org>2015-03-06 00:59:49 -0500
commit7e7af3496ee4b13366726546dd8b712a698fa5c4 (patch)
treeaed8bc5f9a31d2246c079b00e461310090d38d20 /ChangeLog
parent4ca8ddfb05ea7d888347bb96cfa431e0eb7fcd9a (diff)
downloadglibc-7e7af3496ee4b13366726546dd8b712a698fa5c4.zip
glibc-7e7af3496ee4b13366726546dd8b712a698fa5c4.tar.gz
glibc-7e7af3496ee4b13366726546dd8b712a698fa5c4.tar.bz2
manual: complete example in error message documentation
The manual gives "an example showing how to handle failure to open a file correctly." The example function, open_sesame, uses the newly-introduced strerror function and errno and program_invocation_short_name variables. It fails to specify GNU extensions, however, so attempts to use it in the following way: int main (void) {open_sesame ("badname");} fail during compilation with "error: ‘program_invocation_short_name’ undeclared", indicating the example is incomplete. The presence of "#include"s suggest everything neccesary for the function to work should be present. For completeness, the example is lacking the following line: #define _GNU_SOURCE as the declarations of program_invocation_*name in errno.h are wrapped in an "#ifdef __USE_GNU" conditional. The documentation of the variables is also expanded, adding that their definition lies in errno.h and noting specifically they are GNU extensions.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog8
1 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cda9af2..c7873da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-03-06 Rical Jasan <ricaljasan@pacific.net>
+
+ * manual/errno.texi (Error Messages): Complete example function
+ by adding missing #define.
+ (program_invocation_name): Add statement indicating GNU
+ extension and reference which header file declares the variable.
+ (program_invocation_short_name): Likewise.
+
2015-03-06 Mike Frysinger <vapier@gentoo.org>
* manual/errno.texi (Error Messages): Delete strerror ISO C89