From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Tiny libc fixes
Date: Tue, 20 Apr 2004 15:22:00 -0000 [thread overview]
Message-ID: <20040420131028.GA5191@sunsite.ms.mff.cuni.cz> (raw)
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
next reply other threads:[~2004-04-20 15:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-20 15:22 Jakub Jelinek [this message]
2004-04-20 15:36 ` Petter Reinholdtsen
2004-04-20 18:54 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040420131028.GA5191@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).