d_dlopen=''
d_dlsymun=''
d_dosuid=''
-d_double_has_inf=''
-d_double_has_nan=''
-d_double_has_negative_zero=''
-d_double_has_subnormals=''
-d_double_style_cray=''
-d_double_style_ibm=''
-d_double_style_ieee=''
-d_double_style_vax=''
d_suidsafe=''
d_drand48_r=''
drand48_r_proto=''
d_log2=''
d_logb=''
d_ldexpl=''
-d_longdbl=''
d_long_double_style_ieee=''
d_long_double_style_ieee_doubledouble=''
d_long_double_style_ieee_extended=''
d_long_double_style_ieee_std=''
d_long_double_style_vax=''
+d_longdbl=''
longdblkind=''
longdblsize=''
d_longlong=''
d_wcsxfrm=''
d_wctomb=''
d_writev=''
+default_inc_excludes_dot='undef'
dlext=''
bin_ELF=''
cccdlflags=''
usedl=''
doublesize=''
dtraceobject=''
+dtracexnolibs=''
ebcdic=''
fflushNULL=''
fflushall=''
d_PRIfldbl=''
d_PRIgldbl=''
d_SCNfldbl=''
+d_double_has_inf=''
+d_double_has_nan=''
+d_double_has_negative_zero=''
+d_double_has_subnormals=''
+d_double_style_cray=''
+d_double_style_ibm=''
+d_double_style_ieee=''
+d_double_style_vax=''
doublekind=''
sPRIEUldbl=''
sPRIFUldbl=''
1|2|3|4|5|6|7|8) d_double_style_ieee=$define ;;
9|10|11) d_double_style_vax=$define ;;
12|13) d_double_style_ibm=$define ;;
-14) double_style_cray=$define ;;
+14) d_double_style_cray=$define ;;
esac
case "$d_double_style_ieee" in
$define)
;;
esac
+: Include . in @INC
+$cat <<EOM
+
+Historically Perl has provided a final fallback of the current working
+directory '.' when searching for a library. This, however, can lead to
+problems when a Perl program which loads optional modules is called from
+a shared directory. This can lead to executing unexpected code.
+
+EOM
+
+# When changing to exclude by default:
+#case "$default_inc_excludes_dot" in
+# $undef|false|[nN]*) dflt="n" ;;
+# *) dflt="y" ;;
+#esac
+# For now:
+case "$default_inc_excludes_dot" in
+ $define|true|[yY]*) dflt="y" ;;
+ *) dflt="n" ;;
+esac
+
+rp='Exclude '.' from @INC by default? '
+. ./myread
+case "$ans" in
+ [nN]|undef) default_inc_excludes_dot="$undef" ;;
+ *) default_inc_excludes_dot="$define" ;;
+esac
+
: Check what kind of inf/nan your system has
$echo "Checking the kind of infinities and nans you have..." >&4
$echo "(The following tests may crash. That's okay.)" >&4
#define DOUBLESIZE $doublesize
#$d_longdbl HAS_LONG_DOUBLE
#ifdef HAS_LONG_DOUBLE
-#define LONGDBLSIZE $longdblsize
-#define LONGDBLKIND $longdblkind
+#define LONG_DOUBLESIZE $longdblsize
+#define LONG_DOUBLEKIND $longdblkind
#endif
#$i_math I_MATH
#ifdef I_MATH
#ifdef HAS_LONG_DOUBLE
long double ldinf = (long double)exp(1e9);
long double ldnan = (long double)sqrt(-1.0);
-#endif
- if (argc == 2) {
- switch (argv[1][0]) {
- case '1': bytes(&dinf, sizeof(dinf)); break;
- case '2': bytes(&dnan, sizeof(dnan)); break;
-#ifdef HAS_LONG_DOUBLE
# if LONG_DOUBLEKIND == 3 || LONG_DOUBLEKIND == 4
/* the 80-bit long doubles might have garbage in their excess bytes */
memset((char *)&ldinf + 10, '\0', LONG_DOUBLESIZE - 10);
+ memset((char *)&ldnan + 10, '\0', LONG_DOUBLESIZE - 10);
# endif
+ if (argc == 2) {
+ switch (argv[1][0]) {
+ case '1': bytes(&dinf, sizeof(dinf)); break;
+ case '2': bytes(&dnan, sizeof(dnan)); break;
case '3': bytes(&ldinf, sizeof(ldinf)); break;
case '4': bytes(&ldnan, sizeof(ldnan)); break;
#endif
esac
fi
# In case the program crashed the values are empty, turn them undef.
-case "$dblinfbytes" in
-'') dblinfbytes=$undef ;;
+case "$doubleinfbytes" in
+'') doubleinfbytes=$undef ;;
esac
-case "$dblnanbytes" in
-'') dblnanbytes=$undef ;;
+case "$doublenanbytes" in
+'') doublenanbytes=$undef ;;
esac
-case "$ldblinfbytes" in
-'') ldblinfbytes=$undef ;;
+case "$longdblinfbytes" in
+'') longdblinfbytes=$undef ;;
esac
-case "$ldblnanbytes" in
-'') ldblnanbytes=$undef ;;
+case "$longdblnanbytes" in
+'') longdblnanbytes=$undef ;;
esac
$rm_try
: object file that uses at least one of the probes defined in the .d file
case "$usedtrace" in
$define)
+ case "$dtracexnolibs" in
+ $define|true|[yY]*)
+ dtracexnolibs=$define
+ $dtrace -h -xnolibs -s ../perldtrace.d -o perldtrace.h
+ ;;
+ ' '|'')
+ if $dtrace -h -xnolibs -s ../perldtrace.d -o perldtrace.h 2>&1 ; then
+ dtracexnolibs=$define
+ echo "Your dtrace accepts -xnolibs"
+ elif $dtrace -h -s ../perldtrace.d -o perldtrace.h 2>&1 ; then
+ dtracexnolibs=$undef
+ echo "Your dtrace doesn't accept -xnolibs"
+ else
+ echo "Your dtrace doesn't work at all, try building without dtrace support" >&4
+ exit 1
+ fi
+ ;;
+ *)
+ dtracexnolibs=$undef
+ $dtrace -h -s ../perldtrace.d -o perldtrace.h
+ ;;
+ esac
+ case $dtracexnolibs in
+ $define) xnolibs=-xnolibs ;;
+ *) xnolibs= ;;
+ esac
+
case "$dtraceobject" in
$define|true|[yY]*)
dtraceobject=$define
;;
' '|'')
- $dtrace -h -s ../perldtrace.d -o perldtrace.h
$cat >try.c <<EOM
#include "perldtrace.h"
int main(void) {
EOM
dtraceobject=$undef
if $cc -c -o try.o $optimize $ccflags try.c \
- && $dtrace -G -s ../perldtrace.d try.o >/dev/null 2>&1; then
+ && $dtrace -G $xnolibs -s ../perldtrace.d try.o >/dev/null 2>&1; then
dtraceobject=$define
echo "Your dtrace builds an object file"
fi
- $rm -f try.c try.o perldtrace.o
;;
*) dtraceobject=$undef ;;
esac
+ $rm -f try.c try.o perldtrace.o perldtrace.h
esac
: Determine if this is an EBCDIC system
d_log1p='$d_log1p'
d_log2='$d_log2'
d_logb='$d_logb'
-d_longdbl='$d_longdbl'
-d_longlong='$d_longlong'
d_long_double_style_ieee='$d_long_double_style_ieee'
d_long_double_style_ieee_doubledouble='$d_long_double_style_ieee_doubledouble'
d_long_double_style_ieee_extended='$d_long_double_style_ieee_extended'
d_long_double_style_ieee_std='$d_long_double_style_ieee_std'
d_long_double_style_vax='$d_long_double_style_vax'
+d_longdbl='$d_longdbl'
+d_longlong='$d_longlong'
d_lrint='$d_lrint'
d_lrintl='$d_lrintl'
d_lround='$d_lround'
db_version_major='$db_version_major'
db_version_minor='$db_version_minor'
db_version_patch='$db_version_patch'
+default_inc_excludes_dot='$default_inc_excludes_dot'
direntrytype='$direntrytype'
dlext='$dlext'
dlsrc='$dlsrc'
drand48_r_proto='$drand48_r_proto'
dtrace='$dtrace'
dtraceobject='$dtraceobject'
+dtracexnolibs='$dtracexnolibs'
dynamic_ext='$dynamic_ext'
eagain='$eagain'
ebcdic='$ebcdic'