mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* stdio-common/tst-sscanf.c (val_double): Append .0 to large whole
number literals, so they are doubles instead of ints.
This commit is contained in:
parent
ce460d04a5
commit
3021e36d98
@ -1,3 +1,8 @@
|
|||||||
|
2002-10-11 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
|
* stdio-common/tst-sscanf.c (val_double): Append .0 to large whole
|
||||||
|
number literals, so they are doubles instead of ints.
|
||||||
|
|
||||||
2002-10-09 Roland McGrath <roland@redhat.com>
|
2002-10-09 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
|
* sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
2002-10-09 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
|
||||||
|
Under [__PIC__], call the function via the pointer fetched for
|
||||||
|
comparison rather than a call by name that uses the PLT.
|
||||||
|
(__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
|
||||||
|
(__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
|
||||||
|
(__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
|
||||||
|
(__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
|
||||||
|
(__libc_key_create, __libc_getspecific, __libc_setspecific)
|
||||||
|
(__libc_atfork): Use it.
|
||||||
|
|
||||||
|
* pthread.c [SHARED] (__libc_dl_error_tsd): New function.
|
||||||
|
(pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
|
||||||
|
* Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
|
||||||
|
(ld: GLIBC_PRIVATE): Set removed.
|
||||||
|
|
||||||
2002-10-11 Ulrich Drepper <drepper@redhat.com>
|
2002-10-11 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/execve.c: New file.
|
* sysdeps/unix/sysv/linux/execve.c: New file.
|
||||||
|
@ -21,14 +21,7 @@ libc {
|
|||||||
# Internal libc interface to libpthread
|
# Internal libc interface to libpthread
|
||||||
__libc_internal_tsd_get; __libc_internal_tsd_set;
|
__libc_internal_tsd_get; __libc_internal_tsd_set;
|
||||||
__libc_internal_tsd_address; __libc_alloca_cutoff;
|
__libc_internal_tsd_address; __libc_alloca_cutoff;
|
||||||
}
|
__libc_dl_error_tsd;
|
||||||
}
|
|
||||||
|
|
||||||
ld {
|
|
||||||
GLIBC_PRIVATE {
|
|
||||||
# Internal libc interface to libpthread
|
|
||||||
__libc_internal_tsd_get; __libc_internal_tsd_set;
|
|
||||||
__libc_internal_tsd_address;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,6 +418,19 @@ __pthread_init_max_stacksize(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SHARED
|
||||||
|
# if USE___THREAD
|
||||||
|
/* When using __thread for this, we do it in libc so as not
|
||||||
|
to give libpthread its own TLS segment just for this. */
|
||||||
|
extern void **__libc_dl_error_tsd (void) __attribute__ ((const));
|
||||||
|
# else
|
||||||
|
static void ** __attribute__ ((const))
|
||||||
|
__libc_dl_error_tsd (void)
|
||||||
|
{
|
||||||
|
return &thread_self ()->p_libc_specific[_LIBC_TSD_KEY_DL_ERROR];
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static void pthread_initialize(void)
|
static void pthread_initialize(void)
|
||||||
{
|
{
|
||||||
@ -498,6 +511,10 @@ static void pthread_initialize(void)
|
|||||||
__on_exit (pthread_onexit_process, NULL);
|
__on_exit (pthread_onexit_process, NULL);
|
||||||
/* How many processors. */
|
/* How many processors. */
|
||||||
__pthread_smp_kernel = is_smp_system ();
|
__pthread_smp_kernel = is_smp_system ();
|
||||||
|
|
||||||
|
#ifdef SHARED
|
||||||
|
GL(dl_error_catch_tsd) = &__libc_dl_error_tsd;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void __pthread_initialize(void)
|
void __pthread_initialize(void)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* libc-internal interface for mutex locks. LinuxThreads version.
|
/* libc-internal interface for mutex locks. LinuxThreads version.
|
||||||
Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
Copyright (C) 1996,1997,1998,1999,2000,2001,2002
|
||||||
|
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
|
||||||
@ -81,12 +82,21 @@ typedef pthread_key_t __libc_key_t;
|
|||||||
#define _LIBC_LOCK_RECURSIVE_INITIALIZER \
|
#define _LIBC_LOCK_RECURSIVE_INITIALIZER \
|
||||||
{PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
|
{PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
|
||||||
|
|
||||||
|
#ifdef __PIC__
|
||||||
|
#define __libc_maybe_call(FUNC, ARGS, ELSE) \
|
||||||
|
(__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \
|
||||||
|
_fn != NULL ? (*_fn) ARGS : ELSE; }))
|
||||||
|
#else
|
||||||
|
#define __libc_maybe_call(FUNC, ARGS, ELSE) \
|
||||||
|
(FUNC != NULL ? FUNC ARGS : ELSE)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialize the named lock variable, leaving it in a consistent, unlocked
|
/* Initialize the named lock variable, leaving it in a consistent, unlocked
|
||||||
state. */
|
state. */
|
||||||
#define __libc_lock_init(NAME) \
|
#define __libc_lock_init(NAME) \
|
||||||
(__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0);
|
(__libc_maybe_call (__pthread_mutex_init, (&(NAME), NULL), 0))
|
||||||
#define __libc_rwlock_init(NAME) \
|
#define __libc_rwlock_init(NAME) \
|
||||||
(__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0);
|
(__libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0));
|
||||||
|
|
||||||
/* Same as last but this time we initialize a recursive mutex. */
|
/* Same as last but this time we initialize a recursive mutex. */
|
||||||
#define __libc_lock_init_recursive(NAME) \
|
#define __libc_lock_init_recursive(NAME) \
|
||||||
@ -105,42 +115,40 @@ typedef pthread_key_t __libc_key_t;
|
|||||||
used again until __libc_lock_init is called again on it. This must be
|
used again until __libc_lock_init is called again on it. This must be
|
||||||
called on a lock variable before the containing storage is reused. */
|
called on a lock variable before the containing storage is reused. */
|
||||||
#define __libc_lock_fini(NAME) \
|
#define __libc_lock_fini(NAME) \
|
||||||
(__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0);
|
(__libc_maybe_call (__pthread_mutex_destroy, (&(NAME)), 0));
|
||||||
#define __libc_rwlock_fini(NAME) \
|
#define __libc_rwlock_fini(NAME) \
|
||||||
(__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0);
|
(__libc_maybe_call (__pthread_rwlock_destroy, (&(NAME)), 0));
|
||||||
|
|
||||||
/* Finalize recursive named lock. */
|
/* Finalize recursive named lock. */
|
||||||
#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex)
|
#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex)
|
||||||
|
|
||||||
/* Lock the named lock variable. */
|
/* Lock the named lock variable. */
|
||||||
#define __libc_lock_lock(NAME) \
|
#define __libc_lock_lock(NAME) \
|
||||||
(__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0);
|
(__libc_maybe_call (__pthread_mutex_lock, (&(NAME)), 0));
|
||||||
#define __libc_rwlock_rdlock(NAME) \
|
#define __libc_rwlock_rdlock(NAME) \
|
||||||
(__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0);
|
(__libc_maybe_call (__pthread_rwlock_rdlock, (&(NAME)), 0));
|
||||||
#define __libc_rwlock_wrlock(NAME) \
|
#define __libc_rwlock_wrlock(NAME) \
|
||||||
(__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0);
|
(__libc_maybe_call (__pthread_rwlock_wrlock, (&(NAME)), 0));
|
||||||
|
|
||||||
/* Lock the recursive named lock variable. */
|
/* Lock the recursive named lock variable. */
|
||||||
#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex)
|
#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex)
|
||||||
|
|
||||||
/* Try to lock the named lock variable. */
|
/* Try to lock the named lock variable. */
|
||||||
#define __libc_lock_trylock(NAME) \
|
#define __libc_lock_trylock(NAME) \
|
||||||
(__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0)
|
(__libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0))
|
||||||
#define __libc_rwlock_tryrdlock(NAME) \
|
#define __libc_rwlock_tryrdlock(NAME) \
|
||||||
(__pthread_rwlock_tryrdlock != NULL \
|
(__libc_maybe_call (__pthread_rwlock_tryrdlock, (&(NAME)), 0))
|
||||||
? __pthread_rwlock_tryrdlock (&(NAME)) : 0)
|
|
||||||
#define __libc_rwlock_trywrlock(NAME) \
|
#define __libc_rwlock_trywrlock(NAME) \
|
||||||
(__pthread_rwlock_trywrlock != NULL \
|
(__libc_maybe_call (__pthread_rwlock_trywrlock, (&(NAME)), 0))
|
||||||
? __pthread_rwlock_trywrlock (&(NAME)) : 0)
|
|
||||||
|
|
||||||
/* Try to lock the recursive named lock variable. */
|
/* Try to lock the recursive named lock variable. */
|
||||||
#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex)
|
#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex)
|
||||||
|
|
||||||
/* Unlock the named lock variable. */
|
/* Unlock the named lock variable. */
|
||||||
#define __libc_lock_unlock(NAME) \
|
#define __libc_lock_unlock(NAME) \
|
||||||
(__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0);
|
(__libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0));
|
||||||
#define __libc_rwlock_unlock(NAME) \
|
#define __libc_rwlock_unlock(NAME) \
|
||||||
(__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0);
|
(__libc_maybe_call (__pthread_rwlock_unlock, (&(NAME)), 0));
|
||||||
|
|
||||||
/* Unlock the recursive named lock variable. */
|
/* Unlock the recursive named lock variable. */
|
||||||
#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex)
|
#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex)
|
||||||
@ -192,20 +200,20 @@ typedef pthread_key_t __libc_key_t;
|
|||||||
|
|
||||||
/* Create thread-specific key. */
|
/* Create thread-specific key. */
|
||||||
#define __libc_key_create(KEY, DESTRUCTOR) \
|
#define __libc_key_create(KEY, DESTRUCTOR) \
|
||||||
(__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1)
|
(__libc_maybe_call (__pthread_key_create, (KEY, DESTRUCTOR), 1))
|
||||||
|
|
||||||
/* Get thread-specific data. */
|
/* Get thread-specific data. */
|
||||||
#define __libc_getspecific(KEY) \
|
#define __libc_getspecific(KEY) \
|
||||||
(__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL)
|
(__libc_maybe_call (__pthread_getspecific, (KEY), NULL))
|
||||||
|
|
||||||
/* Set thread-specific data. */
|
/* Set thread-specific data. */
|
||||||
#define __libc_setspecific(KEY, VALUE) \
|
#define __libc_setspecific(KEY, VALUE) \
|
||||||
(__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0)
|
(__libc_maybe_call (__pthread_setspecific, (KEY, VALUE), 0))
|
||||||
|
|
||||||
|
|
||||||
/* Register handlers to execute before and after `fork'. */
|
/* Register handlers to execute before and after `fork'. */
|
||||||
#define __libc_atfork(PREPARE, PARENT, CHILD) \
|
#define __libc_atfork(PREPARE, PARENT, CHILD) \
|
||||||
(__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0)
|
(__libc_maybe_call (__pthread_atfork, (PREPARE, PARENT, CHILD), 0))
|
||||||
|
|
||||||
/* Functions that are used by this file and are internal to the GNU C
|
/* Functions that are used by this file and are internal to the GNU C
|
||||||
library. */
|
library. */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* 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 Jakub Jelinek <jakub@redhat.com>, 2000.
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
|
||||||
|
|
||||||
@ -33,7 +33,8 @@ const double val_double[] =
|
|||||||
{
|
{
|
||||||
-.10000E+02, 0.20000E+02, 0.25000E+01, 0.40000E+01, 0.50000E+01, 0.12500E+01,
|
-.10000E+02, 0.20000E+02, 0.25000E+01, 0.40000E+01, 0.50000E+01, 0.12500E+01,
|
||||||
0.10000E+02, 0.20000E+02, 0.25000E+01, 0.40000E+01, 0.50000E+01, 0.12500E+01,
|
0.10000E+02, 0.20000E+02, 0.25000E+01, 0.40000E+01, 0.50000E+01, 0.12500E+01,
|
||||||
-1234567E01, 98765432E09, 12345678901, 98765432109, 12345678901, 98765432109,
|
-1234567E01, 98765432E09, 12345678901.0, 98765432109.0, 12345678901.0,
|
||||||
|
98765432109.0,
|
||||||
-0.1000E+02, 0.20000E+02, 0.25000E+01, 0.40000E+01, 0.50000E+01, 0.12500E+01
|
-0.1000E+02, 0.20000E+02, 0.25000E+01, 0.40000E+01, 0.50000E+01, 0.12500E+01
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user