This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Untangle the <stdio.h> #include nest for the stdchar test,
[perl5.git] / hints / hpux.sh
index ce15f55..43d72bc 100644 (file)
@@ -105,9 +105,13 @@ EOM
     ;;
 esac
 
+cc=${cc:-cc}
+
 case `$cc -v 2>&1`"" in
 *gcc*) ccisgcc="$define" ;;
-*) ccisgcc='' ;;
+*) ccisgcc=''
+   ccversion=`which cc | xargs what | awk '/Compiler/{print $2}'`
+   ;;
 esac
 
 # Determine the architecture type of this system.
@@ -387,8 +391,10 @@ cat > UU/uselargefiles.cbu <<'EOCBU'
 case "$uselargefiles" in
 ''|$define|true|[yY]*)
        # there are largefile flags available via getconf(1)
-       # but we cheat for now.
-       ccflags="$ccflags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+       # but we cheat for now.  (Keep that in the left margin.)
+ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+       ccflags="$ccflags $ccflags_uselargefiles"
 
         if test -z "$ccisgcc" -a -z "$gccversion"; then
            # The strict ANSI mode (-Aa) doesn't like large files.