]> Savannah Git Hosting - gnulib.git/commitdiff
maint: clarify comments about sticky EOF
authorPádraig Brady <P@draigBrady.com>
Sun, 24 Jun 2018 22:15:16 +0000 (15:15 -0700)
committerPádraig Brady <P@draigBrady.com>
Sun, 24 Jun 2018 23:00:24 +0000 (16:00 -0700)
* lib/af_alg.c: Be more direct that we can't
assume stickiness of EOF for portability reasons.
* lib/md5.c: Clarify that this isn't just a glibc issue.
* lib/sha1.c: Likewise.
* lib/sha256.c: Likewise.
* lib/sha512.c: Likewise.

ChangeLog
lib/af_alg.c
lib/md5.c
lib/sha1.c
lib/sha256.c
lib/sha512.c

index 0b2f6a9228b50cfef6bb467795fd8e204986a493..2c1d3310b7fb2e70722fd2b5d3733cf6cd975b84 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2018-06-24  Pádraig Brady  <P@draigBrady.com>
+
+       maint: clarify comments about sticky EOF
+       * lib/af_alg.c: Be more direct that we can't
+       assume stickiness of EOF for portability reasons.
+       * lib/md5.c: Clarify that this isn't just a glibc issue.
+       * lib/sha1.c: Likewise.
+       * lib/sha256.c: Likewise.
+       * lib/sha512.c: Likewise.
+
 2018-06-24  Bruno Haible  <bruno@clisp.org>
 
        af_alg: Comment and style improvements.
index 33d883736b449291aac3a8582b295fc1edfd2dcf..555eb2be6bab5e381eb8b11de7975428929b8265 100644 (file)
@@ -146,7 +146,7 @@ afalg_stream (FILE *stream, const char *alg,
               break;
             }
 
-          /* Assume EOF is not sticky. See:
+          /* Don't assume that EOF is sticky. See:
              <https://sourceware.org/bugzilla/show_bug.cgi?id=19476>.  */
           if (feof (stream))
             {
index ea69a59d8eea590d54df7a9a0cec117bc88d99a7..2b55cc63ada712eae76f66d003f68c838c25cc46 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -172,7 +172,9 @@ md5_stream (FILE *stream, void *resblock)
         {
           /* Either process a partial fread() from this loop,
              or the fread() in afalg_stream may have gotten EOF.
-             We need to avoid a subsequent fread() due to glibc BZ 1190.  */
+             We need to avoid a subsequent fread() as EOF may
+             not be sticky.  For details of such systems, see:
+             https://sourceware.org/bugzilla/show_bug.cgi?id=1190  */
           if (feof (stream))
             goto process_partial_block;
 
index 1295d051cf1277a07176609a96eee6fa33e7e141..10676d049dd2037b9b5314cc41cb6b87918660ea 100644 (file)
@@ -160,7 +160,9 @@ sha1_stream (FILE *stream, void *resblock)
         {
           /* Either process a partial fread() from this loop,
              or the fread() in afalg_stream may have gotten EOF.
-             We need to avoid a subsequent fread() due to glibc BZ 1190.  */
+             We need to avoid a subsequent fread() as EOF may
+             not be sticky.  For details of such systems, see:
+             https://sourceware.org/bugzilla/show_bug.cgi?id=1190  */
           if (feof (stream))
             goto process_partial_block;
 
index bdea1bda60b46cd3a51022e5d68c142b9111e1cf..c518517077ca869334c00aa5f2c1f3783ec776d8 100644 (file)
@@ -210,7 +210,9 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
         {
           /* Either process a partial fread() from this loop,
              or the fread() in afalg_stream may have gotten EOF.
-             We need to avoid a subsequent fread() due to glibc BZ 1190.  */
+             We need to avoid a subsequent fread() as EOF may
+             not be sticky.  For details of such systems, see:
+             https://sourceware.org/bugzilla/show_bug.cgi?id=1190  */
           if (feof (stream))
             goto process_partial_block;
 
index 863d6ba7ac6d75a3a4032a91654e92e124d29972..e854951eb3131db4a504e445e1558151b1be0dfb 100644 (file)
@@ -211,7 +211,9 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
         {
           /* Either process a partial fread() from this loop,
              or the fread() in afalg_stream may have gotten EOF.
-             We need to avoid a subsequent fread() due to glibc BZ 1190.  */
+             We need to avoid a subsequent fread() as EOF may
+             not be sticky.  For details of such systems, see:
+             https://sourceware.org/bugzilla/show_bug.cgi?id=1190  */
           if (feof (stream))
             goto process_partial_block;