@@ -11574,84 +11574,6 @@ fi
1157411574
1157511575
1157611576
11577- # SunOS doesn't handle negative byte comparisons properly with +/- return
11578- echo "$as_me:$LINENO: checking for working memcmp" >&5
11579- echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
11580- if test "${ac_cv_func_memcmp_working+set}" = set; then
11581- echo $ECHO_N "(cached) $ECHO_C" >&6
11582- else
11583- if test "$cross_compiling" = yes; then
11584- ac_cv_func_memcmp_working=no
11585- else
11586- cat >conftest.$ac_ext <<_ACEOF
11587- #line $LINENO "configure"
11588- #include "confdefs.h"
11589-
11590- #ifdef F77_DUMMY_MAIN
11591- # ifdef __cplusplus
11592- extern "C"
11593- # endif
11594- int F77_DUMMY_MAIN() { return 1; }
11595- #endif
11596- int
11597- main ()
11598- {
11599-
11600- /* Some versions of memcmp are not 8-bit clean. */
11601- char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11602- if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
11603- exit (1);
11604-
11605- /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
11606- or more and with at least one buffer not starting on a 4-byte boundary.
11607- William Lewis provided this test program. */
11608- {
11609- char foo[21];
11610- char bar[21];
11611- int i;
11612- for (i = 0; i < 4; i++)
11613- {
11614- char *a = foo + i;
11615- char *b = bar + i;
11616- strcpy (a, "--------01111111");
11617- strcpy (b, "--------10000000");
11618- if (memcmp (a, b, 16) >= 0)
11619- exit (1);
11620- }
11621- exit (0);
11622- }
11623-
11624- ;
11625- return 0;
11626- }
11627- _ACEOF
11628- rm -f conftest$ac_exeext
11629- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11630- (eval $ac_link) 2>&5
11631- ac_status=$?
11632- echo "$as_me:$LINENO: \$? = $ac_status" >&5
11633- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11634- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11635- (eval $ac_try) 2>&5
11636- ac_status=$?
11637- echo "$as_me:$LINENO: \$? = $ac_status" >&5
11638- (exit $ac_status); }; }; then
11639- ac_cv_func_memcmp_working=yes
11640- else
11641- echo "$as_me: program exited with status $ac_status" >&5
11642- echo "$as_me: failed program was:" >&5
11643- cat conftest.$ac_ext >&5
11644- ( exit $ac_status )
11645- ac_cv_func_memcmp_working=no
11646- fi
11647- rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11648- fi
11649- fi
11650- echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
11651- echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
11652- test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
11653-
11654-
1165511577
1165611578
1165711579
@@ -12002,7 +11924,7 @@ fi
1200211924# We use our snprintf.c emulation if either snprintf() or vsnprintf()
1200311925# is missing. Yes, there are machines that have only one. We may
1200411926# also decide to use snprintf.c if snprintf() is present but does not
12005- # haveworking "long long int" support -- see below.
11927+ # haveall the features we need - -- see below.
1200611928
1200711929pgac_need_repl_snprintf=no
1200811930
@@ -12162,61 +12084,6 @@ fi
1216212084done
1216312085
1216412086
12165- echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
12166- echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
12167- if test "${pgac_cv_printf_arg_control+set}" = set; then
12168- echo $ECHO_N "(cached) $ECHO_C" >&6
12169- else
12170- if test "$cross_compiling" = yes; then
12171- pgac_cv_printf_arg_control=cross
12172- else
12173- cat >conftest.$ac_ext <<_ACEOF
12174- #line $LINENO "configure"
12175- #include "confdefs.h"
12176- #include <stdio.h>
12177- #include <string.h>
12178-
12179- int main()
12180- {
12181- char buf[100];
12182-
12183- /* can it swap arguments? */
12184- snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
12185- if (strcmp(buf, "4 3") != 0)
12186- return 1;
12187- return 0;
12188- }
12189- _ACEOF
12190- rm -f conftest$ac_exeext
12191- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12192- (eval $ac_link) 2>&5
12193- ac_status=$?
12194- echo "$as_me:$LINENO: \$? = $ac_status" >&5
12195- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12196- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12197- (eval $ac_try) 2>&5
12198- ac_status=$?
12199- echo "$as_me:$LINENO: \$? = $ac_status" >&5
12200- (exit $ac_status); }; }; then
12201- pgac_cv_printf_arg_control=yes
12202- else
12203- echo "$as_me: program exited with status $ac_status" >&5
12204- echo "$as_me: failed program was:" >&5
12205- cat conftest.$ac_ext >&5
12206- ( exit $ac_status )
12207- pgac_cv_printf_arg_control=no
12208- fi
12209- rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12210- fi
12211-
12212- fi
12213- echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
12214- echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
12215-
12216- # cross compiler should use our snprintf too
12217- if test $pgac_cv_printf_arg_control != yes ; then
12218- pgac_need_repl_snprintf=yes
12219- fi
1222012087
1222112088# Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
1222212089# include/c.h will provide declarations. Note this is a separate test
@@ -15044,6 +14911,64 @@ cat >>confdefs.h <<_ACEOF
1504414911_ACEOF
1504514912
1504614913
14914+ # Also force use of our snprintf if system's doesn't do arg control
14915+ if test $pgac_need_repl_snprintf = no; then
14916+ echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
14917+ echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
14918+ if test "${pgac_cv_printf_arg_control+set}" = set; then
14919+ echo $ECHO_N "(cached) $ECHO_C" >&6
14920+ else
14921+ if test "$cross_compiling" = yes; then
14922+ pgac_cv_printf_arg_control=cross
14923+ else
14924+ cat >conftest.$ac_ext <<_ACEOF
14925+ #line $LINENO "configure"
14926+ #include "confdefs.h"
14927+ #include <stdio.h>
14928+ #include <string.h>
14929+
14930+ int main()
14931+ {
14932+ char buf[100];
14933+
14934+ /* can it swap arguments? */
14935+ snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
14936+ if (strcmp(buf, "4 3") != 0)
14937+ return 1;
14938+ return 0;
14939+ }
14940+ _ACEOF
14941+ rm -f conftest$ac_exeext
14942+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14943+ (eval $ac_link) 2>&5
14944+ ac_status=$?
14945+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14946+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14947+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14948+ (eval $ac_try) 2>&5
14949+ ac_status=$?
14950+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14951+ (exit $ac_status); }; }; then
14952+ pgac_cv_printf_arg_control=yes
14953+ else
14954+ echo "$as_me: program exited with status $ac_status" >&5
14955+ echo "$as_me: failed program was:" >&5
14956+ cat conftest.$ac_ext >&5
14957+ ( exit $ac_status )
14958+ pgac_cv_printf_arg_control=no
14959+ fi
14960+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14961+ fi
14962+
14963+ fi
14964+ echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
14965+ echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
14966+
14967+ if test $pgac_cv_printf_arg_control != yes ; then
14968+ pgac_need_repl_snprintf=yes
14969+ fi
14970+ fi
14971+
1504714972if test $pgac_need_repl_snprintf = yes; then
1504814973 LIBOBJS="$LIBOBJS snprintf.$ac_objext"
1504914974fi
@@ -17947,6 +17872,84 @@ fi
1794717872
1794817873fi
1794917874
17875+ # SunOS doesn't handle negative byte comparisons properly with +/- return
17876+ echo "$as_me:$LINENO: checking for working memcmp" >&5
17877+ echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
17878+ if test "${ac_cv_func_memcmp_working+set}" = set; then
17879+ echo $ECHO_N "(cached) $ECHO_C" >&6
17880+ else
17881+ if test "$cross_compiling" = yes; then
17882+ ac_cv_func_memcmp_working=no
17883+ else
17884+ cat >conftest.$ac_ext <<_ACEOF
17885+ #line $LINENO "configure"
17886+ #include "confdefs.h"
17887+
17888+ #ifdef F77_DUMMY_MAIN
17889+ # ifdef __cplusplus
17890+ extern "C"
17891+ # endif
17892+ int F77_DUMMY_MAIN() { return 1; }
17893+ #endif
17894+ int
17895+ main ()
17896+ {
17897+
17898+ /* Some versions of memcmp are not 8-bit clean. */
17899+ char c0 = 0x40, c1 = 0x80, c2 = 0x81;
17900+ if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
17901+ exit (1);
17902+
17903+ /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
17904+ or more and with at least one buffer not starting on a 4-byte boundary.
17905+ William Lewis provided this test program. */
17906+ {
17907+ char foo[21];
17908+ char bar[21];
17909+ int i;
17910+ for (i = 0; i < 4; i++)
17911+ {
17912+ char *a = foo + i;
17913+ char *b = bar + i;
17914+ strcpy (a, "--------01111111");
17915+ strcpy (b, "--------10000000");
17916+ if (memcmp (a, b, 16) >= 0)
17917+ exit (1);
17918+ }
17919+ exit (0);
17920+ }
17921+
17922+ ;
17923+ return 0;
17924+ }
17925+ _ACEOF
17926+ rm -f conftest$ac_exeext
17927+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17928+ (eval $ac_link) 2>&5
17929+ ac_status=$?
17930+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17931+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17932+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17933+ (eval $ac_try) 2>&5
17934+ ac_status=$?
17935+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
17936+ (exit $ac_status); }; }; then
17937+ ac_cv_func_memcmp_working=yes
17938+ else
17939+ echo "$as_me: program exited with status $ac_status" >&5
17940+ echo "$as_me: failed program was:" >&5
17941+ cat conftest.$ac_ext >&5
17942+ ( exit $ac_status )
17943+ ac_cv_func_memcmp_working=no
17944+ fi
17945+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17946+ fi
17947+ fi
17948+ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
17949+ echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
17950+ test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
17951+
17952+
1795017953
1795117954# Select semaphore implementation type.
1795217955if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then