X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Fsignbit.m4;h=9e7884d22a43863416f392d8a20f839228f65c59;hb=ecea6a7078983379e5b4d8961337cc55298aa8b1;hp=d58caaf05870d78195d9f1916082fa01b5ef8826;hpb=d57728a6ca2413a7c564d8b7bb13d9e5a5a180f3;p=debian%2Fgzip diff --git a/m4/signbit.m4 b/m4/signbit.m4 index d58caaf..9e7884d 100644 --- a/m4/signbit.m4 +++ b/m4/signbit.m4 @@ -1,5 +1,5 @@ -# signbit.m4 serial 13 -dnl Copyright (C) 2007-2013 Free Software Foundation, Inc. +# signbit.m4 serial 16 +dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,10 +29,12 @@ AC_DEFUN([gl_SIGNBIT], [gl_cv_func_signbit=yes], [gl_cv_func_signbit=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_signbit="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_signbit="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;; + # Guess yes on native Windows. + mingw*) gl_cv_func_signbit="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_signbit="guessing no" ;; esac ]) ]) @@ -58,10 +60,17 @@ AC_DEFUN([gl_SIGNBIT], [gl_cv_func_signbit_gcc=yes], [gl_cv_func_signbit_gcc=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_signbit_gcc="guessing no" ;; + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; + # Guess yes on mingw, no on MSVC. + mingw*) if test -n "$GCC"; then + gl_cv_func_signbit_gcc="guessing yes" + else + gl_cv_func_signbit_gcc="guessing no" + fi + ;; + # If we don't know, assume the worst. + *) gl_cv_func_signbit_gcc="guessing no" ;; esac ]) ]) @@ -272,6 +281,7 @@ int main () { /* More than one bit difference. */ fprintf (fp, "unknown"); + fclose (fp); return 2; } if (x) @@ -284,6 +294,7 @@ int main () { /* No difference. */ fprintf (fp, "unknown"); + fclose (fp); return 3; } /* Now m = plus.word[k] ^ ~minus.word[k]. */ @@ -292,6 +303,7 @@ int main () /* Oh? The sign bit is set in the positive and cleared in the negative numbers? */ fprintf (fp, "unknown"); + fclose (fp); return 4; } for (i = 0; ; i++)