Bug#825020: perl: does not support error strings any more on hurd-i386

Samuel Thibault sthibault at debian.org
Fri May 27 23:38:04 UTC 2016


Control: tags -1 + patch

Hello,

Niko Tyni, on Fri 27 May 2016 19:02:06 +0300, wrote:
> It looks like the other architectures get _GNU_SOURCE (and _REENTRANT)
> via hints/linux.sh -> UU/usethreads.cbu, possibly Hurd needs something
> similar.

Indeed, and it makes sense do define those for usethreads.  I confirm
that the attached patch fixes this bug, fixing t/op/exec, t/op/taint and
t/run/switches.

Samuel
-------------- next part --------------
--- hints/gnu.sh.original	2016-05-27 23:26:25.000000000 +0000
+++ hints/gnu.sh	2016-05-27 23:27:40.000000000 +0000
@@ -30,8 +30,34 @@
 # 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


More information about the Perl-maintainers mailing list