mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
2004-04-20 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/shm_open.c (shm_unlink): Change EPERM into EACCES. 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. * nis/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. 2004-04-20 Jim Meyering <jim@meyering.net> * misc/error.c (error_tail): Don't leak upon realloc failure. 2004-04-20 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): Use RETURN_ADDRESS instead of __builtin_return_address.
This commit is contained in:
27
ChangeLog
27
ChangeLog
@ -1,3 +1,30 @@
|
|||||||
|
2004-04-20 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/shm_open.c (shm_unlink): Change EPERM into
|
||||||
|
EACCES.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
* nis/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.
|
||||||
|
|
||||||
|
2004-04-20 Jim Meyering <jim@meyering.net>
|
||||||
|
|
||||||
|
* misc/error.c (error_tail): Don't leak upon realloc failure.
|
||||||
|
|
||||||
|
2004-04-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable):
|
||||||
|
Use RETURN_ADDRESS instead of __builtin_return_address.
|
||||||
|
|
||||||
2004-04-19 Ulrich Drepper <drepper@redhat.com>
|
2004-04-19 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/mq_unlink.c: Rewrite to produce more
|
* sysdeps/unix/sysv/linux/mq_unlink.c: Rewrite to produce more
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2004-04-20 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* oldsemaphore.c (SEM_VALUE_MAX): Remove.
|
||||||
|
|
||||||
2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
|
* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
|
||||||
|
@ -41,10 +41,6 @@ extern int __old_sem_post (old_sem_t *__sem);
|
|||||||
extern int __old_sem_getvalue (old_sem_t *__sem, int *__sval);
|
extern int __old_sem_getvalue (old_sem_t *__sem, int *__sval);
|
||||||
extern int __old_sem_destroy (old_sem_t *__sem);
|
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)
|
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);
|
return compare_and_swap(&sem->sem_status, oldval, newval, &sem->sem_spinlock);
|
||||||
|
13
misc/error.c
13
misc/error.c
@ -1,5 +1,5 @@
|
|||||||
/* Error handler for noninteractive utilities
|
/* Error handler for noninteractive utilities
|
||||||
Copyright (C) 1990-1998, 2000-2002, 2003 Free Software Foundation, Inc.
|
Copyright (C) 1990-1998, 2000-2003, 2004 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library. Its master source is NOT part of
|
This file is part of the GNU C Library. Its master source is NOT part of
|
||||||
the C library, however. The master source lives in /gd/gnu/lib.
|
the C library, however. The master source lives in /gd/gnu/lib.
|
||||||
|
|
||||||
@ -192,18 +192,19 @@ error_tail (int status, int errnum, const char *message, va_list args)
|
|||||||
if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
|
if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
|
||||||
wmessage = NULL;
|
wmessage = NULL;
|
||||||
|
|
||||||
wmessage = (wchar_t *) realloc (wmessage,
|
wchar_t *p = (wchar_t *) realloc (wmessage,
|
||||||
len * sizeof (wchar_t));
|
len * sizeof (wchar_t));
|
||||||
|
if (p == NULL)
|
||||||
if (wmessage == NULL)
|
|
||||||
{
|
{
|
||||||
|
free (wmessage);
|
||||||
fputws_unlocked (L"out of memory\n", stderr);
|
fputws_unlocked (L"out of memory\n", stderr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
wmessage = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset (&st, '\0', sizeof (st));
|
memset (&st, '\0', sizeof (st));
|
||||||
tmp =message;
|
tmp = message;
|
||||||
}
|
}
|
||||||
while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
|
while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdio_ext.h>
|
#include <stdio_ext.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <rpcsvc/ypclnt.h>
|
#include <rpcsvc/ypclnt.h>
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2004-04-20 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sem_unlink.c (sem_unlink): Change EPERM into EACCES.
|
||||||
|
|
||||||
2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
|
* sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
@ -60,5 +60,8 @@ sem_unlink (name)
|
|||||||
name, namelen + 1);
|
name, namelen + 1);
|
||||||
|
|
||||||
/* Now try removing it. */
|
/* Now try removing it. */
|
||||||
return unlink (fname);
|
int ret = unlink (fname);
|
||||||
|
if (ret < 0 && errno == EPERM)
|
||||||
|
__set_errno (EACCES);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,6 @@ struct int_test
|
|||||||
{ "foo\t", "foo bar", -1 },
|
{ "foo\t", "foo bar", -1 },
|
||||||
{ "foo\t", "foo %d", -1 },
|
{ "foo\t", "foo %d", -1 },
|
||||||
{ "foo\t", "foo\t%d", -1 },
|
{ "foo\t", "foo\t%d", -1 },
|
||||||
{ "foo \t %bar1", "foo%%bar%d", 0 },
|
|
||||||
{ "foo", "foo", 0 },
|
{ "foo", "foo", 0 },
|
||||||
{ "foon", "foo bar", 0 },
|
{ "foon", "foo bar", 0 },
|
||||||
{ "foon", "foo %d", 0 },
|
{ "foon", "foo %d", 0 },
|
||||||
@ -89,7 +88,9 @@ struct int_test
|
|||||||
{ "foo bar", "foo %d", 0 },
|
{ "foo bar", "foo %d", 0 },
|
||||||
{ "foo bar", "foon%d", 0 },
|
{ "foo bar", "foon%d", 0 },
|
||||||
{ "foo ", "foo %n", 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
|
int
|
||||||
|
@ -543,8 +543,7 @@ _IO_vfscanf (s, format, argptr, errp)
|
|||||||
/* Find the conversion specifier. */
|
/* Find the conversion specifier. */
|
||||||
fc = *f++;
|
fc = *f++;
|
||||||
if (skip_space || (fc != L_('[') && fc != L_('c')
|
if (skip_space || (fc != L_('[') && fc != L_('c')
|
||||||
&& fc != L_('C') && fc != L_('n')
|
&& fc != L_('C') && fc != L_('n')))
|
||||||
&& fc != L_('%')))
|
|
||||||
{
|
{
|
||||||
/* Eat whitespace. */
|
/* Eat whitespace. */
|
||||||
int save_errno = errno;
|
int save_errno = errno;
|
||||||
|
@ -441,9 +441,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|||||||
{
|
{
|
||||||
#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
|
#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
|
||||||
const Elf32_Sym *const refsym = sym;
|
const Elf32_Sym *const refsym = sym;
|
||||||
#endif
|
# ifdef USE_TLS
|
||||||
#if defined USE_TLS && !defined RTLD_BOOTSTRAP
|
|
||||||
struct link_map *sym_map;
|
struct link_map *sym_map;
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
Elf32_Addr value;
|
Elf32_Addr value;
|
||||||
#ifndef RESOLVE_CONFLICT_FIND_MAP
|
#ifndef RESOLVE_CONFLICT_FIND_MAP
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Compare two memory blocks for differences in the first COUNT bytes.
|
/* Compare two memory blocks for differences in the first COUNT bytes.
|
||||||
For SPARC v9.
|
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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Jan Vondrak <jvon4518@ss1000.ms.mff.cuni.cz> and
|
Contributed by Jan Vondrak <jvon4518@ss1000.ms.mff.cuni.cz> and
|
||||||
Jakub Jelinek <jj@ultra.linux.cz>.
|
Jakub Jelinek <jj@ultra.linux.cz>.
|
||||||
@ -140,4 +140,4 @@ END(memcmp)
|
|||||||
|
|
||||||
#undef bcmp
|
#undef bcmp
|
||||||
weak_alias(memcmp, bcmp)
|
weak_alias(memcmp, bcmp)
|
||||||
libc_hidden_builtin_def (BP_SYM (memcmp))
|
libc_hidden_builtin_def (memcmp)
|
||||||
|
@ -37,7 +37,7 @@ _dl_make_stack_executable (void **stack_endp)
|
|||||||
& -(intptr_t) GLRO(dl_pagesize));
|
& -(intptr_t) GLRO(dl_pagesize));
|
||||||
|
|
||||||
/* Challenge the caller. */
|
/* Challenge the caller. */
|
||||||
if (__builtin_expect (__check_caller (__builtin_return_address (0),
|
if (__builtin_expect (__check_caller (RETURN_ADDRESS (0),
|
||||||
allow_ldso|allow_libpthread) != 0, 0)
|
allow_ldso|allow_libpthread) != 0, 0)
|
||||||
|| __builtin_expect (*stack_endp != __libc_stack_end, 0))
|
|| __builtin_expect (*stack_endp != __libc_stack_end, 0))
|
||||||
return EPERM;
|
return EPERM;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -227,7 +227,10 @@ shm_unlink (const char *name)
|
|||||||
name, namelen + 1);
|
name, namelen + 1);
|
||||||
|
|
||||||
/* And remove the file. */
|
/* And remove the file. */
|
||||||
return unlink (fname);
|
int ret = unlink (fname);
|
||||||
|
if (ret < 0 && errno == EPERM)
|
||||||
|
__set_errno (EACCES);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user