about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ftime.c3
-rw-r--r--sysdeps/generic/strtok.c7
-rw-r--r--sysdeps/generic/strtok_r.c7
3 files changed, 11 insertions, 6 deletions
diff --git a/sysdeps/generic/ftime.c b/sysdeps/generic/ftime.c
index 3e9852c4e6..db692fa072 100644
--- a/sysdeps/generic/ftime.c
+++ b/sysdeps/generic/ftime.c
@@ -16,10 +16,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <errno.h>
 #include <time.h>
 #include <sys/timeb.h>
-#include <sys/time.h>
-#include <errno.h>
 
 int
 ftime (timebuf)
diff --git a/sysdeps/generic/strtok.c b/sysdeps/generic/strtok.c
index b6f952385c..451fd1e88c 100644
--- a/sysdeps/generic/strtok.c
+++ b/sysdeps/generic/strtok.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1996,1997,1999,2000,2001 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
@@ -45,7 +45,10 @@ strtok (s, delim)
   /* Scan leading delimiters.  */
   s += strspn (s, delim);
   if (*s == '\0')
-    return NULL;
+    {
+      olds = s;
+      return NULL;
+    }
 
   /* Find the end of the token.  */
   token = s;
diff --git a/sysdeps/generic/strtok_r.c b/sysdeps/generic/strtok_r.c
index 4acda149b6..7e6d774371 100644
--- a/sysdeps/generic/strtok_r.c
+++ b/sysdeps/generic/strtok_r.c
@@ -1,5 +1,5 @@
 /* Reentrant string tokenizer.  Generic version.
-   Copyright (C) 1991, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1996, 1997, 1998, 1999, 2001 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
@@ -46,7 +46,10 @@ __strtok_r (s, delim, save_ptr)
   /* Scan leading delimiters.  */
   s += strspn (s, delim);
   if (*s == '\0')
-    return NULL;
+    {
+      *save_ptr = s;
+      return NULL;
+    }
 
   /* Find the end of the token.  */
   token = s;