From: Jim Meyering Date: Sun, 7 May 2000 14:49:06 +0000 (+0000) Subject: Include "closeout.h". X-Git-Tag: SH-UTILS-2_0h~19 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=73ed5ed51e0ae7ac5c7f606ba571b9cfbf5707b3;p=thirdparty%2Fcoreutils.git Include "closeout.h". (main): Call atexit with close_stdout. --- diff --git a/src/basename.c b/src/basename.c index ffdb6759aa..5ac75a534a 100644 --- a/src/basename.c +++ b/src/basename.c @@ -1,5 +1,5 @@ /* basename -- strip directory and suffix from filenames - Copyright (C) 1990-1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1990-1997, 1999, 2000 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 @@ -32,6 +32,7 @@ #include "system.h" #include "long-options.h" #include "error.h" +#include "closeout.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "basename" @@ -98,6 +99,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS, usage); /* The above handles --help and --version. diff --git a/src/chroot.c b/src/chroot.c index 77f970c1e5..df050d04d1 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -1,5 +1,5 @@ /* chroot -- run command or shell with special root directory - Copyright (C) 95, 96, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 95, 96, 1997, 1999, 2000 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 @@ -24,6 +24,7 @@ #include "system.h" #include "long-options.h" #include "error.h" +#include "closeout.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "chroot" @@ -66,6 +67,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS, usage); if (argc == 1)