Prevent silent errors should x86-64 strncmp be needed outside libc.

This commit is contained in:
Ulrich Drepper 2010-01-14 08:09:32 -08:00
parent e26dfa69f5
commit f69190e74a
2 changed files with 217 additions and 204 deletions

View File

@ -1,3 +1,9 @@
2010-01-14 Ulrich Drepper <drepper@redhat.com>
[BZ #11120]
* sysdeps/x86_64/strcmp.S: Prevent silent errors should strncmp be
needed outside libc.
2010-01-13 Ulrich Drepper <drepper@redhat.com> 2010-01-13 Ulrich Drepper <drepper@redhat.com>
* stdlib/stdlib.h: Parameter of unsetenv must not be NULL. * stdlib/stdlib.h: Parameter of unsetenv must not be NULL.

View File

@ -1,5 +1,5 @@
/* Highly optimized version for x86-64. /* Highly optimized version for x86-64.
Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009 Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009, 2010
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Based on i686 version contributed by Ulrich Drepper Based on i686 version contributed by Ulrich Drepper
@ -33,6 +33,13 @@
#endif #endif
#ifdef USE_AS_STRNCMP #ifdef USE_AS_STRNCMP
/* The simplified code below is not set up to handle strncmp() so far.
Should this become necessary it has to be implemented. For now
just report the problem. */
# ifdef NOT_IN_lib
# error "strncmp not implemented so far"
# endif
/* Since the counter, %r11, is unsigned, we branch to strcmp_exitz /* Since the counter, %r11, is unsigned, we branch to strcmp_exitz
if the new counter > the old one or is 0. */ if the new counter > the old one or is 0. */
# define UPDATE_STRNCMP_COUNTER \ # define UPDATE_STRNCMP_COUNTER \