From: Jim Meyering Date: Sun, 7 May 2000 14:52:16 +0000 (+0000) Subject: Include "closeout.h". X-Git-Tag: SH-UTILS-2_0h~15 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=1a898f0449fa4fd704740138a98f0a97c326754f;p=thirdparty%2Fcoreutils.git Include "closeout.h". (main): Call atexit with close_stdout. --- diff --git a/src/expr.c b/src/expr.c index 96b1823268..7dea02b75a 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1,5 +1,5 @@ /* expr -- evaluate expressions. - Copyright (C) 86, 1991-1997, 1999 Free Software Foundation, Inc. + Copyright (C) 86, 1991-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 @@ -37,6 +37,7 @@ #include "long-options.h" #include "error.h" #include "xalloc.h" +#include "closeout.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "expr" @@ -168,6 +169,8 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); + atexit (close_stdout); + posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL); /* Recognize --help or --version only if POSIXLY_CORRECT is not set. */