X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/a8dbc3a4eb2786c64e9f0341713dfd72f75aba12..6507ac8375250fed048a612594c6d6d4f5ac2613:/Configure diff --git a/Configure b/Configure index 76ab5b3..fad1c9f 100755 --- a/Configure +++ b/Configure @@ -657,6 +657,7 @@ d_lstat='' d_madvise='' d_malloc_good_size='' d_malloc_size='' +d_malloc_usable_size='' d_mblen='' d_mbrlen='' d_mbrtowc='' @@ -8554,7 +8555,7 @@ EOM if $test "X$sysroot" != X; then case "$gccversion" in '') ;; - *) dflt="$dflt --sysroot $sysroot" ;; + *) dflt="$dflt --sysroot=$sysroot" ;; esac fi @@ -10386,15 +10387,15 @@ esac $cat >>try.c < -int checkit(char *expect, char *got) +void checkit(const char *expect, char *got) { if (strcmp(expect, got)) { printf("%s oddity: Expected %s, got %s\n", @@ -10575,6 +10576,7 @@ for xxx_convert in $xxx_list; do fi else echo "$xxx_convert NOT found." >&4 + xxx_convert='' fi done @@ -14090,6 +14092,7 @@ $cat >try.c < #include #include +#include int main () { @@ -16148,6 +16151,10 @@ eval $inlibc set malloc_good_size d_malloc_good_size eval $inlibc +: see if malloc_usable_size exists +set malloc_usable_size d_malloc_usable_size +eval $inlibc + : see if mblen exists set mblen d_mblen eval $inlibc @@ -19698,108 +19705,16 @@ EOM ;; esac -: Checking 32bit alignedness $cat <try.c < -#$i_stdlib I_STDLIB -#ifdef I_STDLIB -#include -#endif -#define U32 $u32type -#define BYTEORDER 0x$byteorder -#define U8 $u8type -#include -#ifdef SIGBUS -$signal_t bletch(int s) { exit(4); } -#endif -int main() { -#if BYTEORDER == 0x1234 || BYTEORDER == 0x4321 - volatile U8 buf[8]; - volatile U32 *up; - int i; - if (sizeof(U32) != 4) { - printf("sizeof(U32) is not 4, but %d\n", sizeof(U32)); - exit(1); - } - - fflush(stdout); - -#ifdef SIGBUS - signal(SIGBUS, bletch); -#endif - - buf[0] = 0; - buf[1] = 0; - buf[2] = 0; - buf[3] = 1; - buf[4] = 0; - buf[5] = 0; - buf[6] = 0; - buf[7] = 1; - - for (i = 0; i < 4; i++) { - up = (U32*)(buf + i); - if (! ((*up == 1 << (8*i)) || /* big-endian */ - (*up == 1 << (8*(3-i))) /* little-endian */ - ) - ) - { - printf("read failed (%x)\n", *up); - exit(2); - } - } - - /* write test */ - for (i = 0; i < 4; i++) { - up = (U32*)(buf + i); - *up = 0xBeef; - if (*up != 0xBeef) { - printf("write failed (%x)\n", *up); - exit(3); - } - } - - exit(0); -#else - printf("1\n"); - exit(1); -#endif - return 0; -} -EOCP -set try -if eval $compile_ok; then - echo "(Testing for character data alignment may crash the test. That's okay.)" >&4 - $run ./try 2>&1 >/dev/null - case "$?" in - 0) cat >&4 <&4 <