From fab6d621377dcd0ace90066684cff09cb26ba725 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 May 1998 12:32:47 +0000 Subject: Update. 1998-05-08 12:26 Ulrich Drepper * iconv/gconv_int.h (struct gconv_module): Remove cost field and add cost_hi and cost_lo. * iconv/gconv_conf.c (builtin_modules): Initialize cost_hi from Cost parameter and set cost_lo to INT_MAX. (add_module): Take new parameter and use it to initialize cost_lo. (read_conf_file): Count modules being loaded and use counter for new parameter to add_module. * iconv/gconv_db.c (find_derivation): When look for cost examine cost_hi and cost_lo. 1998-05-08 10:52 Ulrich Drepper * string/bits/string2.h: Don't use unsigned char * unless really necessary since this disturbs C++. * sysdeps/i386/i486/bits/string.h: Likewise. Patch by Bernd Schmidt . 1998-05-08 13:53 Andreas Schwab * malloc/malloc.c (top_check): Fix last change. --- sysdeps/i386/i486/bits/string.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sysdeps/i386/i486/bits/string.h') diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h index 3bd8f8922c..7a919a1ac3 100644 --- a/sysdeps/i386/i486/bits/string.h +++ b/sysdeps/i386/i486/bits/string.h @@ -386,7 +386,9 @@ __strlen_g (__const char *__str) (__extension__ (__builtin_constant_p (src) \ ? (sizeof ((src)[0]) == 1 && strlen (src) + 1 <= 8 \ ? __strcpy_small (dest, src, strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ + : (char *) memcpy ((char *) dest, \ + (__const char *) src, \ + strlen (src) + 1)) \ : __strcpy_g (dest, src))) #define __strcpy_small(dest, src, srclen) \ @@ -620,7 +622,8 @@ __stpcpy_g (char *__dest, __const char *__src) #define strncpy(dest, src, n) \ (__extension__ (__builtin_constant_p (src) \ ? ((strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ + ? (char *) memcpy ((char *) dest, \ + (__const char *) src, n) \ : __strncpy_cg (dest, src, strlen (src) + 1, n))) \ : __strncpy_gg (dest, src, n))) #define __strncpy_cg(dest, src, srclen, n) \ @@ -793,7 +796,8 @@ __strcat_g (char *__dest, __const char *__src) __builtin_constant_p (src) && __builtin_constant_p (n) \ ? (strlen (src) < ((size_t) (n)) \ ? strcat (__dest, src) \ - : (memcpy (strchr (__dest, '\0'), src, n), __dest)) \ + : (memcpy (strchr (__dest, '\0'), \ + (__const char *) src, n), __dest)) \ : __strncat_g (__dest, src, n); })) __STRING_INLINE char * @@ -851,8 +855,9 @@ __strncat_g (char *__dest, __const char __src[], size_t __n) (__extension__ (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ && (sizeof ((s1)[0]) != 1 || strlen (s1) >= 4) \ && (sizeof ((s2)[0]) != 1 || strlen (s2) >= 4) \ - ? memcmp (s1, s2, (strlen (s1) < strlen (s2) \ - ? strlen (s1) : strlen (s2)) + 1) \ + ? memcmp ((__const char *) s1, (__const char *) s2, \ + (strlen (s1) < strlen (s2) \ + ? strlen (s1) : strlen (s2)) + 1) \ : (__builtin_constant_p (s1) && sizeof ((s1)[0]) == 1 \ && sizeof ((s2)[0]) == 1 && strlen (s1) < 4 \ ? (__builtin_constant_p (s2) && sizeof ((s2)[0]) == 1 \ -- cgit v1.2.3