>From 4bda12380a3cfa55f4a561e838ff9f8f0c35b4aa Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 23 Sep 2019 12:41:22 -0700 Subject: [PATCH] Update URLs and associated text (Thanks to Bruno Haible for proofreading the earlier patch.) --- ChangeLog | 9 +++++++++ build-aux/pmccabe2html | 2 +- doc/gendocs_template_min | 4 ++-- lib/creat.c | 5 +++-- lib/fflush.c | 13 ++++++------- lib/fopen.c | 6 +++--- lib/open.c | 6 +++--- lib/openat.c | 5 +++-- tests/test-fflush2.c | 2 +- 9 files changed, 31 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 903757318..17fbaf4e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2019-09-23 Paul Eggert + + Update URLs and associated text + (Thanks to Bruno Haible for proofreading this patch.) + Prefer https: to http: in URLs where either will do, for the usual + security reasons. I also updated broken and/or moved URLs + discovered during the process. In a few places I had to resort to + archive.org, since I didn't find the originals elsewhere. + 2019-09-15 Paul Smith Bruno Haible diff --git a/build-aux/pmccabe2html b/build-aux/pmccabe2html index a8928e0ff..7dcfb0bc1 100644 --- a/build-aux/pmccabe2html +++ b/build-aux/pmccabe2html @@ -72,7 +72,7 @@ BEGIN { html_epilog = "
\ Copyright (c) 2007, 2008 Free Software Foundation, Inc." html_doctype = "" +\"http://www.w3.org/TR/html401/loose.dtd\">" html_comment = "" html_title = "Cyclomatic Complexity report for " package_name diff --git a/doc/gendocs_template_min b/doc/gendocs_template_min index 428ac2b55..e90cf04a3 100644 --- a/doc/gendocs_template_min +++ b/doc/gendocs_template_min @@ -1,7 +1,7 @@ - + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + %%TITLE%% - GNU Project - Free Software Foundation diff --git a/lib/creat.c b/lib/creat.c index 89132e2bb..e63b21957 100644 --- a/lib/creat.c +++ b/lib/creat.c @@ -44,8 +44,9 @@ int creat (const char *filename, mode_t mode) { #if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash, then fail. - Rationale: POSIX + /* Fail if the filename ends in a slash, + as POSIX says such a filename must name a directory + . creat() is defined as being equivalent to open() with flags O_CREAT | O_TRUNC | O_WRONLY. Therefore: If the named file already exists as a directory, then creat() must fail diff --git a/lib/fflush.c b/lib/fflush.c index e61fd2154..63862be19 100644 --- a/lib/fflush.c +++ b/lib/fflush.c @@ -168,13 +168,12 @@ rpl_fflush (FILE *stream) "The file-position indicator is decremented by each successful call to ungetc()..." - 2) says: - "The value of the file-position indicator for the stream - after all pushed-back bytes have been read, or discarded - by calling fseek(), fseeko(), fsetpos(), or rewind() (but - not fflush()), shall be the same as it was before the - bytes were pushed back." - Here we are discarding all pushed-back bytes. */ + 2) fflush discards bytes pushed back by ungetc: + + "...any characters pushed back onto the stream by ungetc() + or ungetwc() that have not subsequently been read from the + stream shall be discarded (without further changing the + file offset)." */ /* POSIX does not specify fflush behavior for non-seekable input streams. Some implementations purge unread data, some return diff --git a/lib/fopen.c b/lib/fopen.c index f08c06dd9..07e389179 100644 --- a/lib/fopen.c +++ b/lib/fopen.c @@ -53,9 +53,9 @@ rpl_fopen (const char *filename, const char *mode) #endif #if FOPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and a mode that requires write access is - specified, then fail. - Rationale: POSIX + /* Fail if the mode requires write access and the filename ends in a slash, + as POSIX says such a filename must name a directory + . If the named file already exists as a directory, then if a mode that requires write access is specified, fopen() must fail because POSIX diff --git a/lib/open.c b/lib/open.c index 4572ebf6c..0623d381a 100644 --- a/lib/open.c +++ b/lib/open.c @@ -92,9 +92,9 @@ open (const char *filename, int flags, ...) #endif #if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR - is specified, then fail. - Rationale: POSIX + /* Fail if one of O_CREAT, O_WRONLY, O_RDWR is specified and the filename + ends in a slash, as POSIX says such a filename must name a directory + . If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, diff --git a/lib/openat.c b/lib/openat.c index 6deadfdb5..25ffd770e 100644 --- a/lib/openat.c +++ b/lib/openat.c @@ -82,8 +82,9 @@ rpl_openat (int dfd, char const *filename, int flags, ...) } # if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR - is specified, then fail. + /* Fail if one of O_CREAT, O_WRONLY, O_RDWR is specified and the filename + ends in a slash, as POSIX says such a filename must name a directory + . If the named file already exists as a directory, then - if O_CREAT is specified, open() must fail because of the semantics of O_CREAT, diff --git a/tests/test-fflush2.c b/tests/test-fflush2.c index da60eff6a..e7bfa654d 100644 --- a/tests/test-fflush2.c +++ b/tests/test-fflush2.c @@ -69,7 +69,7 @@ main (int argc, char **argv) according to the Austin Group's resolution on 2009-01-08. */ /* Check that fflush after a non-backup ungetc() call discards the ungetc buffer. This is mandated by POSIX - */ + */ c = fgetc (stdin); ASSERT (c == '#'); -- 2.21.0