sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\
$(firstword $(subst :, ,$p))))
+# $(libpthread-routines-var) and $(librt-routines-var) are the make
+# variable to which pthread routines need to be added to land in the
+# right library.
+ifeq ($(pthread-in-libc),yes)
+libpthread-routines-var = routines
+librt-routines-var = routines
+else
+libpthread-routines-var = libpthread-routines
+librt-routines-var = libpthread-routines
+endif
+
# A sysdeps Makeconfig fragment may set libc-reentrant to yes.
ifeq (yes,$(libc-reentrant))
defines += -D_LIBC_REENTRANT
multiple symbol versions for one symbol. */
#define SYMVER_NEEDS_ALIAS 0
+/* Define to 1 if libpthread actually resides in libc. */
+#define PTHREAD_IN_LIBC 0
+
/*
\f */
build-hardcoded-path-in-tests= @hardcoded_path_in_tests@
build-pt-chown = @build_pt_chown@
have-tunables = @have_tunables@
+pthread-in-libc = @pthread_in_libc@
# Build tools.
CC = @CC@
enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
+pthread_in_libc
RELEASE
VERSION
mach_interface_list
libc_cv_localstatedir=$localstatedir
libc_cv_gcc_unwind_find_fde=no
libc_cv_idn=no
+pthread_in_libc=yes
# Iterate over all the sysdep directories we will use, running their
# configure fragments.
+if test "$pthread_in_libc" = yes; then
+ $as_echo "#define PTHREAD_IN_LIBC 1" >>confdefs.h
+
+fi
+
+
ac_config_files="$ac_config_files config.make Makefile"
ac_config_commands="$ac_config_commands default"
libc_cv_localstatedir=$localstatedir
libc_cv_gcc_unwind_find_fde=no
libc_cv_idn=no
+pthread_in_libc=yes
# Iterate over all the sysdep directories we will use, running their
# configure fragments.
AC_SUBST(VERSION)
AC_SUBST(RELEASE)
+if test "$pthread_in_libc" = yes; then
+ AC_DEFINE(PTHREAD_IN_LIBC)
+fi
+AC_SUBST(pthread_in_libc)
+
AC_CONFIG_FILES([config.make Makefile])
AC_CONFIG_COMMANDS([default],[[
case $CONFIG_FILES in *config.make*)
$(timer-routines) \
$(shm-routines) $(mq-routines)
+$(librt-routines-var) = \
+
tests := tst-shm tst-timer tst-timer2 \
tst-aio tst-aio64 tst-aio2 tst-aio3 tst-aio4 tst-aio5 tst-aio6 \
tst-aio7 tst-aio8 tst-aio9 tst-aio10 \
if test -n "$sysheaders"; then
CPPFLAGS=$OLD_CPPFLAGS
fi
+
+# Hurd has libpthread as a separate library.
+pthread_in_libc=no
if test -n "$sysheaders"; then
CPPFLAGS=$OLD_CPPFLAGS
fi
+
+# Hurd has libpthread as a separate library.
+pthread_in_libc=no
cnd_destroy cnd_init cnd_signal cnd_timedwait cnd_wait \
tss_create tss_delete tss_get tss_set
+$(libpthread-routines-var) += \
+
+
tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \
tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \
tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock \