aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/posix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/cuserid.c13
-rw-r--r--sysdeps/posix/gettimeofday.c2
2 files changed, 6 insertions, 9 deletions
diff --git a/sysdeps/posix/cuserid.c b/sysdeps/posix/cuserid.c
index b874e909ce..2fe535ea1d 100644
--- a/sysdeps/posix/cuserid.c
+++ b/sysdeps/posix/cuserid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,22 +16,19 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stdio.h>
#include <string.h>
#include <pwd.h>
-extern int EXFUN(geteuid, (NOARGS));
-
-
/* Return the username of the caller.
If S is not NULL, it points to a buffer of at least L_cuserid bytes
into which the name is copied; otherwise, a static buffer is used. */
char *
-DEFUN(cuserid, (s), char *s)
+cuserid (s)
+ char *s;
{
static char name[L_cuserid];
- struct passwd *pwent = getpwuid(geteuid());
+ struct passwd *pwent = getpwuid (geteuid ());
if (pwent == NULL)
{
@@ -42,5 +39,5 @@ DEFUN(cuserid, (s), char *s)
if (s == NULL)
s = name;
- return strcpy(s, pwent->pw_name);
+ return strcpy (s, pwent->pw_name);
}
diff --git a/sysdeps/posix/gettimeofday.c b/sysdeps/posix/gettimeofday.c
index c3b8108258..3c079a5af2 100644
--- a/sysdeps/posix/gettimeofday.c
+++ b/sysdeps/posix/gettimeofday.c
@@ -56,7 +56,7 @@ __gettimeofday (tv, tz)
save_tzname[0] = __tzname[0];
save_tzname[1] = __tzname[1];
- tmp = localtime (&timer, &tm);
+ tmp = localtime_r (&timer, &tm);
tz->tz_minuteswest = __timezone / 60;
tz->tz_dsttime = __daylight;