diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-10-04 16:35:54 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-10-04 16:35:54 +0000 |
commit | 3078cba2f7272dab753c45b733af2e693e86d83c (patch) | |
tree | 1bd3c12657d1fb27b372907ee74798ef04023ba8 | |
parent | 91a3b2ad2e819a7fa14b8f9773856e4303a8c99a (diff) | |
download | glibc-3078cba2f7272dab753c45b733af2e693e86d83c.tar.gz |
Update.
* nscd/connections.c (start_threads): Use sysconf in case
_POSIX_CLOCK_SELECTION or _POSIX_MONOTONIC_CLOCK is not greater zero.
* nscd/nscd.c: Remove getaddrinfo stub definition.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | linuxthreads/ChangeLog | 8 | ||||
-rw-r--r-- | linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h | 6 | ||||
-rw-r--r-- | linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h | 6 | ||||
-rw-r--r-- | linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h | 6 | ||||
-rw-r--r-- | linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h | 6 | ||||
-rw-r--r-- | nscd/connections.c | 12 | ||||
-rw-r--r-- | nscd/nscd.c | 13 |
8 files changed, 46 insertions, 15 deletions
@@ -1,7 +1,11 @@ 2004-10-04 Ulrich Drepper <drepper@redhat.com> + * nscd/connections.c (start_threads): Use sysconf in case + _POSIX_CLOCK_SELECTION or _POSIX_MONOTONIC_CLOCK is not greater zero. + * nscd/Makefile (nscd-modules): Add gai. * nscd/gai.c: New file. + * nscd/nscd.c: Remove getaddrinfo stub definition. * assert/assert.h: Give up on using __builtin_expect. diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 6f95f03462..35debfa020 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,11 @@ +2004-10-04 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define + _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1. + * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise. + 2004-09-25 Roland McGrath <roland@redhat.com> [BZ #406] diff --git a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h index 06fd0a29b2..1a0f4e0142 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h @@ -132,7 +132,13 @@ /* POSIX message queues are available. */ #define _POSIX_MESSAGE_PASSING 200112L +/* Thread process-shared synchronization is not supported. */ +#define _POSIX_THREAD_PROCESS_SHARED -1 + /* The monotonic clock might be available. */ #define _POSIX_MONOTONIC_CLOCK 0 +/* The clock selection interfaces are not available. */ +#define _POSIX_CLOCK_SELECTION -1 + #endif /* posix_opt.h */ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h index 18a840ed98..7a4aa8011e 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h @@ -138,7 +138,13 @@ /* POSIX message queues are available. */ #define _POSIX_MESSAGE_PASSING 200112L +/* Thread process-shared synchronization is not supported. */ +#define _POSIX_THREAD_PROCESS_SHARED -1 + /* The monotonic clock might be available. */ #define _POSIX_MONOTONIC_CLOCK 0 +/* The clock selection interfaces are not available. */ +#define _POSIX_CLOCK_SELECTION -1 + #endif /* posix_opt.h */ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h index 07780df9c1..0d7d73c78f 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h @@ -138,7 +138,13 @@ /* POSIX message queues are available. */ #define _POSIX_MESSAGE_PASSING 200112L +/* Thread process-shared synchronization is not supported. */ +#define _POSIX_THREAD_PROCESS_SHARED -1 + /* The monotonic clock might be available. */ #define _POSIX_MONOTONIC_CLOCK 0 +/* The clock selection interfaces are not available. */ +#define _POSIX_CLOCK_SELECTION -1 + #endif /* posix_opt.h */ diff --git a/linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h b/linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h index 3a5fc7a1e1..b45d121f64 100644 --- a/linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h +++ b/linuxthreads/sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h @@ -138,7 +138,13 @@ /* POSIX message queues are available. */ #define _POSIX_MESSAGE_PASSING 200112L +/* Thread process-shared synchronization is not supported. */ +#define _POSIX_THREAD_PROCESS_SHARED -1 + /* The monotonic clock might be available. */ #define _POSIX_MONOTONIC_CLOCK 0 +/* The clock selection interfaces are not available. */ +#define _POSIX_CLOCK_SELECTION -1 + #endif /* posix_opt.h */ diff --git a/nscd/connections.c b/nscd/connections.c index 45042beaab..aae798ed47 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -1455,10 +1455,18 @@ start_threads (void) pthread_condattr_t condattr; pthread_condattr_init (&condattr); -#if _POSIX_CLOCK_SELECTION >= 0 && _POSIX_MONOTONIC_CLOCK >= 0 +#if defined _POSIX_CLOCK_SELECTION && _POSIX_CLOCK_SELECTION >= 0 \ + && defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 /* Determine whether the monotonous clock is available. */ struct timespec dummy; - if (clock_getres (CLOCK_MONOTONIC, &dummy) == 0 + if ( +# if _POSIX_MONOTONIC_CLOCK == 0 + sysconf (_SC_MONOTONIC_CLOCK) > 0 && +# endif +# if _POSIX_CLOCK_SELECTION == 0 + sysconf (_SC_CLOCK_SELECTION) > 0 && +# endif + clock_getres (CLOCK_MONOTONIC, &dummy) == 0 && pthread_condattr_setclock (&condattr, CLOCK_MONOTONIC) == 0) timeout_clock = CLOCK_MONOTONIC; #endif diff --git a/nscd/nscd.c b/nscd/nscd.c index 0ef54bcf08..0cc1818d9d 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -502,16 +502,3 @@ write_pid (const char *file) return 0; } - - -/* This is an ugly hack which prevents getaddrinfo from being dragged - into nscd. There currently is no special getaddrinfo version for - use in nscd. In case it should be necessary such a version must be - created and this dummy version should be removed. */ -extern void getaddrinfo (void) __attribute ((visibility ("hidden"))); - -void -getaddrinfo (void) -{ - abort (); -} |