diff options
author | Jim Meyering <meyering@redhat.com> | 2012-09-23 11:33:01 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-10-04 21:33:06 +0200 |
commit | c6369e9004be56d427f0cc0d51d7009d727e061c (patch) | |
tree | 5ca3d017a780f9347299a444bc4653caa9326128 /.vg-suppressions | |
parent | cf67e4cc9025ce921230b821cb7e75bce06876cd (diff) | |
download | coreutils-c6369e9004be56d427f0cc0d51d7009d727e061c.tar.xz |
maint: make-prime-list: do not ignore write failure
Even though this is just a helper program that is run solely to create
primes.h, it should not ignore a write failure. Normally we would
simply call atexit (close_stdout), but we cannot do that from this
helper program, since it must be built before the generated header,
primes.h. If we were to make the linking of make-prime-list depend
on libcoreutils.a, that would add all lib/*.o files to the list
of dependents of $(BUILT_HEADERS). Then, since there is currently no
provision to ensure that a file like lib/stdio.h (another built header)
is built before the first lib/*.o file that also includes <stdio.h>,
some lib/*.o files would be built before lib/stdio.h and some after.
The former would provoke link failures due to undefined rpl_* functions.
* src/make-prime-list.c: Include <errno.h>.
(fclose): Undef, so that a definition to rpl_fclose does not
cause a link failure.
(main): Per the above, in this exceptional case, we check for fclose
and ferror failure manually, and don't worry about the ferror-only
failure case in which errno may not be relevant.
Diffstat (limited to '.vg-suppressions')
0 files changed, 0 insertions, 0 deletions