diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-01-06 17:22:37 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-01-06 17:23:17 -0800 |
commit | db6d5f7240c8a743aebb3def80b3e3fabf05f0c1 (patch) | |
tree | 78d7576cd2b38dfb51e7ee12d7a1e831a6af5a12 /src | |
parent | 86ece0ee216910bce0dbceb60b98190bf8f93702 (diff) | |
download | diffutils-db6d5f7240c8a743aebb3def80b3e3fabf05f0c1.tar.gz |
diff: use xstdopen, not stdopen
* bootstrap.conf (gnulib_modules):
* src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c (main):
Use xstdopen, not stdopen.
Diffstat (limited to 'src')
-rw-r--r-- | src/cmp.c | 6 | ||||
-rw-r--r-- | src/diff.c | 6 | ||||
-rw-r--r-- | src/diff3.c | 6 | ||||
-rw-r--r-- | src/sdiff.c | 6 |
4 files changed, 8 insertions, 16 deletions
@@ -31,11 +31,11 @@ #include <hard-locale.h> #include <inttostr.h> #include <progname.h> -#include <stdopen.h> #include <unlocked-io.h> #include <version-etc.h> #include <xalloc.h> #include <binary-io.h> +#include <xstdopen.h> #include <xstrtol.h> /* The official name of this program (e.g., no 'g' prefix). */ @@ -210,9 +210,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); c_stack_action (0); - int stdopen_errno = stdopen (); - if (stdopen_errno != 0) - error (EXIT_TROUBLE, stdopen_errno, _("standard file descriptors")); + xstdopen (); /* Parse command line options. */ @@ -37,11 +37,11 @@ #include <progname.h> #include <sh-quote.h> #include <stat-time.h> -#include <stdopen.h> #include <timespec.h> #include <version-etc.h> #include <xalloc.h> #include <xreadlink.h> +#include <xstdopen.h> #include <binary-io.h> /* The official name of this program (e.g., no 'g' prefix). */ @@ -298,9 +298,7 @@ main (int argc, char **argv) re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING); excluded = new_exclude (); presume_output_tty = false; - int stdopen_errno = stdopen (); - if (stdopen_errno != 0) - error (EXIT_TROUBLE, stdopen_errno, _("standard file descriptors")); + xstdopen (); /* Decode the options. */ diff --git a/src/diff3.c b/src/diff3.c index 8ce1a3d..037df25 100644 --- a/src/diff3.c +++ b/src/diff3.c @@ -30,11 +30,11 @@ #include <file-type.h> #include <getopt.h> #include <progname.h> -#include <stdopen.h> #include <system-quote.h> #include <version-etc.h> #include <xalloc.h> #include <xfreopen.h> +#include <xstdopen.h> /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "diff3" @@ -273,9 +273,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); c_stack_action (0); - int stdopen_errno = stdopen (); - if (stdopen_errno != 0) - error (EXIT_TROUBLE, stdopen_errno, _("standard file descriptors")); + xstdopen (); while ((c = getopt_long (argc, argv, "aeimvx3AEL:TX", longopts, 0)) != -1) { diff --git a/src/sdiff.c b/src/sdiff.c index 605fd33..2ef83da 100644 --- a/src/sdiff.c +++ b/src/sdiff.c @@ -32,10 +32,10 @@ #include <file-type.h> #include <getopt.h> #include <progname.h> -#include <stdopen.h> #include <system-quote.h> #include <version-etc.h> #include <xalloc.h> +#include <xstdopen.h> /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "sdiff" @@ -456,9 +456,7 @@ main (int argc, char *argv[]) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); c_stack_action (cleanup); - int stdopen_errno = stdopen (); - if (stdopen_errno != 0) - error (EXIT_TROUBLE, stdopen_errno, _("standard file descriptors")); + xstdopen (); prog = getenv ("EDITOR"); if (prog) |