summaryrefslogtreecommitdiff
path: root/src/date.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-14 15:36:50 +0000
committerJim Meyering <jim@meyering.net>1999-01-14 15:36:50 +0000
commitdc4fd4c43b21e3c7043d963f1ecbae5716f06e61 (patch)
tree9e6aecb5ea09429a620ae523baed89bb60889858 /src/date.c
parent26ba9ca9df0b37d5f22f1592e9406cd84096f2f0 (diff)
downloadcoreutils-dc4fd4c43b21e3c7043d963f1ecbae5716f06e61.tar.xz
Include closeout.h. (main): Use close_stdout_status.
Diffstat (limited to 'src/date.c')
-rw-r--r--src/date.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/date.c b/src/date.c
index 79eaf4f03..c826d0191 100644
--- a/src/date.c
+++ b/src/date.c
@@ -1,6 +1,5 @@
/* date - print or set the system date and time
- Copyright (C) 89, 90, 91, 92, 93, 94, 95, 96, 1997
- Free Software Foundation, Inc.
+ Copyright (C) 1989-1999 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 +23,7 @@
#include <sys/types.h>
#include "system.h"
+#include "closeout.h"
#include "getline.h"
#include "error.h"
#include "getdate.h"
@@ -357,8 +357,7 @@ argument must be a format string beginning with `+'."),
show_date (format, when);
}
- if (fclose (stdout) == EOF)
- error (2, errno, _("write error"));
+ close_stdout_status (2);
exit (status);
}