mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Check for write error on stdout.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
2000-08-19 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
|
||||
|
||||
* src/main.cc (main): Check for write error on stdout before returning.
|
||||
|
||||
* src/Makefile.in (LDFLAGS): New definition, to catch the value given at
|
||||
configure time.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Driver program for the Gen_Perf hash function generator
|
||||
Copyright (C) 1989-1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
|
||||
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
|
||||
|
||||
This file is part of GNU GPERF.
|
||||
@@ -67,6 +67,10 @@ main (int argc, char *argv[])
|
||||
/* Generates and prints the Gen_Perf hash table. */
|
||||
int status = generate_table ();
|
||||
|
||||
/* Check for write error on stdout. */
|
||||
if (fflush (stdout) || ferror (stdout))
|
||||
status = 1;
|
||||
|
||||
/* Don't use exit() here, it skips the destructors. */
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user