aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-12 20:53:19 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-12 20:53:19 +0000
commit4a1995267e7bd1cce6f48e568d790f35bac4573e (patch)
tree8b3799b5a79224287e361bed69f0b2567892119d
parenta4dec43d316b2e5dc8855d806bc5ab2ec5eef50d (diff)
downloadglibc-4a1995267e7bd1cce6f48e568d790f35bac4573e.zip
glibc-4a1995267e7bd1cce6f48e568d790f35bac4573e.tar.gz
glibc-4a1995267e7bd1cce6f48e568d790f35bac4573e.tar.bz2
Update.
2000-04-12 Andreas Jaeger <aj@suse.de> * sysdeps/unix/i386/i586/clock_gettime.c: Fix typo. * sysdeps/unix/sysv/linux/i386/get_clockfreq.c: Include <string.h> for memmem declaration. * sysdeps/unix/clock_gettime.c (clock_gettime): Initialize retval to -1. * sysdeps/posix/clock_getres.c (clock_getres): Likewise.
-rw-r--r--ChangeLog11
-rw-r--r--sysdeps/posix/clock_getres.c4
-rw-r--r--sysdeps/unix/clock_gettime.c3
-rw-r--r--sysdeps/unix/i386/i586/clock_gettime.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/get_clockfreq.c1
5 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a29c08f..9e9d937 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
+2000-04-12 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/i386/i586/clock_gettime.c: Fix typo.
+
+ * sysdeps/unix/sysv/linux/i386/get_clockfreq.c: Include <string.h>
+ for memmem declaration.
+
2000-04-12 Ulrich Drepper <drepper@redhat.com>
+ * sysdeps/unix/clock_gettime.c (clock_gettime): Initialize retval
+ to -1.
+ * sysdeps/posix/clock_getres.c (clock_getres): Likewise.
+
* libio/iopopen.c (_IO_new_proc_open): Close pipes in case the
mode is invalid.
* libio/oldiopopen.c (_IO_old_proc_open): Likewise.
diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c
index 5043ffd..68c9591 100644
--- a/sysdeps/posix/clock_getres.c
+++ b/sysdeps/posix/clock_getres.c
@@ -29,7 +29,7 @@
int
clock_getres (clockid_t clock_id, struct timespec *res)
{
- int retval;
+ int retval = -1;
switch (clock_id)
{
@@ -37,7 +37,6 @@ clock_getres (clockid_t clock_id, struct timespec *res)
{
long int clk_tck = sysconf (_SC_CLK_TCK);
- retval = -1;
if (__builtin_expect (clk_tck != -1, 1))
{
/* This implementation assumes that the realtime clock has a
@@ -55,7 +54,6 @@ clock_getres (clockid_t clock_id, struct timespec *res)
default:
__set_errno (EINVAL);
- retval = -1;
break;
}
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index b7edd16..19df6c8 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -29,7 +29,7 @@ int
clock_gettime (clockid_t clock_id, struct timespec *tp)
{
struct timeval tv;
- int retval;
+ int retval = -1;
switch (clock_id)
{
@@ -44,7 +44,6 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
default:
__set_errno (EINVAL);
- retval = -1;
break;
}
diff --git a/sysdeps/unix/i386/i586/clock_gettime.c b/sysdeps/unix/i386/i586/clock_gettime.c
index bb63874..5163d87 100644
--- a/sysdeps/unix/i386/i586/clock_gettime.c
+++ b/sysdeps/unix/i386/i586/clock_gettime.c
@@ -27,7 +27,7 @@
/* Function to determine processor frequency. */
-extern unsigned long long int __get_glockfreq (void);
+extern unsigned long long int __get_clockfreq (void);
/* Clock frequency of the processor. We make it a 64-bit variable
because some jokers are already playing with processors with more
diff --git a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
index 65b7bb2..26784c6 100644
--- a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
@@ -19,6 +19,7 @@
#include <ctype.h>
#include <fcntl.h>
+#include <string.h>
#include <unistd.h>