Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 15 Oct 1998 08:04:01 +0000 (08:04 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 15 Oct 1998 08:04:01 +0000 (08:04 +0000)
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.

ChangeLog
string/bits/string2.h

index 5ac17de..57c8ae4 100644 (file)
--- 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>
 
        * 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>
 
index eba4dc2..fd431b8 100644 (file)
@@ -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)))); })