GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.6
+ GLIBC_2.7
GLIBC_PRIVATE
}
libresolv {
.*-.*-syllable.* 5 2.0.0 # just an arbitrary value
+.*-.*-opensolaris.*-gnu.* 6 2.0.0 # just an arbitrary value
+
# There is no catch-all default here because every supported OS that uses
# ELF must have its own unique ABI tag.
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
;;
-gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
+gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6* | opensolaris*-gnu*)
# These systems (almost) always use the ELF format.
elf=yes
;;
###
if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
case "$machine-$host_os" in
- *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
+ *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.* | opensolaris*-gnu*)
;;
*)
echo "*** The GNU C library is currently not available for this platform."
base_os=unix/sysv/hpux/$os ;;
aix4.3*)
base_os=unix/sysv/aix/aix4.3 ;;
+opensolaris*-gnu*)
+ base_os=unix/sysv/solaris2/opensolaris-gnu ;;
none)
base_os=standalone ;;
*)
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
;;
-gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
+gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6* | opensolaris*-gnu* )
# These systems (almost) always use the ELF format.
elf=yes
;;
###
if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
case "$machine-$host_os" in
- *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
+ *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.* | opensolaris*-gnu* )
;;
*)
echo "*** The GNU C library is currently not available for this platform."
base_os=unix/sysv/hpux/$os ;;
aix4.3*)
base_os=unix/sysv/aix/aix4.3 ;;
+opensolaris*-gnu*)
+ base_os=unix/sysv/solaris2/opensolaris-gnu ;;
none)
base_os=standalone ;;
*)
-#include <io/sys/sendfile.h>
+#include_next <sys/sendfile.h>
#ifndef _SYS_WAIT_H
-#include <posix/sys/wait.h>
+#include_next <sys/wait.h>
/* Now define the internal interfaces. */
extern __pid_t __waitpid (__pid_t __pid, int *__stat_loc,
__set_errno (ENOSYS);
return -1;
}
-stub_warning (fchownat)
+stub_warning (fchmodat)
#include <stub-tag.h>
# define SEEK_END 2 /* Seek from end of file. */
#endif /* XPG */
-#ifdef __USE_ATFILE
-# define AT_FDCWD -100 /* Special value used to indicate
- the *at functions should use the
- current working directory. */
-# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
-# define AT_REMOVEDIR 0x200 /* Remove directory instead of
- unlinking file. */
-# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
-# define AT_EACCESS 0x200 /* Test access permitted for
- effective IDs, not real IDs. */
-#endif
-
/* Do the file control operation described by CMD on FD.
The remaining arguments are interpreted depending on CMD.
while (dir.stream != NULL && (d = __readdir64 (dir.stream)) != NULL)
{
+#ifdef _DIRENT_HAVE_D_TYPE
result = process_entry (data, &dir, d->d_name, NAMLEN (d), d->d_type);
+#else
+ result = process_entry (data, &dir, d->d_name, NAMLEN (d), DT_UNKNOWN);
+#endif
if (result != 0)
break;
}
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2005,2006,2007,2008
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
#include <sys/mman.h>
#include <sys/param.h>
#include <dl-sysdep.h>
+#include <pthreadP.h>
#include <tls.h>
#include <lowlevellock.h>
#include <kernel-features.h>
static size_t stack_cache_actsize;
/* Mutex protecting this variable. */
+#ifndef lll_define_initialized
static int stack_cache_lock = LLL_LOCK_INITIALIZER;
+#else
+lll_define_initialized (static, stack_cache_lock);
+#endif
/* List of queued stack frames. */
static LIST_HEAD (stack_cache);
__pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
#endif
+#ifndef NO_FUTEX_SUPPORT
#ifndef __ASSUME_PRIVATE_FUTEX
/* The thread must know when private futexes are supported. */
pd->header.private_futex = THREAD_GETMEM (THREAD_SELF,
header.private_futex);
#endif
+#endif
#ifdef NEED_DL_SYSINFO
/* Copy the sysinfo value from the parent. */
__pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
#endif
+#ifndef NO_FUTEX_SUPPORT
#ifndef __ASSUME_PRIVATE_FUTEX
/* The thread must know when private futexes are supported. */
pd->header.private_futex = THREAD_GETMEM (THREAD_SELF,
header.private_futex);
#endif
+#endif
#ifdef NEED_DL_SYSINFO
/* Copy the sysinfo value from the parent. */
/* Initialize the lock. We have to do this unconditionally since the
stillborn thread could be canceled while the lock is taken. */
+#ifndef lll_init
pd->lock = LLL_LOCK_INITIALIZER;
+#else
+ lll_init (pd->lock);
+#endif
+#ifndef NO_ROBUST_LIST_SUPPORT
/* The robust mutex lists also need to be initialized
unconditionally because the cleanup for the previous stack owner
might have happened in the kernel. */
pd->robust_prev = &pd->robust_head;
#endif
pd->robust_head.list = &pd->robust_head;
+#endif /* NO_ROBUST_LIST_SUPPORT */
/* We place the thread descriptor at the end of the stack. */
*pdp = pd;
__nptl_nthreads = 1;
/* Initialize the lock. */
+#ifndef lll_init
stack_cache_lock = LLL_LOCK_INITIALIZER;
+#else
+ lll_init (stack_cache_lock);
+#endif
}
#endif
+#ifndef NO_SETXID_SUPPORT
static void
internal_function
setxid_signal_thread (struct xid_command *cmdp, struct pthread *t)
lll_unlock (stack_cache_lock, LLL_PRIVATE);
return result;
}
+#endif /* NO_SETXID_SUPPORT */
static inline void __attribute__((always_inline))
init_one_static_tls (struct pthread *curp, struct link_map *map)
attribute_hidden
__wait_lookup_done (void)
{
+ // TODO
+#if 0
lll_lock (stack_cache_lock, LLL_PRIVATE);
struct pthread *self = THREAD_SELF;
}
lll_unlock (stack_cache_lock, LLL_PRIVATE);
+#endif /* 0 */
}
if test $add_ons_automatic = yes; then
case "$config_os" in
*linux*) ;;
+ *opensolaris*-gnu*) ;;
*) libc_add_on= ;;
esac
fi
-/* Copyright (C) 2002-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
};
+#ifndef NO_ROBUST_LIST_SUPPORT
/* Data structure used by the kernel to find robust futexes. */
struct robust_list_head
{
long int futex_offset;
void *list_op_pending;
};
+#endif
/* Data strcture used to handle thread priority protection. */
{
int multiple_threads;
int gscope_flag;
+# ifndef NO_FUTEX_SUPPORT
# ifndef __ASSUME_PRIVATE_FUTEX
int private_futex;
# endif
+# endif
} header;
#endif
/* Thread ID - which is also a 'is this thread descriptor (and
therefore stack) used' flag. */
+#ifndef PTHREAD_T_IS_TID
pid_t tid;
+#else
+ pthread_t tid;
+#endif
/* Process ID - thread group ID in kernel speak. */
pid_t pid;
+#ifndef NO_ROBUST_LIST_SUPPORT
/* List of robust mutexes the thread is holding. */
#ifdef __PTHREAD_MUTEX_HAVE_PREV
void *robust_prev;
#endif
#define ENQUEUE_MUTEX(mutex) ENQUEUE_MUTEX_BOTH (mutex, 0)
#define ENQUEUE_MUTEX_PI(mutex) ENQUEUE_MUTEX_BOTH (mutex, 1)
+#endif /* NO_ROBUST_LIST_SUPPORT */
/* List of cleanup buffers. */
struct _pthread_cleanup_buffer *cleanup;
/* Bit set if thread terminated and TCB is freed. */
#define TERMINATED_BIT 5
#define TERMINATED_BITMASK 0x20
+#ifndef NO_SETXID_SUPPORT
/* Bit set if thread is supposed to change XID. */
#define SETXID_BIT 6
#define SETXID_BITMASK 0x40
/* Mask for the rest. Helps the compiler to optimize. */
#define CANCEL_RESTMASK 0xffffff80
+#else /* NO_SETXID_SUPPORT */
+ /* Mask for the rest. Helps the compiler to optimize. */
+#define CANCEL_RESTMASK 0xffffff40
+#endif /* NO_SETXID_SUPPORT */
#define CANCEL_ENABLED_AND_CANCELED(value) \
(((value) & (CANCELSTATE_BITMASK | CANCELED_BITMASK | EXITING_BITMASK \
int parent_cancelhandling;
/* Lock to synchronize access to the descriptor. */
+#ifndef lll_define
int lock;
+#else
+ lll_define (, lock);
+#endif
+#ifndef NO_SETXID_SUPPORT
/* Lock for synchronizing setxid calls. */
int setxid_futex;
+#endif
#if HP_TIMING_AVAIL
/* Offset of the CPU clock at start thread start time. */
/* The functions contained here do nothing, they just return. */
-#include "pthreadP.h"
+#include <pthreadP.h>
void
__nptl_create_event (void)
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2005,2006,2007,2008
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
size_t __static_tls_size;
size_t __static_tls_align_m1;
+#ifndef NO_ROBUST_LIST_SUPPORT
#ifndef __ASSUME_SET_ROBUST_LIST
/* Negative if we do not have the system call and we can use it. */
int __set_robust_list_avail;
#else
# define set_robust_list_not_avail() do { } while (0)
#endif
+#endif
/* Version of the library, used in libthread_db to detect mismatches. */
static const char nptl_version[] __attribute_used__ = VERSION;
.ptr_nthreads = &__nptl_nthreads,
.ptr___pthread_unwind = &__pthread_unwind,
.ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd,
+#ifndef NO_SETXID_SUPPORT
.ptr__nptl_setxid = __nptl_setxid,
+#endif
/* For now only the stack cache needs to be freed. */
.ptr_freeres = __free_stack_cache
};
static void
sigcancel_handler (int sig, siginfo_t *si, void *ctx)
{
+write (2, "FOO 20\n", 7);
#ifdef __ASSUME_CORRECT_SI_PID
/* Determine the process ID. It might be negative if the thread is
in the middle of a fork() call. */
other signals and send a signal from another process. This is not
correct and might even be a security problem. Try to catch as
many incorrect invocations as possible. */
+write (2, "FOO 21\n", 7);
if (sig != SIGCANCEL
#ifdef __ASSUME_CORRECT_SI_PID
/* Kernels before 2.5.75 stored the thread ID and not the process
|| si->si_pid != pid
#endif
|| si->si_code != SI_TKILL)
+{
+write (2, "FOO 22\n", 7);
return;
+}
struct pthread *self = THREAD_SELF;
int oldval = THREAD_GETMEM (self, cancelhandling);
+write (2, "FOO 23\n", 7);
while (1)
{
/* We are canceled now. When canceled by another thread this flag
/* Already canceled or exiting. */
break;
+write (2, "FOO 24\n", 7);
int curval = THREAD_ATOMIC_CMPXCHG_VAL (self, cancelhandling, newval,
oldval);
if (curval == oldval)
THREAD_SETMEM (self, result, PTHREAD_CANCELED);
/* Make sure asynchronous cancellation is still enabled. */
- if ((newval & CANCELTYPE_BITMASK) != 0)
+ if ((newval & CANCELTYPE_BITMASK) != 0) {
/* Run the registered destructors and terminate the thread. */
+write (2, "FOO 25\n", 7);
__do_cancel ();
+write (2, "FOO 26\n", 7);
+ }
break;
}
+write (2, "FOO 27\n", 7);
oldval = curval;
}
+write (2, "FOO 28\n", 7);
}
+#ifndef NO_SETXID_SUPPORT
struct xid_command *__xidcmd attribute_hidden;
/* For asynchronous cancellation we use a signal. This is the handler. */
self->setxid_futex = 1;
lll_futex_wake (&self->setxid_futex, 1, LLL_PRIVATE);
}
+#endif /* NO_SETXID_SUPPORT */
/* When using __thread for this, we do it in libc so as not
/* Minimal initialization of the thread descriptor. */
struct pthread *pd = THREAD_SELF;
INTERNAL_SYSCALL_DECL (err);
- pd->pid = pd->tid = INTERNAL_SYSCALL (set_tid_address, err, 1, &pd->tid);
+ pd->tid = INTERNAL_SYSCALL (set_tid_address, err, 1, &pd->tid);
+#ifndef PTHREAD_T_IS_TID
+ pd->pid = pd->tid;
+#else
+ pd->pid = getpid();
+#endif
THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]);
THREAD_SETMEM (pd, user_stack, true);
+#ifndef lll_init
if (LLL_LOCK_INITIALIZER != 0)
THREAD_SETMEM (pd, lock, LLL_LOCK_INITIALIZER);
+#else
+ lll_init (pd->lock);
+#endif
#if HP_TIMING_AVAIL
THREAD_SETMEM (pd, cpuclock_offset, GL(dl_cpuclock_offset));
#endif
+#ifndef NO_ROBUST_LIST_SUPPORT
/* Initialize the robust mutex data. */
#ifdef __PTHREAD_MUTEX_HAVE_PREV
pd->robust_prev = &pd->robust_head;
if (INTERNAL_SYSCALL_ERROR_P (res, err))
#endif
set_robust_list_not_avail ();
+#endif
+#ifndef NO_FUTEX_SUPPORT
#ifndef __ASSUME_PRIVATE_FUTEX
/* Private futexes are always used (at least internally) so that
doing the test once this early is beneficial. */
THREAD_SETMEM (pd, header.private_futex, FUTEX_PRIVATE_FLAG);
}
#endif
+#endif
/* Set initial thread's stack block from 0 up to __libc_stack_end.
It will be bigger than it actually is, but for unwind.c/pt-longjmp.c
(void) __libc_sigaction (SIGCANCEL, &sa, NULL);
+#ifndef NO_SETXID_SUPPORT
/* Install the handle to change the threads' uid/gid. */
sa.sa_sigaction = sighandler_setxid;
sa.sa_flags = SA_SIGINFO | SA_RESTART;
(void) __libc_sigaction (SIGSETXID, &sa, NULL);
+#endif
/* The parent process might have left the signals blocked. Just in
case, unblock it. We reuse the signal mask in the sigaction
structure. It is already cleared. */
__sigaddset (&sa.sa_mask, SIGCANCEL);
+#ifndef NO_SETXID_SUPPORT
__sigaddset (&sa.sa_mask, SIGSETXID);
+#endif
(void) INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_UNBLOCK, &sa.sa_mask,
NULL, _NSIG / 8);
/* Determine the default allowed stack size. This is the size used
in case the user does not specify one. */
struct rlimit limit;
- if (getrlimit (RLIMIT_STACK, &limit) != 0
+ if (getrlimit (RLIMIT_STACK, &limit) != 0
|| limit.rlim_cur == RLIM_INFINITY)
/* The system limit is not usable. Use an architecture-specific
default. */
keep the lock count from the ld.so implementation. */
GL(dl_rtld_lock_recursive) = (void *) INTUSE (__pthread_mutex_lock);
GL(dl_rtld_unlock_recursive) = (void *) INTUSE (__pthread_mutex_unlock);
+#ifndef __rtld_lock_recursive_reinitialize
unsigned int rtld_lock_count = GL(dl_load_lock).mutex.__data.__count;
GL(dl_load_lock).mutex.__data.__count = 0;
- while (rtld_lock_count-- > 0)
- INTUSE (__pthread_mutex_lock) (&GL(dl_load_lock).mutex);
+#else
+ unsigned int rtld_lock_count =
+ __rtld_lock_recursive_reinitialize (GL(dl_load_lock));
+#endif
+ while (rtld_lock_count-- > 0) {
+ int errval = INTUSE (__pthread_mutex_lock) (&GL(dl_load_lock).mutex);
+}
GL(dl_make_stack_executable_hook) = &__make_stacks_executable;
#endif
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2005,2006,2007,2008
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
/* Attribute handling. */
extern struct pthread_attr *__attr_list attribute_hidden;
+#ifndef lll_define
extern int __attr_list_lock attribute_hidden;
+#else
+lll_define (extern, __attr_list_lock attribute_hidden);
+#endif
/* First available RT signal. */
extern int __current_sigrtmin attribute_hidden;
/* Simplified test. This will not catch all invalid descriptors but
is better than nothing. And if the test triggers the thread
descriptor is guaranteed to be invalid. */
-# define INVALID_TD_P(pd) __builtin_expect ((pd)->tid <= 0, 0)
-# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect ((pd)->tid < 0, 0)
+# ifndef PTHREAD_T_IS_TID
+# define INVALID_TD_P(pd) __builtin_expect ((pd)->tid <= 0, 0)
+# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect ((pd)->tid < 0, 0)
+# else
+/* XXX: these macros evaluate pd twice */
+# define INVALID_TD_P(pd) __builtin_expect (!(pd) || (pd)->tid <= 0, 0)
+# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect (!(pd) || (pd)->tid < 0, 0)
+# endif
#endif
#endif
/* The signal used for asynchronous cancelation. */
-#define SIGCANCEL __SIGRTMIN
+#ifndef SIGCANCEL
+# define SIGCANCEL __SIGRTMIN
+#endif
/* Signal needed for the kernel-supported POSIX timer implementation.
/* Signal used to implement the setuid et.al. functions. */
+#ifndef NO_SETXID_SUPPORT
#define SIGSETXID (__SIGRTMIN + 1)
+#endif
/* Used to communicate with signal handler. */
extern struct xid_command *__xidcmd attribute_hidden;
/* Internal prototypes. */
/* Thread list handling. */
+#ifndef PTHREAD_T_IS_TID
extern struct pthread *__find_in_stack_list (struct pthread *pd)
attribute_hidden internal_function;
+#else
+extern struct pthread *__find_in_stack_list (pthread_t tid)
+ attribute_hidden internal_function;
+#endif
/* Deallocate a thread's stack after optionally making sure the thread
descriptor is still valid. */
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#include "pthreadP.h"
+#include <pthreadP.h>
#include <shlib-compat.h>
struct pthread_attr *__attr_list;
+#ifndef lll_define_initialized
int __attr_list_lock = LLL_LOCK_INITIALIZER;
+#else
+lll_define_initialized (, __attr_list_lock);
+#endif
int
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
#include <errno.h>
#include <signal.h>
-#include "pthreadP.h"
+#include <pthreadP.h>
#include "atomic.h"
#include <sysdep.h>
#include <kernel-features.h>
pthread_cancel (th)
pthread_t th;
{
+#ifndef PTHREAD_T_IS_TID
volatile struct pthread *pd = (volatile struct pthread *) th;
+#else
+ volatile struct pthread *pd = __find_in_stack_list (th);
+#endif
/* Make sure the descriptor is valid. */
if (INVALID_TD_P (pd))
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004,2005,2006,2007,2008
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
-#include "pthreadP.h"
+#include <pthreadP.h>
#include <hp-timing.h>
#include <ldsodefs.h>
#include <atomic.h>
struct pthread *
internal_function
+#ifndef PTHREAD_T_IS_TID
__find_in_stack_list (pd)
struct pthread *pd;
+#else
+__find_in_stack_list (tid)
+ pthread_t tid;
+#endif
{
list_t *entry;
struct pthread *result = NULL;
struct pthread *curp;
curp = list_entry (entry, struct pthread, list);
+#ifndef PTHREAD_T_IS_TID
if (curp == pd)
+#else
+ if (curp->tid == tid)
+#endif
{
result = curp;
break;
struct pthread *curp;
curp = list_entry (entry, struct pthread, list);
+#ifndef PTHREAD_T_IS_TID
if (curp == pd)
+#else
+ if (curp->tid == tid)
+#endif
{
result = curp;
break;
TERMINATED_BIT) == 0, 1))
{
/* Remove the descriptor from the list. */
+#ifndef PTHREAD_T_IS_TID
if (DEBUGGING_P && __find_in_stack_list (pd) == NULL)
/* Something is really wrong. The descriptor for a still
running thread is gone. */
abort ();
+#endif
/* Free TPP data. */
if (__builtin_expect (pd->tpp != NULL, 0))
/* Initialize resolver state pointer. */
__resp = &pd->res;
+#ifndef NO_ROBUST_LIST_SUPPORT
#ifdef __NR_set_robust_list
# ifndef __ASSUME_SET_ROBUST_LIST
if (__set_robust_list_avail >= 0)
sizeof (struct robust_list_head));
}
#endif
+#endif
/* If the parent was running cancellation handlers while creating
the thread the new thread inherited the signal mask. Reset the
the breakpoint reports TD_THR_RUN state rather than TD_THR_ZOMBIE. */
atomic_bit_set (&pd->cancelhandling, EXITING_BIT);
+#ifndef NO_ROBUST_LIST_SUPPORT
#ifndef __ASSUME_SET_ROBUST_LIST
/* If this thread has any robust mutexes locked, handle them now. */
# if __WORDSIZE == 64
while (robust != (void *) &pd->robust_head);
}
#endif
+#endif
/* If the thread is detached free the TCB. */
if (IS_DETACHED (pd))
/* Free the TCB. */
__free_tcb (pd);
+#ifndef NO_SETXID_SUPPORT
else if (__builtin_expect (pd->cancelhandling & SETXID_BITMASK, 0))
{
/* Some other thread might call any of the setXid functions and expect
/* Reset the value so that the stack can be reused. */
pd->setxid_futex = 0;
}
+#endif
/* We cannot call '_exit' here. '_exit' will terminate the process.
THREAD_COPY_POINTER_GUARD (pd);
#endif
+#if 0 // TODO
/* Determine scheduling parameters for the thread. */
if (attr != NULL
&& __builtin_expect ((iattr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0, 0)
goto errout;
}
}
-
- /* Pass the descriptor to the caller. */
- *newthread = (pthread_t) pd;
+#endif
/* Remember whether the thread is detached or not. In case of an
error we have to free the stacks of non-detached stillborn
return err;
}
+#ifndef PTHREAD_T_IS_TID
+ /* Pass the descriptor to the caller. */
+ *newthread = (pthread_t) pd;
+#else
+ /* Pass the tid to the caller. */
+ *newthread = (pthread_t) pd->tid;
+#endif
+
return 0;
}
versioned_symbol (libpthread, __pthread_create_2_1, pthread_create, GLIBC_2_1);
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
02111-1307 USA. */
#include <errno.h>
-#include "pthreadP.h"
+#include <pthreadP.h>
#include <atomic.h>
pthread_detach (th)
pthread_t th;
{
+#ifndef PTHREAD_T_IS_TID
struct pthread *pd = (struct pthread *) th;
+#else
+ struct pthread *pd = __find_in_stack_list (th);
+#endif
/* Make sure the descriptor is valid. */
if (INVALID_NOT_TERMINATED_TD_P (pd))
-/* Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
#include <stdlib.h>
#include <atomic.h>
-#include "pthreadP.h"
+#include <pthreadP.h>
static void
pthread_t threadid;
void **thread_return;
{
+#ifndef PTHREAD_T_IS_TID
struct pthread *pd = (struct pthread *) threadid;
+#else
+ struct pthread *pd = __find_in_stack_list (threadid);
+#endif
/* Make sure the descriptor is valid. */
if (INVALID_NOT_TERMINATED_TD_P (pd))
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include "pthreadP.h"
+#include <pthreadP.h>
#include <tls.h>
pthread_t
__pthread_self (void)
{
+#ifndef PTHREAD_T_IS_TID
return (pthread_t) THREAD_SELF;
+#else
+ return THREAD_GETMEM (THREAD_SELF, tid);
+#endif
}
strong_alias (__pthread_self, pthread_self)
+#include <pthreadP.h>
+#ifndef NO_SETXID_SUPPORT
#define SINGLE_THREAD
#define setegid pthread_setegid_np
#include <setegid.c>
+#else /* NO_SETXID_SUPPORT */
+stub_warning (pthread_setgid_np)
+#include <stub-tag.h>
+#endif /* NO_SETXID_SUPPORT */
+#include <pthreadP.h>
+#ifndef NO_SETXID_SUPPORT
#define SINGLE_THREAD
#define seteuid pthread_seteuid_np
#include <seteuid.c>
+#else /* NO_SETXID_SUPPORT */
+stub_warning (pthread_seteuid_np)
+#include <stub-tag.h>
+#endif /* NO_SETXID_SUPPORT */
+#include <pthreadP.h>
+#ifndef NO_SETXID_SUPPORT
#define SINGLE_THREAD
#define __setgid pthread_setgid_np
#include <setgid.c>
+#else /* NO_SETXID_SUPPORT */
+stub_warning (pthread_setgid_np)
+#include <stub-tag.h>
+#endif /* NO_SETXID_SUPPORT */
+#include <pthreadP.h>
+#ifndef NO_SETXID_SUPPORT
#define SINGLE_THREAD
#define __setregid pthread_setregid_np
#include <setregid.c>
+#else /* NO_SETXID_SUPPORT */
+stub_warning (pthread_setreuid_np)
+#include <stub-tag.h>
+#endif /* NO_SETXID_SUPPORT */
+#include <pthreadP.h>
+#ifndef NO_SETXID_SUPPORT
#define SINGLE_THREAD
#define __setresgid pthread_setresgid_np
#include <setresgid.c>
+#else /* NO_SETXID_SUPPORT */
+stub_warning (pthread_setresgid_np)
+#include <stub-tag.h>
+#endif /* NO_SETXID_SUPPORT */
+#include <pthreadP.h>
+#ifndef NO_SETXID_SUPPORT
#define SINGLE_THREAD
#define __setresuid pthread_setresuid_np
#include <setresuid.c>
+#else /* NO_SETXID_SUPPORT */
+stub_warning (pthread_setresuid_np)
+#include <stub-tag.h>
+#endif /* NO_SETXID_SUPPORT */
+#include <pthreadP.h>
+#ifndef NO_SETXID_SUPPORT
#define SINGLE_THREAD
#define __setreuid pthread_setreuid_np
#include <setreuid.c>
+#else /* NO_SETXID_SUPPORT */
+stub_warning (pthread_setreuid_np)
+#include <stub-tag.h>
+#endif /* NO_SETXID_SUPPORT */
+#include <pthreadP.h>
+#ifndef NO_SETXID_SUPPORT
#define SINGLE_THREAD
#define __setuid pthread_setuid_np
#include <setuid.c>
+#else /* NO_SETXID_SUPPORT */
+stub_warning (pthread_setuid_np)
+#include <stub-tag.h>
+#endif /* NO_SETXID_SUPPORT */
-/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
#include <errno.h>
#include <stdlib.h>
#include <atomic.h>
-#include "pthreadP.h"
+#include <pthreadP.h>
static void
const struct timespec *abstime;
{
struct pthread *self;
+#ifndef PTHREAD_T_IS_TID
struct pthread *pd = (struct pthread *) threadid;
+#else
+ struct pthread *pd = __find_in_stack_list_by_tid (thread);
+#endif
int result;
/* Make sure the descriptor is valid. */
-/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
#include <stdlib.h>
#include <atomic.h>
-#include "pthreadP.h"
+#include <pthreadP.h>
int
void **thread_return;
{
struct pthread *self;
+#ifndef PTHREAD_T_IS_TID
struct pthread *pd = (struct pthread *) threadid;
+#else
+ struct pthread *pd = __find_in_stack_list (threadid);
+#endif
/* Make sure the descriptor is valid. */
+#ifndef PTHREAD_T_IS_TID
if (DEBUGGING_P && __find_in_stack_list (pd) == NULL)
+#else
+ if ((pd) == NULL)
+#endif
/* Not a valid thread handle. */
return ESRCH;
return EDEADLK;
/* Return right away if the thread hasn't terminated yet. */
+#ifndef lll_tryjoin
if (pd->tid != 0)
+#else
+ if (lll_tryjoin (pd->tid) != 0)
+#endif
return EBUSY;
/* Wait for the thread to finish. If it is already locked something
x86_64-.*-linux.* libpthread=0 GLIBC_2.2.5
powerpc64-.*-linux.* libpthread=0 GLIBC_2.3
.*-.*-linux.* libpthread=0
+.*-opensolaris-gnu.* libpthread=0 GLIBC_2.7
#include <pthreadP.h>
#include <lowlevellock.h>
-#define DONT_NEED_AIO_MISC_COND 1
+#undef DONT_NEED_AIO_MISC_COND
#define AIO_MISC_NOTIFY(waitlist) \
do { \
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include "pthreadP.h"
+#include <pthreadP.h>
#include <jmpbuf-unwind.h>
#ifdef HAVE_FORCED_UNWIND
__cleanup_fct_attribute __attribute ((noreturn))
__pthread_unwind (__pthread_unwind_buf_t *buf)
{
+write (2, "FOO 1\n", 6);
struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
struct pthread *self = THREAD_SELF;
}
/* We simply jump to the registered setjmp buffer. */
+write (2, "FOO 7\n", 6);
__libc_unwind_longjmp ((struct __jmp_buf_tag *) ibuf->cancel_jmp_buf, 1);
#endif
/* NOTREACHED */
#include <unistd.h>
#include <sysdep.h>
+#include <pthreadP.h>
static const char banner[] =
/* Since Sun's library is based on Solaris threads we have to define a few
types to map them to POSIX threads. */
+#if 0
typedef pthread_t thread_t;
typedef pthread_key_t thread_key_t;
+#endif
+#include <thread.h>
/* Callback for iteration over threads. */
nscd-cflags += -fpie
endif
ifeq (yes,$(have-ssp))
-nscd-cflags += -fstack-protector
+#TODO
+#nscd-cflags += -fstack-protector
endif
CFLAGS-nscd.c += $(nscd-cflags)
linuxthreads
nptl
+sunlwp
* the absence of a nameserver without timing out.
*/
if (connect(EXT(statp).nssocks[ns], (struct sockaddr *)nsap,
- sizeof *nsap) < 0) {
+ nsap->sin6_family == AF_INET
+ ? sizeof (struct sockaddr_in)
+ : sizeof (struct sockaddr_in6)) < 0) {
Aerror(statp, stderr, "connect(dg)", errno,
(struct sockaddr *) nsap);
__res_iclose(statp, false);
linuxthreads
nptl
+sunlwp
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
-timestamp='2006-02-27'
+timestamp='2008-01-08'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:*)
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[45])
+ *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- i*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS_NT-*:*:*)
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[345]*)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T:Interix*:[345]*)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
+ *:GNU/OpenSolaris:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'`-gnu
+ exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
LIBC=gnulibc1
# endif
#else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
-timestamp='2006-02-27'
+timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
+ storm-chaos* | os2-emx* | rtmk-nova* | opensolaris*-gnu* )
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc64v2 | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sparcv9v2 \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc64v2-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sparcv9v2-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
;;
- m32c-*)
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
basic_machine=ns32k-sequent
os=-dynix
;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16c)
- basic_machine=cr16c-unknown
+ cr16)
+ basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-isi
os=-sysv
;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
m88k-omron*)
basic_machine=m88k-omron
;;
basic_machine=i386-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
basic_machine=i860-intel
os=-osf
;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
pbd)
basic_machine=sparc-tti
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
basic_machine=sh-hitachi
os=-hms
;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
sh64)
basic_machine=sh64-unknown
;;
basic_machine=tic6x-unknown
os=-coff
;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sparcv9v2)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -opensolaris*-gnu* )
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
x86_64-.*-linux.* DEFAULT GLIBC_2.2.5
powerpc64-.*-linux.* DEFAULT GLIBC_2.3
.*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6
+.*-.*-opensolaris-gnu.* DEFAULT GLIBC_2.7
# Configuration WORDSIZE[32|64] Alternate configuration
# ------------- ---------- -----------------------
sh.*-.*-linux.* libm=6 GLIBC_2.2
.*-.*-linux.* libm=6
.*-.*-gnu-gnu.* libm=6
+.*-.*-opensolaris-gnu.* libm=1
# We provide libc.so.6 for Linux kernel versions 2.0 and later.
alpha.*-.*-linux.* libc=6.1
sh.*-.*-linux.* libc=6 GLIBC_2.2
sparc64.*-.*-linux.* libc=6 GLIBC_2.2
.*-.*-linux.* libc=6
+.*-.*-opensolaris-gnu.* libc=1
# libmachuser.so.1 corresponds to mach/*.defs as of Utah's UK22 release.
.*-.*-gnu-gnu.* libmachuser=1
#include <sys/socket.h>
#include <netdb.h>
+/* make sure 'sun' is not defined */
+#include "../conf/portability.h"
+
/*
* Generic client creation: takes (hostname, program-number, protocol) and
* returns client handle. Default options are set, which the user can
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/i386.
-echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
-echo $ECHO_N "checking if -g produces usable source locations for assembler-with-cpp... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
+echo $ECHO_N "checking if -g produces usable source locations for assembler-with-cpp... $ECHO_C" >&6; }
if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
fi
rm -f conftest*
fi
-echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
-echo "${ECHO_T}$libc_cv_cpp_asm_debuginfo" >&6
+{ echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
+echo "${ECHO_T}$libc_cv_cpp_asm_debuginfo" >&6; }
if test $libc_cv_cpp_asm_debuginfo = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_CPP_ASM_DEBUGINFO 1
getsockname - getsockname i:ibN __getsockname getsockname
getsockopt - getsockopt i:iiiBN getsockopt
listen - listen i:ii __listen listen
-recv - recv Ci:ibni __libc_recv recv
+recv - recv Ci:ibni __libc_recv __recv recv
recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
send - send Ci:ibni __libc_send __send send
case x"$syscall" in
x-) callnum=_ ;;
*)
+ set `echo $syscall | sed -e 's/^\(.*\):\(.*\)/\1 \2/'`
+ syscall=$1; subcall=$2
# Figure out if $syscall is defined with a number in syscall.h.
- callnum=-
+ callnum=-; subcallnum=
eval `{ echo "#include <sysdep.h>";
echo "callnum=SYS_ify ($syscall)"; } |
$asm_CPP -D__OPTIMIZE__ - |
sed -n -e "/^callnum=.*$syscall/d" \
-e "/^\(callnum=\)[ ]*\(.*\)/s//\1'\2'/p"`
+ if test ! -z "$subcall" ; then
+ # Figure out if $subcall is defined with a number in syscall.h.
+ subcallnum=
+ eval `{ echo "#include <sysdep.h>";
+ echo "subcallnum=SYS_ify (SUB_$subcall)"; } |
+ $asm_CPP -D__OPTIMIZE__ - |
+ sed -n -e "/^subcallnum=.*$subcall/d" \
+ -e "/^\(subcallnum=\)[ ]*\(.*\)/s//\1'\2'/p"`
+ fi
;;
esac
# Make sure only the first syscall rule is used, if multiple dirs
# define the same syscall.
echo ''
- echo "#### CALL=$file NUMBER=$callnum ARGS=$args SOURCE=$srcfile"
+ echo "#### CALL=$file NUMBER=$callnum SUBNUMBER=$subcallnum ARGS=$args SOURCE=$srcfile"
case x$srcfile"$callnum" in
x--)
(echo '/* Dummy module requested by syscalls.list */'; \\"
;;
x*)
+ case x"$subcallnum" in
+ x) pseudo_line="PSEUDO$noerrno ($strong, $syscall, $nargs)";;
+ *) pseudo_line="PSEUDO_SUBCALL$noerrno ($strong, $syscall, $subcall, `expr $nargs + 1`)";;
+ esac
+
echo "\
\$(make-target-directory)
(echo '#include <sysdep$cancellable.h>'; \\
- echo 'PSEUDO$noerrno ($strong, $syscall, $nargs)'; \\
+ echo '$pseudo_line'; \\
echo ' ret$noerrno'; \\
echo 'PSEUDO_END$noerrno($strong)'; \\
echo 'libc_hidden_def ($strong)'; \\"
#ifdef __ASSUME_O_CLOEXEC
# define check_have_o_cloexec(fd) 1
#else
+#ifdef O_CLOEXEC
static int
check_have_o_cloexec (int fd)
{
return __have_o_cloexec > 0;
}
#endif
+#endif
DIR *