-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Applied to HEAD.
* looking for [EMAIL PROTECTED]/m4--devo--1.0--patch-3 to compare with
* comparing to [EMAIL PROTECTED]/m4--devo--1.0--patch-3
M ChangeLog
M m4/output.c
* modified files
Index: Changelog
from Paul Eggert <[EMAIL PROTECTED]>
* m4/output.c (m4_insert_file): Don't assume errno has a valid
value simply because fread returns zero. This fixes a
portability bug reported by Marion Hakanson in
<http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
--- orig/m4/output.c
+++ mod/m4/output.c
@@ -1,5 +1,5 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 2002
+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 2002, 2004
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -575,13 +575,15 @@
return;
/* Insert output by big chunks. */
- errno = 0;
- while (length = fread (buffer, 1, COPY_BUFFER_SIZE, file),
- length != 0)
- output_text (buffer, length);
-
- if (errno)
- M4ERROR ((EXIT_FAILURE, errno, _("reading inserted file")));
+ for (;;)
+ {
+ length = fread (buffer, 1, COPY_BUFFER_SIZE, file);
+ if (ferror (file))
+ M4ERROR ((EXIT_FAILURE, errno, _("reading inserted file")));
+ if (length == 0)
+ break;
+ output_text (buffer, length);
+ }
}
/* Insert diversion number DIVNUM into the current output file. The
- --
Gary V. Vaughan ())_. [EMAIL PROTECTED],gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/[EMAIL PROTECTED]/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCeRdmFRMICSmD1gYRAuavAKCw/imgQpZ0jrafkzCCVlkdsIw4tQCbBo9e
JXn3h6pc/wqA0MeBXpvOMKE=
=A2PE
-----END PGP SIGNATURE-----
_______________________________________________
M4-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-patches