summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-08-26 10:28:45 +0000
committerUlrich Drepper <drepper@redhat.com>1996-08-26 10:28:45 +0000
commitdcf0671d905200c449f92ead6cf43c184637a0d5 (patch)
tree91dc217311db41e89545d487b991865a6433205e /sysdeps/generic
parent4884d0f03c5a3b3d2459655e76fa2d0684d389dc (diff)
downloadglibc-dcf0671d905200c449f92ead6cf43c184637a0d5.tar.gz
glibc-dcf0671d905200c449f92ead6cf43c184637a0d5.tar.xz
glibc-dcf0671d905200c449f92ead6cf43c184637a0d5.zip
handle password file locking. cvs/libc-960826
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ftime.c13
-rw-r--r--sysdeps/generic/setfpucw.c5
2 files changed, 10 insertions, 8 deletions
diff --git a/sysdeps/generic/ftime.c b/sysdeps/generic/ftime.c
index 76e9276483..600e959245 100644
--- a/sysdeps/generic/ftime.c
+++ b/sysdeps/generic/ftime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 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
@@ -25,19 +25,18 @@ ftime (timebuf)
      struct timeb *timebuf;
 {
   int save = errno;
-  struct tm *tp;
+  struct tm tp;
 
   errno = 0;
   if (time (&timebuf->time) == (time_t) -1 && errno != 0)
     return -1;
   timebuf->millitm = 0;
-  
-  tp = localtime (&timebuf->time);
-  if (tp == NULL)
+
+  if (__localtime_r (&timebuf->time, &tp) == NULL)
     return -1;
 
-  timebuf->timezone = tp->tm_gmtoff / 60;
-  timebuf->dstflag = tp->tm_isdst;
+  timebuf->timezone = tp.tm_gmtoff / 60;
+  timebuf->dstflag = tp.tm_isdst;
 
   errno = save;
   return 0;
diff --git a/sysdeps/generic/setfpucw.c b/sysdeps/generic/setfpucw.c
index 7b09a68b55..5654c942b0 100644
--- a/sysdeps/generic/setfpucw.c
+++ b/sysdeps/generic/setfpucw.c
@@ -29,5 +29,8 @@ __setfpucw (fpu_control_t set)
 
   /* Preserve the reserved bits, and set the rest as the user
      specified (or the default, if the user gave zero).  */
-  _FPU_SETCW ((cw & _FPU_RESERVED) | (set & ~_FPU_RESERVED));
+  cw &= _FPU_RESERVED;
+  cw |= set & ~_FPU_RESERVED;
+
+  _FPU_SETCW (cw);
 }