about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-10-15 08:04:01 +0000
committerUlrich Drepper <drepper@redhat.com>1998-10-15 08:04:01 +0000
commitfcab9698e07003e51d19dbae40267da6376a2b8b (patch)
treeb86dddbf568c008e46f6d2adf42a60ccc4d16f31
parent7edb4c25b01df0255d396870e3dbfd3da3485fe2 (diff)
downloadglibc-fcab9698e07003e51d19dbae40267da6376a2b8b.tar.gz
glibc-fcab9698e07003e51d19dbae40267da6376a2b8b.tar.xz
glibc-fcab9698e07003e51d19dbae40267da6376a2b8b.zip
Update.
1998-10-14  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
 
	* string/bits/string2.h (strcmp): Don't cache the result of
	__builtin_constant_p in variables, otherwise constant folding
	can fail in big functions.
 
1998-10-14  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
 
	* string/bits/string2.h: Add prototypes for the new inline
	functions.
 
1998-10-08  Paul Eggert  <eggert@twinsun.com>
	* time/mktime.c (my_mktime_localtime_r): Renamed from localtime_r.
	Define also if HAVE_LOCALTIME_R && defined localtime_r, with
	a body that merely expands localtime_r; this works around a
	bug in Digital Unix 4.0A and 4.0D.
1998-10-14  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
	* sysdeps/unix/opendir.c (__opendir): Remove label lose2 which is
	unnecessary after the changes of 1998-10-12.
-rw-r--r--ChangeLog27
-rw-r--r--string/bits/string2.h40
2 files changed, 52 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ac17decae..57c8ae4cf4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,15 +1,26 @@
+1998-10-14  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+ 
+	* string/bits/string2.h (strcmp): Don't cache the result of
+	__builtin_constant_p in variables, otherwise constant folding
+	can fail in big functions.
+ 
+1998-10-14  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+ 
+	* string/bits/string2.h: Add prototypes for the new inline
+	functions.
+ 
 1998-10-15  Ulrich Drepper  <drepper@cygnus.com>
 
 	* sysdeps/unix/sysv/linux/alpha/bits/ioctls.h: Include termios.h to
 	have all types defined.
 	Patch by Matti Aarnio <matti.aarnio@sonera.fi>.
 
-1998-10-08  Paul Eggert  <eggert@twinsun.com> 
+1998-10-08  Paul Eggert  <eggert@twinsun.com>
 
-	* time/mktime.c (my_mktime_localtime_r): Renamed from localtime_r. 
-	Define also if HAVE_LOCALTIME_R && defined localtime_r, with 
-	a body that merely expands localtime_r; this works around a 
-	bug in Digital Unix 4.0A and 4.0D. 
+	* time/mktime.c (my_mktime_localtime_r): Renamed from localtime_r.
+	Define also if HAVE_LOCALTIME_R && defined localtime_r, with
+	a body that merely expands localtime_r; this works around a
+	bug in Digital Unix 4.0A and 4.0D.
 
 1998-10-14  Ulrich Drepper  <drepper@cygnus.com>
 
@@ -28,10 +39,10 @@
 	* sysdeps/unix/sysv/linux/alpha/bits/ioctls.h: Define __kernel_termios
 	here instead of including kernel_termios.h.
 
-1998-10-14  Andreas Jaeger  <aj@arthur.rhein-neckar.de> 
+1998-10-14  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
  
-	* sysdeps/unix/opendir.c (__opendir): Remove label lose2 which is 
-	unnecessary after the changes of 1998-10-12. 
+	* sysdeps/unix/opendir.c (__opendir): Remove label lose2 which is
+	unnecessary after the changes of 1998-10-12.
  
 1998-10-13  Ulrich Drepper  <drepper@cygnus.com>
 
diff --git a/string/bits/string2.h b/string/bits/string2.h
index eba4dc20df..fd431b8ece 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -121,6 +121,9 @@ __STRING2_COPY_TYPE (8);
      __extension__ __STRING2_SMALL_GET16 (src, 4),			      \
      __extension__ __STRING2_SMALL_GET32 (src, 0),			      \
      __extension__ __STRING2_SMALL_GET32 (src, 4)
+__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char,
+				       __uint16_t, __uint16_t, __uint32_t,
+				       __uint32_t, size_t);
 __STRING_INLINE void *
 __mempcpy_small (void *__dest1,
 		 char __src0_1, char __src2_1, char __src4_1, char __src6_1,
@@ -200,6 +203,13 @@ __mempcpy_small (void *__dest1,
 	  ((__const char *) (src))[2], ((__const char *) (src))[3],	      \
 	  ((__const char *) (src))[4], ((__const char *) (src))[5],	      \
 	  ((__const char *) (src))[6], ((__const char *) (src))[7] } })
+__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2,
+				       __STRING2_COPY_ARR3,
+				       __STRING2_COPY_ARR4,
+				       __STRING2_COPY_ARR5,
+				       __STRING2_COPY_ARR6,
+				       __STRING2_COPY_ARR7,
+				       __STRING2_COPY_ARR8, size_t);
 __STRING_INLINE void *
 __mempcpy_small (void *__dest1, char __src1,
 		 __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3,
@@ -258,6 +268,8 @@ __mempcpy_small (void *__dest1, char __src1,
      __extension__ __STRING2_SMALL_GET16 (src, 4),			      \
      __extension__ __STRING2_SMALL_GET32 (src, 0),			      \
      __extension__ __STRING2_SMALL_GET32 (src, 4)
+__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t,
+				      __uint32_t, __uint32_t, size_t);
 __STRING_INLINE char *
 __strcpy_small (char *__dest,
 		__uint16_t __src0_2, __uint16_t __src4_2,
@@ -327,6 +339,13 @@ __strcpy_small (char *__dest,
 	  ((__const char *) (src))[2], ((__const char *) (src))[3],	      \
 	  ((__const char *) (src))[4], ((__const char *) (src))[5],	      \
 	  ((__const char *) (src))[6], '\0' } })
+__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2,
+				      __STRING2_COPY_ARR3,
+				      __STRING2_COPY_ARR4,
+				      __STRING2_COPY_ARR5,
+				      __STRING2_COPY_ARR6,
+				      __STRING2_COPY_ARR7,
+				      __STRING2_COPY_ARR8, size_t);
 __STRING_INLINE char *
 __strcpy_small (char *__dest,
 		__STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3,
@@ -387,6 +406,8 @@ __strcpy_small (char *__dest,
      __extension__ __STRING2_SMALL_GET16 (src, 4),			      \
      __extension__ __STRING2_SMALL_GET32 (src, 0),			      \
      __extension__ __STRING2_SMALL_GET32 (src, 4)
+__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t,
+				      __uint32_t, __uint32_t, size_t);
 __STRING_INLINE char *
 __stpcpy_small (char *__dest,
 		__uint16_t __src0_2, __uint16_t __src4_2,
@@ -463,6 +484,13 @@ __stpcpy_small (char *__dest,
 	  ((__const char *) (src))[2], ((__const char *) (src))[3],	      \
 	  ((__const char *) (src))[4], ((__const char *) (src))[5],	      \
 	  ((__const char *) (src))[6], '\0' } })
+__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2,
+				      __STRING2_COPY_ARR3,
+				      __STRING2_COPY_ARR4,
+				      __STRING2_COPY_ARR5,
+				      __STRING2_COPY_ARR6,
+				      __STRING2_COPY_ARR7,
+				      __STRING2_COPY_ARR8, size_t);
 __STRING_INLINE char *
 __stpcpy_small (char *__dest,
 		__STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3,
@@ -553,22 +581,20 @@ __stpcpy_small (char *__dest,
 # define strcmp(s1, s2) \
   __extension__								      \
   ({ size_t __s1_len, __s2_len;						      \
-     int __s1_is_const = __builtin_constant_p (s1);			      \
-     int __s2_is_const = __builtin_constant_p (s2);			      \
-     (__s1_is_const && __s2_is_const					      \
+     (__builtin_constant_p (s1) && __builtin_constant_p (s2)		      \
       && (__s1_len = strlen (s1), __s2_len = strlen (s2),		      \
 	  (!__string2_1bptr_p (s1) || __s1_len >= 4)			      \
 	  && (!__string2_1bptr_p (s2) || __s2_len >= 4))		      \
       ? memcmp ((__const char *) (s1), (__const char *) (s2),		      \
 		(__s1_len < __s2_len ? __s1_len : __s2_len) + 1)	      \
-      : (__s1_is_const && __string2_1bptr_p (s1)			      \
+      : (__builtin_constant_p (s1) && __string2_1bptr_p (s1)		      \
 	 && (__s1_len = strlen (s1), __s1_len < 4)			      \
-	 ? (__s2_is_const && __string2_1bptr_p (s2)			      \
+	 ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2)		      \
 	    ? __strcmp_cc (s1, s2, __s1_len)				      \
 	    : __strcmp_cg (s1, s2, __s1_len))				      \
-	 : (__s2_is_const && __string2_1bptr_p (s2)			      \
+	 : (__builtin_constant_p (s2) && __string2_1bptr_p (s2)		      \
 	    && (__s2_len = strlen (s2), __s2_len < 4)			      \
-	    ? (__s1_is_const && __string2_1bptr_p (s1)			      \
+	    ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1)	      \
 	       ? __strcmp_cc (s1, s2, __s2_len)				      \
 	       : __strcmp_gc (s1, s2, __s2_len))			      \
 	    : strcmp (s1, s2)))); })