mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
2002-01-23 Richard Henderson <rth@redhat.com> * sysdeps/alpha/Makefile (pic-ccflag): New variable. 2002-01-28 Ulrich Drepper <drepper@redhat.com> * string/strxfrm.c: Allocate one more byte for rulearr and clear this element [PR libc/2855]. * string/strcoll.c: Handle zero-length arguments specially [PR libc/2856]. 2002-01-23 Jakub Jelinek <jakub@redhat.com> * string/bits/string2.h (__mempcpy): For gcc 3.0+, don't use __mempcpy_small but instead use __builtin_memcpy ( , , n) + n for short lengths and constant src. (strcpy): Don't optimize for gcc 3.0+. (__stpcpy): For gcc 3.0+, don't use __stpcpy_small but instead use __builtin_strcpy (, src) + strlen (src) for short string literal src. 2002-01-23 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com> * sysdeps/unix/sysv/linux/configure.in (libc_cv_gcc_unwind_find_fde): Set for arm, too. 2001-01-22 Paul Eggert <eggert@twinsun.com> * manual/llio.texi (Linked Channels, Cleaning Streams): Make it clearer that a just-opened input stream might need cleaning. 2002-01-21 H.J. Lu <hjl@gnu.org> * sysdeps/mips/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Don't use label at end of compound statement.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
|
||||
@ -137,6 +137,10 @@ STRCOLL (s1, s2, l)
|
||||
s1len = STRLEN (s1);
|
||||
s2len = STRLEN (s2);
|
||||
|
||||
/* Catch empty strings. */
|
||||
if (__builtin_expect (s1len == 0, 0) || __builtin_expect (s2len == 0, 0))
|
||||
return (s1len != 0) - (s2len != 0);
|
||||
|
||||
/* We need the elements of the strings as unsigned values since they
|
||||
are used as indeces. */
|
||||
us1 = (const USTRING_TYPE *) s1;
|
||||
|
Reference in New Issue
Block a user