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'
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"
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
;;
'')
*)
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
;;
*)
$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'`"