[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: don't mix buffered and unbuffered io [m4--devo--1.0--patch-2]
From: |
Gary V. Vaughan |
Subject: |
FYI: don't mix buffered and unbuffered io [m4--devo--1.0--patch-2] |
Date: |
Wed, 4 May 2005 18:09:19 +0100 (BST) |
User-agent: |
mailnotify/0.6 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Applied to HEAD.
* looking for address@hidden/m4--devo--1.0--patch-1 to compare with
* comparing to address@hidden/m4--devo--1.0--patch-1
M ChangeLog
M m4/output.c
* modified files
Index: Changelog
from Robert Bihlmeyer <address@hidden> (tiny change)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
* m4/output.c (m4_insert_file): Do not mix buffered and
unbuffered I/O, as this breaks on the Hurd.
--- orig/m4/output.c
+++ mod/m4/output.c
@@ -1,5 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989, 90, 91, 92, 93, 94, 98 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 2002
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -574,13 +575,13 @@
return;
/* Insert output by big chunks. */
-
- while (length = read (fileno (file), buffer, COPY_BUFFER_SIZE),
+ errno = 0;
+ while (length = fread (buffer, 1, COPY_BUFFER_SIZE, file),
length != 0)
- if (length == (size_t) -1)
+ output_text (buffer, length);
+
+ if (errno)
M4ERROR ((EXIT_FAILURE, errno, _("reading inserted file")));
- else
- output_text (buffer, length);
}
/* Insert diversion number DIVNUM into the current output file. The
- --
Gary V. Vaughan ())_. address@hidden,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/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCeQG+FRMICSmD1gYRAmvBAJ9SFm0wFpcegZ0c+RtLA6eDBIoAMACfT4Vk
1/7DXoJZNw46ZHiPJvTNhNM=
=jGct
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: don't mix buffered and unbuffered io [m4--devo--1.0--patch-2],
Gary V. Vaughan <=