summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-02-16 22:29:11 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-02-16 22:29:11 +0000
commitbf0c440fce1b379160a009c06867702b38dd9366 (patch)
treefbd0c1092cd010a36b029b3a774694d934b76735
parentca6e1c26e8ac218f83b0cec7616cb26dab979947 (diff)
downloadperl-bf0c440fce1b379160a009c06867702b38dd9366.tar.gz
HP-UX 64-bitness/largefile fixes.
p4raw-id: //depot/cfgperl@5119
-rwxr-xr-xConfigure14
-rw-r--r--config_h.SH6
-rw-r--r--ext/SDBM_File/sdbm/sdbm.c2
-rw-r--r--hints/hpux.sh138
-rw-r--r--perl.h4
5 files changed, 89 insertions, 75 deletions
diff --git a/Configure b/Configure
index 28d19d6a49..fedea43978 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed Feb 16 01:07:15 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Wed Feb 16 22:28:06 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
@@ -653,6 +653,7 @@ i_sysioctl=''
i_syssockio=''
i_syslog=''
i_sysmman=''
+i_sysmode=''
i_sysmount=''
i_sysndir=''
i_sysparam=''
@@ -944,13 +945,12 @@ inclwanted=''
groupstype=''
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
-
: Possible local library directories to search.
loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
: general looking path for locating libraries
-glibpth="/usr/lib/large /lib/pa1.1 /lib /usr/lib $xlibpth"
+glibpth="/usr/lib/large /lib /usr/lib $xlibpth"
glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
@@ -3058,7 +3058,7 @@ int main() {
exit(0);
}
EOM
-if $cc -o gccvers gccvers.c; then
+if $cc $ldflags -o gccvers gccvers.c; then
gccversion=`./gccvers`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
@@ -14106,6 +14106,11 @@ eval $setvar
set syslog.h i_syslog
eval $inhdr
+
+: see if this is a sys/mode.h system
+set sys/mode.h i_sysmode
+eval $inhdr
+
: see if sys/resource.h has to be included
set sys/resource.h i_sysresrc
eval $inhdr
@@ -14949,6 +14954,7 @@ i_sysin='$i_sysin'
i_sysioctl='$i_sysioctl'
i_syslog='$i_syslog'
i_sysmman='$i_sysmman'
+i_sysmode='$i_sysmode'
i_sysmount='$i_sysmount'
i_sysndir='$i_sysndir'
i_sysparam='$i_sysparam'
diff --git a/config_h.SH b/config_h.SH
index 17e4aa2837..9529129c3e 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -2975,6 +2975,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define PERL_XS_APIVERSION "$xs_apiversion"
#define PERL_PM_APIVERSION "$pm_apiversion"
+/* I_SYSMODE:
+ * This symbol, if defined, indicates that <sys/mode.h> exists and
+ * should be included.
+ */
+#$i_sysmode I_SYSMODE /**/
+
/* I_SYS_UTSNAME:
* This symbol, if defined, indicates that <sys/utsname.h> exists and
* should be included.
diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c
index f58f4487c8..64c75cbb20 100644
--- a/ext/SDBM_File/sdbm/sdbm.c
+++ b/ext/SDBM_File/sdbm/sdbm.c
@@ -39,7 +39,7 @@ extern int errno;
extern Malloc_t malloc proto((MEM_SIZE));
extern Free_t free proto((Malloc_t));
-extern Off_t lseek(int, Off_t, int);
+
#endif
/*
diff --git a/hints/hpux.sh b/hints/hpux.sh
index 467ceb9f89..a03eed6401 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -101,11 +101,14 @@ EOM
;;
esac
-# Even if you use gcc, prefer the HP math library over the GNU one.
-
-case "`$cc -v 2>&1`" in
-"*gcc*" ) test -d /lib/pa1.1 && ccflags="$ccflags -L/lib/pa1.1" ;;
-esac
+# Backward compatibility (uselonglong is deprecated).
+case "$uselonglolong" in
+"$define"|true|[yY]*)
+ case "$use64bits" in
+ '') use64bits="$define" ;;
+ esac
+ ;;
+esac
# Determine the architecture type of this system.
# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
@@ -139,6 +142,68 @@ else
selecttype='int *'
fi
+case "$use64bits" in
+$define|true|[yY]*)
+ if [ "$xxOsRevMajor" -lt 11 ]; then
+ cat <<EOM >&4
+
+64-bit compilation is not supported on HP-UX $xxOsRevMajor.
+You need at least HP-UX 11.0.
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ fi
+
+ # Without the 64-bit libc we cannot do much.
+ if [ ! -f /lib/pa20_64/libc.sl ]; then
+ cat <<EOM >&4
+
+You do not seem to have the 64-bit libraries in /lib/pa20_64.
+Most importantly, I cannot find /lib/pa20_64/libc.sl.
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ fi
+
+ ccflags="$ccflags +DD64"
+ ldflags="$ldflags +DD64"
+ loclibpth="$loclibpth /lib/pa20_64"
+ libscheck='case "`file $xxx`" in
+*LP64*|*PA-RISC2.0*) ;;
+*) xxx=/no/64-bit$xxx ;;
+esac'
+ ld=/usr/bin/ld
+ ar=/usr/bin/ar
+ full_ar=$ar
+
+ # The strict ANSI mode (-Aa) doesn't like the LL suffixes.
+ case "$ccflags" in
+ *-Aa*)
+ echo "(Changing from strict ANSI compilation to extended because of 64-bitness)"
+ ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
+ ;;
+ esac
+
+ set `echo " $libswanted " | sed -e 's@ dl @ @'`
+ libswanted="$*"
+
+ case "`$cc -v 2>&1`" in
+ *gcc*) ccflags="$ccflags -L/lib/pa20_64" ;;
+ esac
+ ;;
+*) loclibpth="$loclibpth /lib/pa1.1"
+ case "`$cc -v 2>&1`" in
+ *gcc*) ccflags="$ccflags -L/lib/pa20_64" ;;
+ esac
+ ;;
+esac
+
+case "`getconf KERNEL_BITS 2>/dev/null`" in
+*64*) ldflags="$ldflags -Wl,+vnocompatwarnings" ;;
+esac
+
# Remove bad libraries that will cause problems
# (This doesn't remove libraries that don't actually exist)
# -lld is unneeded (and I can't figure out what it's used for anyway)
@@ -289,69 +354,6 @@ EOM
esac
EOCBU
-# This script UU/use64bits.cbu will get 'called-back' by Configure
-# after it has prompted the user for whether to use 64 bits.
-cat > UU/use64bits.cbu <<'EOCBU'
-case "$use64bits" in
-$define|true|[yY]*)
- if [ "$xxOsRevMajor" -lt 11 ]; then
- cat <<EOM >&4
-
-64-bit compilation is not supported on HP-UX $xxOsRevMajor.
-You need at least HP-UX 11.0.
-Cannot continue, aborting.
-
-EOM
- exit 1
- fi
-
- # Without the 64-bit libc we cannot do much.
- if [ ! -f /lib/pa20_64/libc.sl ]; then
- cat <<EOM >&4
-
-You do not seem to have the 64-bit libraries in /lib/pa20_64.
-Most importantly, I cannot find /lib/pa20_64/libc.sl.
-Cannot continue, aborting.
-
-EOM
- exit 1
- fi
-
- ld=/usr/bin/ld
- ar=/usr/bin/ar
- full_ar=$ar
-
- # The strict ANSI mode (-Aa) doesn't like the LL suffixes.
- case "$ccflags" in
- *-Aa*)
- echo "(Changing from strict ANSI compilation to extended because of 64-bitness)"
- ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
- ;;
- esac
-
- set `echo " $libswanted " | sed -e 's@ dl @ @'`
- libswanted="$*"
-
- ;;
-esac
-EOCBU
-
-case "$use64bits" in
-$define|true|[yY]*)
- glibpth="`echo $glibpth|sed 's: /lib/pa1.1 : /lib/pa20_64 :'`"
- ccflags="$ccflags +DD64"
- ldflags="$ldflags +DD64"
- libscheck='case "`file $xxx`" in
-*LP64*|*PA-RISC2.0*) ;;
-*) xxx=/no/64-bit$xxx ;;
-esac'
- ;;
-esac
-
-case "`getconf KERNEL_BITS 2>/dev/null`" in
-*64*) ldflags="$ldflags -Wl,+vnocompatwarnings" ;;
-esac
-
# This script UU/uselfs.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use 64 bits.
cat > UU/uselfs.cbu <<'EOCBU'
diff --git a/perl.h b/perl.h
index d2e80fa0b5..532afd0531 100644
--- a/perl.h
+++ b/perl.h
@@ -2083,9 +2083,9 @@ char *crypt (const char*, const char*);
# ifndef getenv
char *getenv (const char*);
# endif /* !getenv */
-#if !defined(EPOC) && !(defined(__hpux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+# if !defined(EPOC) && !(defined(__hpux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
Off_t lseek (int,Off_t,int);
-#endif
+# endif
# endif /* !DONT_DECLARE_STD */
char *getlogin (void);
#endif /* !__cplusplus */