2002-09-04 Bruno Haible <bruno@clisp.org>
* elf/readlib.c (process_file): Conditionalize check for QMAGIC. * sysdeps/unix/sysv/linux/sigset-cvt-mask.h (sigset_set_old_mask, sigset_get_old_mask): Turn into inline functions. * sysdeps/unix/sysv/aix/sigset-cvt-mask.h (sigset_set_old_mask, sigset_get_old_mask): Likewise. * sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h (sigset_set_old_mask, sigset_get_old_mask): Likewise. * sysdeps/generic/_strerror.c (_sys_errlist, _sys_nerr): Remove default definitions. (__strerror_r): Use _sys_errlist_internal instead of _sys_errlist, _sys_nerr_internal instead of _sys_nerr. * nscd/connections.c (handle_request): Declare CALLER inside #if.
This commit is contained in:
parent
43e3d6e3e2
commit
be3c40b627
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2002-09-04 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
* elf/readlib.c (process_file): Conditionalize check for QMAGIC.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/sigset-cvt-mask.h (sigset_set_old_mask,
|
||||||
|
sigset_get_old_mask): Turn into inline functions.
|
||||||
|
* sysdeps/unix/sysv/aix/sigset-cvt-mask.h (sigset_set_old_mask,
|
||||||
|
sigset_get_old_mask): Likewise.
|
||||||
|
* sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h (sigset_set_old_mask,
|
||||||
|
sigset_get_old_mask): Likewise.
|
||||||
|
|
||||||
|
* sysdeps/generic/_strerror.c (_sys_errlist, _sys_nerr): Remove
|
||||||
|
default definitions.
|
||||||
|
(__strerror_r): Use _sys_errlist_internal instead of _sys_errlist,
|
||||||
|
_sys_nerr_internal instead of _sys_nerr.
|
||||||
|
|
||||||
|
* nscd/connections.c (handle_request): Declare CALLER inside #if.
|
||||||
|
|
||||||
2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
|
2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
|
||||||
|
|
||||||
* sysdeps/powerpc/__longjmp.S: Moved to...
|
* sysdeps/powerpc/__longjmp.S: Moved to...
|
||||||
|
|
|
@ -123,7 +123,10 @@ process_file (const char *real_file_name, const char *file_name,
|
||||||
/* First check if this is an aout file. */
|
/* First check if this is an aout file. */
|
||||||
aout_header = (struct exec *) file_contents;
|
aout_header = (struct exec *) file_contents;
|
||||||
if (N_MAGIC (*aout_header) == ZMAGIC
|
if (N_MAGIC (*aout_header) == ZMAGIC
|
||||||
|| N_MAGIC (*aout_header) == QMAGIC)
|
#ifdef QMAGIC /* Linuxism. */
|
||||||
|
|| N_MAGIC (*aout_header) == QMAGIC
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
/* Aout files don't have a soname, just return the name
|
/* Aout files don't have a soname, just return the name
|
||||||
including the major number. */
|
including the major number. */
|
||||||
|
|
|
@ -23,20 +23,23 @@
|
||||||
|
|
||||||
#if !USE_TLS || !HAVE___THREAD
|
#if !USE_TLS || !HAVE___THREAD
|
||||||
/* The definition in libc is sufficient if we use TLS. */
|
/* The definition in libc is sufficient if we use TLS. */
|
||||||
int * __errno_location()
|
int *
|
||||||
|
__errno_location (void)
|
||||||
{
|
{
|
||||||
pthread_descr self = thread_self();
|
pthread_descr self = thread_self();
|
||||||
return THREAD_GETMEM (self, p_errnop);
|
return THREAD_GETMEM (self, p_errnop);
|
||||||
}
|
}
|
||||||
|
|
||||||
int * __h_errno_location()
|
int *
|
||||||
|
__h_errno_location (void)
|
||||||
{
|
{
|
||||||
pthread_descr self = thread_self();
|
pthread_descr self = thread_self();
|
||||||
return THREAD_GETMEM (self, p_h_errnop);
|
return THREAD_GETMEM (self, p_h_errnop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return thread specific resolver state. */
|
/* Return thread specific resolver state. */
|
||||||
struct __res_state * __res_state()
|
struct __res_state *
|
||||||
|
__res_state (void)
|
||||||
{
|
{
|
||||||
pthread_descr self = thread_self();
|
pthread_descr self = thread_self();
|
||||||
return THREAD_GETMEM (self, p_resp);
|
return THREAD_GETMEM (self, p_resp);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Tests for POSIX timer implementation.
|
/* Tests for POSIX timer implementation.
|
||||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
|
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
|
||||||
|
|
||||||
|
@ -66,17 +66,7 @@ main (void)
|
||||||
.sigev_notify = SIGEV_SIGNAL,
|
.sigev_notify = SIGEV_SIGNAL,
|
||||||
.sigev_signo = ZSIGALRM
|
.sigev_signo = ZSIGALRM
|
||||||
};
|
};
|
||||||
struct sigevent sigev2 =
|
struct sigevent sigev2;
|
||||||
{
|
|
||||||
.sigev_notify = SIGEV_THREAD,
|
|
||||||
._sigev_un =
|
|
||||||
{
|
|
||||||
._sigev_thread =
|
|
||||||
{
|
|
||||||
._function = notify_func
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
struct itimerspec itimer1 = { { 0, 200000000 }, { 0, 200000000 } };
|
struct itimerspec itimer1 = { { 0, 200000000 }, { 0, 200000000 } };
|
||||||
struct itimerspec itimer2 = { { 0, 100000000 }, { 0, 500000000 } };
|
struct itimerspec itimer2 = { { 0, 100000000 }, { 0, 500000000 } };
|
||||||
struct itimerspec itimer3 = { { 0, 150000000 }, { 0, 300000000 } };
|
struct itimerspec itimer3 = { { 0, 150000000 }, { 0, 300000000 } };
|
||||||
|
@ -84,6 +74,9 @@ main (void)
|
||||||
|
|
||||||
retval = clock_gettime (CLOCK_REALTIME, &ts);
|
retval = clock_gettime (CLOCK_REALTIME, &ts);
|
||||||
|
|
||||||
|
sigev2.sigev_notify = SIGEV_THREAD;
|
||||||
|
sigev2.sigev_notify_function = notify_func;
|
||||||
|
|
||||||
setvbuf (stdout, 0, _IOLBF, 0);
|
setvbuf (stdout, 0, _IOLBF, 0);
|
||||||
|
|
||||||
printf ("clock_gettime returned %d, timespec = { %ld, %ld }\n",
|
printf ("clock_gettime returned %d, timespec = { %ld, %ld }\n",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Wrapper arpund system calls to provide cancelation points.
|
/* Wrapper arpund system calls to provide cancelation points.
|
||||||
Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
Copyright (C) 1996-1999,2000-2002 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@cygnus.com>, 1996.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
|
|
||||||
|
@ -69,6 +69,8 @@ name param_list \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define PROMOTE_INTEGRAL_TYPE(type) __typeof__ ((type) 0 + 0)
|
||||||
|
|
||||||
|
|
||||||
/* close(2). */
|
/* close(2). */
|
||||||
CANCELABLE_SYSCALL (int, close, (int fd), (fd))
|
CANCELABLE_SYSCALL (int, close, (int fd), (fd))
|
||||||
|
@ -110,13 +112,17 @@ strong_alias (nanosleep, __nanosleep)
|
||||||
|
|
||||||
/* open(2). */
|
/* open(2). */
|
||||||
CANCELABLE_SYSCALL_VA (int, open, (const char *pathname, int flags, ...),
|
CANCELABLE_SYSCALL_VA (int, open, (const char *pathname, int flags, ...),
|
||||||
(pathname, flags, va_arg (ap, mode_t)), flags)
|
(pathname, flags,
|
||||||
|
va_arg (ap, PROMOTE_INTEGRAL_TYPE (mode_t))),
|
||||||
|
flags)
|
||||||
strong_alias (open, __open)
|
strong_alias (open, __open)
|
||||||
|
|
||||||
|
|
||||||
/* open64(3). */
|
/* open64(3). */
|
||||||
CANCELABLE_SYSCALL_VA (int, open64, (const char *pathname, int flags, ...),
|
CANCELABLE_SYSCALL_VA (int, open64, (const char *pathname, int flags, ...),
|
||||||
(pathname, flags, va_arg (ap, mode_t)), flags)
|
(pathname, flags,
|
||||||
|
va_arg (ap, PROMOTE_INTEGRAL_TYPE (mode_t))),
|
||||||
|
flags)
|
||||||
strong_alias (open64, __open64)
|
strong_alias (open64, __open64)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -391,12 +391,12 @@ cannot handle old request version %d; current version is %d"),
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct ucred caller;
|
|
||||||
socklen_t optlen = sizeof (caller);
|
|
||||||
|
|
||||||
/* Some systems have no SO_PEERCRED implementation. They don't
|
/* Some systems have no SO_PEERCRED implementation. They don't
|
||||||
care about security so we don't as well. */
|
care about security so we don't as well. */
|
||||||
#ifdef SO_PEERCRED
|
#ifdef SO_PEERCRED
|
||||||
|
struct ucred caller;
|
||||||
|
socklen_t optlen = sizeof (caller);
|
||||||
|
|
||||||
if (getsockopt (fd, SOL_SOCKET, SO_PEERCRED, &caller, &optlen) < 0)
|
if (getsockopt (fd, SOL_SOCKET, SO_PEERCRED, &caller, &optlen) < 0)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
|
@ -18,8 +18,16 @@
|
||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
02111-1307 USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
#define sigset_set_old_mask(set, mask) \
|
static inline int __attribute__ ((unused))
|
||||||
((set)->__losigs = (unsigned int) (mask), (set)->__hisigs = 0, 0)
|
sigset_set_old_mask (sigset_t *set, int mask)
|
||||||
|
{
|
||||||
|
set->__losigs = (unsigned int) mask;
|
||||||
|
set->__hisigs = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#define sigset_get_old_mask(set, mask) \
|
static inline int __attribute__ ((unused))
|
||||||
((unsigned int) (set)->__losigs)
|
sigset_get_old_mask (const sigset_t *set)
|
||||||
|
{
|
||||||
|
return (unsigned int) set->__losigs;
|
||||||
|
}
|
||||||
|
|
|
@ -19,17 +19,26 @@
|
||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
02111-1307 USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
#define sigset_set_old_mask(set, mask) \
|
static inline int __attribute__ ((unused))
|
||||||
({ \
|
sigset_set_old_mask (sigset_t *set, int mask)
|
||||||
unsigned long int *__ptr; \
|
{
|
||||||
int __cnt; \
|
unsigned long int *ptr;
|
||||||
__ptr = &(set)->__val[0]; \
|
int cnt;
|
||||||
*__ptr++ = (unsigned long int) (mask); \
|
|
||||||
__cnt = _SIGSET_NWORDS - 2; \
|
|
||||||
do \
|
|
||||||
*__ptr++ = 0ul; \
|
|
||||||
while (--__cnt >= 0); \
|
|
||||||
0; })
|
|
||||||
|
|
||||||
#define sigset_get_old_mask(set) \
|
ptr = &set->__val[0];
|
||||||
((unsigned int) (set)->__val[0])
|
|
||||||
|
*ptr++ = (unsigned int) mask;
|
||||||
|
|
||||||
|
cnt = _SIGSET_NWORDS - 2;
|
||||||
|
do
|
||||||
|
*ptr++ = 0ul;
|
||||||
|
while (--cnt >= 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int __attribute__ ((unused))
|
||||||
|
sigset_get_old_mask (const sigset_t *set)
|
||||||
|
{
|
||||||
|
return (unsigned int) set->__val[0];
|
||||||
|
}
|
||||||
|
|
|
@ -19,15 +19,19 @@
|
||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
02111-1307 USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
#define sigset_set_old_mask(set, mask) \
|
static inline int __attribute__ ((unused))
|
||||||
({ \
|
sigset_set_old_mask (sigset_t *set, int mask)
|
||||||
unsigned long int *__ptr; \
|
{
|
||||||
__ptr = &(set)->__sigbits[0]; \
|
set->__sigbits[0] = (unsigned int) mask;
|
||||||
__ptr[0] = (mask); \
|
set->__sigbits[1] = 0ul;
|
||||||
__ptr[1] = 0ul; \
|
set->__sigbits[2] = 0ul;
|
||||||
__ptr[2] = 0ul; \
|
set->__sigbits[3] = 0ul;
|
||||||
__ptr[3] = 0ul; \
|
|
||||||
0; })
|
|
||||||
|
|
||||||
#define sigset_get_old_mask(set) \
|
return 0;
|
||||||
((unsigned int) (set)->__sigbits[0])
|
}
|
||||||
|
|
||||||
|
static inline int __attribute__ ((unused))
|
||||||
|
sigset_get_old_mask (const sigset_t *set)
|
||||||
|
{
|
||||||
|
return (unsigned int) set->__sigbits[0];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue