diff options
-rw-r--r-- | config/auto-aux/longlong.c | 8 | ||||
-rwxr-xr-x | configure | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/config/auto-aux/longlong.c b/config/auto-aux/longlong.c index 92b4efdbf..5c996b52e 100644 --- a/config/auto-aux/longlong.c +++ b/config/auto-aux/longlong.c @@ -27,6 +27,10 @@ int main(int argc, char **argv) l = 123456789123456789LL; buffer[0] = 0; sprintf(buffer, "%lld", l); - if (strcmp(buffer, "123456789123456789") != 0) return 1; - return 0; + if (strcmp(buffer, "123456789123456789") == 0) return 0; + /* the MacOS X library uses qd to format long longs */ + buffer[0] = '\0'; + sprintf (buffer, "%qd", l); + if (strcmp (buffer, "123456789123456789") == 0) return 1; + return 100; } @@ -293,11 +293,16 @@ if test $2 = 8; then else sh ./runtest longlong.c case $? in - 0) echo "64-bit \"long long\" integer type found." + 0) echo "64-bit \"long long\" integer type found (printf with ll)." echo "#define ARCH_INT64_TYPE long long" >> m.h echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h echo '#define ARCH_INT64_PRINTF_FORMAT "ll"' >> m.h int64_supported=true;; + 1) echo "64-bit \"long long\" integer type found (printf with q)." + echo "#define ARCH_INT64_TYPE long long" >> m.h + echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h + echo '#define ARCH_INT64_PRINTF_FORMAT "q"' >> m.h + int64_supported=true;; *) echo "No suitable 64-bit integer type found, Int64.t will not be supported." int64_supported=false;; esac |