From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3153 invoked by alias); 20 Apr 2004 15:22:10 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 3117 invoked from network); 20 Apr 2004 15:22:07 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sources.redhat.com with SMTP; 20 Apr 2004 15:22:07 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i3KDAT3j021529; Tue, 20 Apr 2004 15:10:29 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i3KDATZD021509; Tue, 20 Apr 2004 15:10:29 +0200 Date: Tue, 20 Apr 2004 15:22:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Tiny libc fixes Message-ID: <20040420131028.GA5191@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2004-04/txt/msg00069.txt.bz2 Hi! 1) Reverting the %% whitespace change from yesterday. Some OSes don't eat the whitespace there while others do, the ISO C99 standard only lists %c, %[ and %n as not eating whitespace, so it is probably better to stay with previous glibc behaviour here. 2) 3 warning fixes 3) fix sparcv9 build 2004-04-20 Jakub Jelinek * stdio-common/vfscanf.c (_IO_vfscanf): Revert last %% whitespace handling change. * stdio-common/tst-sscanf.c (int_tests): Adjust. * nss/nss-nis.c: Include stdlib.h. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Shut up a warning. * sysdeps/sparc/sparc64/memcmp.S (memcmp): Remove BP_SYM () from libc_hidden_builtin_def. linuxthreads/ * oldsemaphore.c (SEM_VALUE_MAX): Remove. --- libc/stdio-common/vfscanf.c.jj 2004-04-20 17:08:01.000000000 +0200 +++ libc/stdio-common/vfscanf.c 2004-04-20 17:08:21.718026240 +0200 @@ -543,8 +543,7 @@ _IO_vfscanf (s, format, argptr, errp) /* Find the conversion specifier. */ fc = *f++; if (skip_space || (fc != L_('[') && fc != L_('c') - && fc != L_('C') && fc != L_('n') - && fc != L_('%'))) + && fc != L_('C') && fc != L_('n'))) { /* Eat whitespace. */ int save_errno = errno; --- libc/stdio-common/tst-sscanf.c.jj 2004-04-20 17:09:43.927293269 +0200 +++ libc/stdio-common/tst-sscanf.c 2004-04-20 17:09:43.927293269 +0200 @@ -78,7 +78,6 @@ struct int_test { "foo\t", "foo bar", -1 }, { "foo\t", "foo %d", -1 }, { "foo\t", "foo\t%d", -1 }, - { "foo \t %bar1", "foo%%bar%d", 0 }, { "foo", "foo", 0 }, { "foon", "foo bar", 0 }, { "foon", "foo %d", 0 }, @@ -89,7 +88,9 @@ struct int_test { "foo bar", "foo %d", 0 }, { "foo bar", "foon%d", 0 }, { "foo ", "foo %n", 0 }, - { "foo%bar1", "foo%%bar%d", 1 } + { "foo%bar1", "foo%%bar%d", 1 }, + /* Some OSes skip whitespace here while others don't. */ + { "foo \t %bar1", "foo%%bar%d", 1 } }; int --- libc/linuxthreads/oldsemaphore.c.jj 2004-04-20 14:09:03.480202000 -0400 +++ libc/linuxthreads/oldsemaphore.c 2004-04-20 14:08:54.150202000 -0400 @@ -41,10 +41,6 @@ extern int __old_sem_post (old_sem_t *__ extern int __old_sem_getvalue (old_sem_t *__sem, int *__sval); extern int __old_sem_destroy (old_sem_t *__sem); - -/* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) - static inline int sem_compare_and_swap(old_sem_t *sem, long oldval, long newval) { return compare_and_swap(&sem->sem_status, oldval, newval, &sem->sem_spinlock); --- libc/nis/nss-nis.c.jj 2004-04-03 05:04:16.000000000 -0500 +++ libc/nis/nss-nis.c 2004-04-20 14:06:01.150202000 -0400 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include --- libc/sysdeps/sparc/sparc32/dl-machine.h.jj 2004-03-05 05:27:17.000000000 -0500 +++ libc/sysdeps/sparc/sparc32/dl-machine.h 2004-04-20 14:11:43.390202000 -0400 @@ -441,9 +441,9 @@ elf_machine_rela (struct link_map *map, { #if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP const Elf32_Sym *const refsym = sym; -#endif -#if defined USE_TLS && !defined RTLD_BOOTSTRAP +# ifdef USE_TLS struct link_map *sym_map; +# endif #endif Elf32_Addr value; #ifndef RESOLVE_CONFLICT_FIND_MAP --- libc/sysdeps/sparc/sparc64/memcmp.S.jj 2004-04-01 18:27:43.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/memcmp.S 2004-04-19 16:55:00.490202000 -0400 @@ -1,6 +1,6 @@ /* Compare two memory blocks for differences in the first COUNT bytes. For SPARC v9. - Copyright (C) 1998,1999, 2004 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jan Vondrak and Jakub Jelinek . @@ -140,4 +140,4 @@ END(memcmp) #undef bcmp weak_alias(memcmp, bcmp) -libc_hidden_builtin_def (BP_SYM (memcmp)) +libc_hidden_builtin_def (memcmp) Jakub