public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Tiny libc fixes
@ 2004-04-20 15:22 Jakub Jelinek
  2004-04-20 15:36 ` Petter Reinholdtsen
  2004-04-20 18:54 ` Ulrich Drepper
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Jelinek @ 2004-04-20 15:22 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

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  <jakub@redhat.com>

	* 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 <ctype.h>
 #include <stdio.h>
 #include <stdio_ext.h>
+#include <stdlib.h>
 #include <string.h>
 #include <rpcsvc/ypclnt.h>
 
--- 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 <jvon4518@ss1000.ms.mff.cuni.cz> and
                   Jakub Jelinek <jj@ultra.linux.cz>.
@@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-20 18:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-20 15:22 [PATCH] Tiny libc fixes Jakub Jelinek
2004-04-20 15:36 ` Petter Reinholdtsen
2004-04-20 18:54 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).