about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-02-23 20:29:25 +0000
committerUlrich Drepper <drepper@redhat.com>2001-02-23 20:29:25 +0000
commitd436a9f71094ec7fc8e946058af20a1c167df791 (patch)
treea4b982297630c5af186566289301e8f084b18d04 /sysdeps
parent578af3381518983dccfb99df52cc917c43f38542 (diff)
downloadglibc-d436a9f71094ec7fc8e946058af20a1c167df791.tar.gz
glibc-d436a9f71094ec7fc8e946058af20a1c167df791.tar.xz
glibc-d436a9f71094ec7fc8e946058af20a1c167df791.zip
Update.
2001-02-23  Andreas Jaeger  <aj@suse.de>

	* string/tester.c (test_strtok_r): Add testcase.
	(test_strtok_r): Always initialize cp for proper checking.

	* sysdeps/generic/strtok.c (strtok): Handle case of first strtok
	returning NULL correctly.
	Patch by Fumitoshi UKAI <ukai@debian.or.jp>.
	* sysdeps/generic/strtok_r.c (__strtok_r): Likewise.

2001-02-23  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/aix/bits/types.h: Define __need_NULL before
	including <stddef.h>.
	* sysdeps/unix/sysv/aix/write.c: Define alias __libc_write.
	* include/libc-symbols.h (weak_alias): Don't use .weak if
	HAVE_ASM_GLOBAL_DOT_NAME is defined.
	Patches by Michael Keezer <mkeezer@redhat.com>.

	* sysdeps/generic/ftime.c: Don't include <sys/time.h> at all.
	Patch by Michael Keezer <mkeezer@redhat.com>.

	* sysdeps/unix/sysv/aix/Dist: Remove restf.S and savef.S.
	* sysdeps/unix/sysv/aix/Makefile [$(subdir) == misc]
	(sysdep_routines): Remove restf.S and savef.S.
	* sysdeps/unix/sysv/aix/restf.S. Removed.
	* sysdeps/unix/sysv/aix/savef.S. Removed.
	* sysdeps/powerpc/fprrest.S: Use C_TEXT to define label.  Also define
	alternative names used on some platforms.
	* sysdeps/powerpc/fprsave.S: Likewise.
	* sysdeps/powerpc/gprrest0.S: Likewise.
	* sysdeps/powerpc/gprrest1.S: Likewise.
	* sysdeps/powerpc/gprsave0.S: Likewise.
	* sysdeps/powerpc/gprsave1.S: Likewise.
	Patch by Michael Keezer <mkeezer@redhat.com>.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/ftime.c3
-rw-r--r--sysdeps/generic/strtok.c7
-rw-r--r--sysdeps/generic/strtok_r.c7
-rw-r--r--sysdeps/unix/sysv/aix/Dist2
-rw-r--r--sysdeps/unix/sysv/aix/Makefile2
-rw-r--r--sysdeps/unix/sysv/aix/bits/types.h1
-rw-r--r--sysdeps/unix/sysv/aix/restf.S58
-rw-r--r--sysdeps/unix/sysv/aix/savef.S58
-rw-r--r--sysdeps/unix/sysv/aix/write.c3
9 files changed, 15 insertions, 126 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;
diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist
index bce7330830..0482d24d38 100644
--- a/sysdeps/unix/sysv/aix/Dist
+++ b/sysdeps/unix/sysv/aix/Dist
@@ -5,5 +5,3 @@ kernel_proto.h
 bits/utmpx.h
 gnu/lib-names.h
 uitrunc.c
-savef.S
-restf.S
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index 6c9ce1113e..9aa48d1680 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -6,7 +6,7 @@
 static-start-installed-name = /usr/lib/crt0.o
 
 ifeq ($(subdir),misc)
-sysdep_routines += dl-open dl-sym dl-close restf savef uitrunc
+sysdep_routines += dl-open dl-sym dl-close uitrunc
 endif
 
 ifeq ($(subdir),login)
diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h
index cd57291051..df75454af1 100644
--- a/sysdeps/unix/sysv/aix/bits/types.h
+++ b/sysdeps/unix/sysv/aix/bits/types.h
@@ -25,6 +25,7 @@
 
 #include <features.h>
 
+#define __need_NULL
 #define __need_size_t
 #include <stddef.h>
 
diff --git a/sysdeps/unix/sysv/aix/restf.S b/sysdeps/unix/sysv/aix/restf.S
deleted file mode 100644
index 049627e5c4..0000000000
--- a/sysdeps/unix/sysv/aix/restf.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (C) 2000 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
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#include <sysdep.h>
-
-ENTRY(_restf_all)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
-C_TEXT(_restf14):	lfd	fp14,-144(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
-C_TEXT(_restf15):	lfd	fp15,-136(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
-C_TEXT(_restf16):	lfd	fp16,-128(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
-C_TEXT(_restf17):	lfd	fp17,-120(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
-C_TEXT(_restf18):	lfd	fp18,-112(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
-C_TEXT(_restf19):	lfd	fp19,-104(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
-C_TEXT(_restf20):	lfd	fp20,-96(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
-C_TEXT(_restf21):	lfd	fp21,-88(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
-C_TEXT(_restf22):	lfd	fp22,-80(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
-C_TEXT(_restf23):	lfd	fp23,-72(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
-C_TEXT(_restf24):	lfd	fp24,-64(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
-C_TEXT(_restf25):	lfd	fp25,-56(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
-C_TEXT(_restf26):	lfd	fp26,-48(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
-C_TEXT(_restf27):	lfd	fp27,-40(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
-C_TEXT(_restf28):	lfd	fp28,-32(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
-C_TEXT(_restf29):	lfd	fp29,-24(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf30)
-C_TEXT(_restf30):	lfd	fp30,-16(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf31)
-C_TEXT(_restf31):	lfd	fp31,-8(r11)
-		blr
diff --git a/sysdeps/unix/sysv/aix/savef.S b/sysdeps/unix/sysv/aix/savef.S
deleted file mode 100644
index 4c10d6ec85..0000000000
--- a/sysdeps/unix/sysv/aix/savef.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (C) 2000 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
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#include <sysdep.h>
-
-ENTRY(_savef_all)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
-C_TEXT(_savef14):	stfd	fp14,-144(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
-C_TEXT(_savef15):	stfd	fp15,-136(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
-C_TEXT(_savef16):	stfd	fp16,-128(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
-C_TEXT(_savef17):	stfd	fp17,-120(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
-C_TEXT(_savef18):	stfd	fp18,-112(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
-C_TEXT(_savef19):	stfd	fp19,-104(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
-C_TEXT(_savef20):	stfd	fp20,-96(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
-C_TEXT(_savef21):	stfd	fp21,-88(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
-C_TEXT(_savef22):	stfd	fp22,-80(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
-C_TEXT(_savef23):	stfd	fp23,-72(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
-C_TEXT(_savef24):	stfd	fp24,-64(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
-C_TEXT(_savef25):	stfd	fp25,-56(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
-C_TEXT(_savef26):	stfd	fp26,-48(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
-C_TEXT(_savef27):	stfd	fp27,-40(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
-C_TEXT(_savef28):	stfd	fp28,-32(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
-C_TEXT(_savef29):	stfd	fp29,-24(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef30)
-C_TEXT(_savef30):	stfd	fp30,-16(r11)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef31)
-C_TEXT(_savef31):	stfd	fp31,-8(r11)
-		blr
diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c
index c872e04810..82c2bf6861 100644
--- a/sysdeps/unix/sysv/aix/write.c
+++ b/sysdeps/unix/sysv/aix/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 
@@ -32,3 +32,4 @@ __write (fd, ptr, n)
 }
 /* AIX has no weak aliases (yet) but let's hope for better times.  */
 weak_alias (__write, write)
+strong_alias (__write, __libc_write)