]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/aclocal.m4
ncurses 6.1 - patch 20181215
[ncurses.git] / test / aclocal.m4
index 3cb8ac72915197cf3f79e7d0ed837a2fced22297..4163e3387cde6b500bc7a8390056d183271a5899 100644 (file)
@@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written       *
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
-dnl $Id: aclocal.m4,v 1.161 2018/12/01 21:05:05 tom Exp $
+dnl $Id: aclocal.m4,v 1.162 2018/12/15 19:58:40 tom Exp $
 dnl
 dnl Author: Thomas E. Dickey
 dnl
@@ -1767,7 +1767,7 @@ if test $cf_cv_getopt_header = getopt.h ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNU_SOURCE version: 9 updated: 2018/06/20 20:23:13
+dnl CF_GNU_SOURCE version: 10 updated: 2018/12/10 20:09:41
 dnl -------------
 dnl Check if we must define _GNU_SOURCE to get a reasonable value for
 dnl _XOPEN_SOURCE, upon which many POSIX definitions depend.  This is a defect
@@ -1786,6 +1786,8 @@ AC_CACHE_CHECK(if this is the GNU C library,cf_cv_gnu_library,[
 AC_TRY_COMPILE([#include <sys/types.h>],[
        #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
                return 0;
+       #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
+               return 0;
        #else
        #       error not GNU C library
        #endif],
@@ -1796,13 +1798,16 @@ AC_TRY_COMPILE([#include <sys/types.h>],[
 if test x$cf_cv_gnu_library = xyes; then
 
        # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
-       # was changed to help a little...
+       # was changed to help a little.  newlib incorporated the change about 4
+       # years later.
        AC_CACHE_CHECK(if _DEFAULT_SOURCE can be used as a basis,cf_cv_gnu_library_219,[
                cf_save="$CPPFLAGS"
                CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
                AC_TRY_COMPILE([#include <sys/types.h>],[
                        #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
                                return 0;
+                       #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
+                               return 0;
                        #else
                        #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
                        #endif],