diff options
author | Jim Meyering <jim@meyering.net> | 1998-06-29 16:23:15 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-06-29 16:23:15 +0000 |
commit | 8ba97d963e065c7bc711c4ffa921fd3b06ed8aff (patch) | |
tree | ec37c23e9d3c3ad3cb5ca6d9ea1282be00098312 /src | |
parent | 223e88f957d9f57be9832dc941554b77087154ca (diff) | |
download | coreutils-8ba97d963e065c7bc711c4ffa921fd3b06ed8aff.tar.xz |
Include system.h only after error.h and readutmp.h
so we don't get redefinition warnings about getc, etc.
Revert back to using lower case _unlocked wrapper names.
Diffstat (limited to 'src')
-rw-r--r-- | src/uptime.c | 10 | ||||
-rw-r--r-- | src/users.c | 6 | ||||
-rw-r--r-- | src/who.c | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/uptime.c b/src/uptime.c index 2bf9a761f..8ff897e59 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -1,5 +1,5 @@ /* GNU's uptime. - Copyright (C) 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 92, 93, 94, 95, 96, 1997, 1998 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 @@ -20,9 +20,9 @@ #include <config.h> #include <getopt.h> -#include "system.h" #include "error.h" #include "readutmp.h" +#include "system.h" /* The name this program was run with. */ char *program_name; @@ -66,7 +66,7 @@ print_uptime (int n, const STRUCT_UTMP *this) res = sscanf (buf, "%lf", &upsecs); if (res == 1) uptime = (time_t) upsecs; - FCLOSE (fp); + fclose (fp); } #endif /* HAVE_PROC_UPTIME */ /* Loop through all the utmp entries we just read and count up the valid @@ -122,7 +122,7 @@ print_uptime (int n, const STRUCT_UTMP *this) #endif if (loads == -1) - PUTCHAR ('\n'); + putchar ('\n'); else { if (loads > 0) @@ -132,7 +132,7 @@ print_uptime (int n, const STRUCT_UTMP *this) if (loads > 2) printf (", %.2f", avg[2]); if (loads > 0) - PUTCHAR ('\n'); + putchar ('\n'); } } diff --git a/src/users.c b/src/users.c index 0d44f6dcf..38eb6cd65 100644 --- a/src/users.c +++ b/src/users.c @@ -1,5 +1,5 @@ /* GNU's users. - Copyright (C) 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 92, 93, 94, 95, 96, 1997, 1998 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 @@ -20,9 +20,9 @@ #include <config.h> #include <getopt.h> -#include "system.h" #include "error.h" #include "readutmp.h" +#include "system.h" /* The name this program was run with. */ char *program_name; @@ -82,7 +82,7 @@ list_entries_users (int n, const STRUCT_UTMP *this) int c; fputs (u[i], stdout); c = (i < n_entries - 1 ? ' ' : '\n'); - PUTCHAR (c); + putchar (c); } for (i = 0; i < n_entries; i++) @@ -1,5 +1,5 @@ /* GNU's who. - Copyright (C) 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 92, 93, 94, 95, 96, 1997, 1998 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 @@ -27,9 +27,9 @@ #include <config.h> #include <getopt.h> -#include "system.h" #include "error.h" #include "readutmp.h" +#include "system.h" #ifndef MAXHOSTNAMELEN # define MAXHOSTNAMELEN 64 @@ -202,7 +202,7 @@ print_entry (const STRUCT_UTMP *utmp_ent) } #endif - PUTCHAR ('\n'); + putchar ('\n'); } /* Print the username of each valid entry and the number of valid entries |