summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hints/gnu.sh33
1 files changed, 29 insertions, 4 deletions
diff --git a/hints/gnu.sh b/hints/gnu.sh
index fe251cbc90..8ec9470183 100644
--- a/hints/gnu.sh
+++ b/hints/gnu.sh
@@ -1,6 +1,5 @@
# hints/gnu.sh
-# Last modified: Thu Dec 10 20:47:28 CET 1998
-# Mark Kettenis <kettenis@phys.uva.nl>
+# Originally contributed by: Mark Kettenis <kettenis@phys.uva.nl> Dec 10 1998
# libnsl is unusable on the Hurd.
# XXX remove this once SUNRPC is implemented.
@@ -30,8 +29,34 @@ lddlflags='-shared'
# Flags needed by programs that use dynamic linking.
ccdlflags='-Wl,-E'
-# Debian bug #258618
-ccflags="-D_GNU_SOURCE $ccflags"
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags"
+ if echo $libswanted | grep -v pthread >/dev/null
+ then
+ set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
+ shift
+ libswanted="$*"
+ fi
+
+ # Somehow at least in Debian 2.2 these manage to escape
+ # the #define forest of <features.h> and <time.h> so that
+ # the hasproto macro of Configure doesn't see these protos,
+ # even with the -D_GNU_SOURCE.
+
+ d_asctime_r_proto="$define"
+ d_crypt_r_proto="$define"
+ d_ctime_r_proto="$define"
+ d_gmtime_r_proto="$define"
+ d_localtime_r_proto="$define"
+ d_random_r_proto="$define"
+
+ ;;
+esac
+EOCBU
cat > UU/uselargefiles.cbu <<'EOCBU'
# This script UU/uselargefiles.cbu will get 'called-back' by Configure