This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Old HP-UXen had a non-standard strtold().
[perl5.git] / hints / aix.sh
index 8d06c9f..675cfa6 100644 (file)
@@ -96,7 +96,7 @@ cc=${cc:-cc}
 ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE"
 case "$cc" in
     *gcc*) ;;
-    *) ccflags="$ccflags -qmaxmem=-1 -qnoansialias" ;;
+    *) ccflags="$ccflags -qmaxmem=-1 -qnoansialias -qlanglvl=extc99" ;;
     esac
 nm_opt='-B'
 
@@ -234,6 +234,7 @@ case "$usethreads" in
        d_setgrent_r='undef'
        d_setpwent_r='undef'
        d_srand48_r='undef'
+       d_srandom_r='undef'
        d_strerror_r='undef'
 
        ccflags="$ccflags -DNEED_PTHREAD_INIT"
@@ -244,13 +245,9 @@ case "$usethreads" in
            cc_r) 
              ;;
            xlc_r) 
-             # for -qlonglong
-             ccflags="$ccflags -qlanglvl=extended"
              ;;
            # we do not need the C++ compiler
            xlC_r) 
-             # for -qlonglong
-             ccflags="$ccflags -qlanglvl=extended"
              cc=xlc_r 
              ;;
            '') 
@@ -271,13 +268,9 @@ case "$usethreads" in
     *)
        case "$cc" in
            xlc) 
-             # for -qlonglong
-             ccflags="$ccflags -qlanglvl=extended"
              ;;
            # we do not need the C++ compiler
            xlC) 
-             # for -qlonglong
-             ccflags="$ccflags -qlanglvl=extended"
              cc=xlc 
              ;;
            *)
@@ -347,6 +340,9 @@ libswanted_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@
                    $define|true|[yY]*) cc="$cc -q64"   ;;
                    *)                  cc="$cc -q32"   ;;
                    esac
+                # Some 32-bit getconfs will set ccflags to include -qlonglong
+                # but that's no longer needed with an explicit -qextc99.
+                ccflags="`echo $ccflags | sed -e 's@ -qlonglong@@'`"
                ;;
            *)  # Remove xlc-specific -qflags.
                ccflags="`echo $ccflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`"