diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-18 11:03:36 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-18 11:03:36 +0200 |
commit | f3dbc2ec871da22028969540424a63ff51404cfd (patch) | |
tree | 4225e3007008839ec710fcc17ed6cc9bf8db748c /gl/m4 | |
parent | 5c8dd483ccc5f4cf2d86c4ae386efb86e3b259cd (diff) | |
download | monitoring-plugins-f3dbc2ec871da22028969540424a63ff51404cfd.tar.gz |
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4')
-rw-r--r-- | gl/m4/fcntl-o.m4 | 8 | ||||
-rw-r--r-- | gl/m4/fsusage.m4 | 28 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 2 | ||||
-rw-r--r-- | gl/m4/lib-link.m4 | 4 | ||||
-rw-r--r-- | gl/m4/malloc.m4 | 31 | ||||
-rw-r--r-- | gl/m4/stdlib_h.m4 | 12 |
6 files changed, 62 insertions, 23 deletions
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4 index d416a61c..1adacc8a 100644 --- a/gl/m4/fcntl-o.m4 +++ b/gl/m4/fcntl-o.m4 @@ -1,4 +1,4 @@ -# fcntl-o.m4 serial 1 +# fcntl-o.m4 serial 2 dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -12,7 +12,11 @@ dnl Written by Paul Eggert. AC_DEFUN([gl_FCNTL_O_FLAGS], [ dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes + dnl AC_GNU_SOURCE. + m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], + [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], + [AC_REQUIRE([AC_GNU_SOURCE])]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( diff --git a/gl/m4/fsusage.m4 b/gl/m4/fsusage.m4 index 216b9dd8..68684c27 100644 --- a/gl/m4/fsusage.m4 +++ b/gl/m4/fsusage.m4 @@ -1,4 +1,4 @@ -# serial 25 +# serial 26 # Obtaining file system usage information. # Copyright (C) 1997-1998, 2000-2001, 2003-2010 Free Software Foundation, Inc. @@ -44,7 +44,8 @@ ac_fsusage_space=no # systems. That system is reported to work fine with STAT_STATFS4 which # is what it gets when this test fails. if test $ac_fsusage_space = no; then - # SVR4 + # glibc/{Hurd,kFreeBSD}, MacOS X >= 10.4, FreeBSD >= 5.0, NetBSD >= 3.0, + # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS. AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> #if defined __GLIBC__ && defined __linux__ @@ -97,8 +98,13 @@ if test $ac_fsusage_space = no; then fi if test $ac_fsusage_space = no; then -# AIX - AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl + # glibc/Linux, MacOS X < 10.4, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. + # (glibc/{Hurd,kFreeBSD}, MacOS X >= 10.4, FreeBSD >= 5.0, NetBSD >= 3.0, + # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.) + # (On IRIX you need to include <sys/statfs.h>, not only <sys/mount.h> and + # <sys/vfs.h>.) + # (On Solaris, statfs has 4 arguments.) + AC_MSG_CHECKING([for two-argument statfs with statfs.f_bsize dnl member (AIX, 4.3BSD)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs2_bsize], [AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -131,7 +137,8 @@ member (AIX, 4.3BSD)]) fi if test $ac_fsusage_space = no; then -# SVR3 + # SVR3 + # (Solaris already handled above.) AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs4], [AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -150,13 +157,17 @@ if test $ac_fsusage_space = no; then if test $fu_cv_sys_stat_statfs4 = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATFS4], [1], - [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)]) + [ Define if statfs takes 4 args. (SVR3, Dynix, old Irix, old AIX, Dolphin)]) fi fi if test $ac_fsusage_space = no; then -# 4.4BSD and NetBSD - AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl + # 4.4BSD and older NetBSD + # (OSF/1 already handled above.) + # (On AIX, you need to include <sys/statfs.h>, not only <sys/mount.h>.) + # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in + # <sys/mount.h>.) + AC_MSG_CHECKING([for two-argument statfs with statfs.f_fsize dnl member (4.4BSD and NetBSD)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs2_fsize], [AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -223,6 +234,7 @@ fi if test $ac_fsusage_space = no; then # SVR2 + # (AIX, HP-UX, OSF/1 already handled above.) AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/filsys.h> ]])], [AC_DEFINE([STAT_READ_FILSYS], [1], diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index fc3f3538..b5e6b438 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -254,7 +254,7 @@ AC_DEFUN([gl_INIT], # Code from module locale: gl_LOCALE_H # Code from module malloc: - AC_FUNC_MALLOC + gl_FUNC_MALLOC_GNU AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.]) # Code from module malloc-posix: gl_FUNC_MALLOC_POSIX diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4 index 59b367df..9f3be3a2 100644 --- a/gl/m4/lib-link.m4 +++ b/gl/m4/lib-link.m4 @@ -1,4 +1,4 @@ -# lib-link.m4 serial 23 (gettext-0.18.2) +# lib-link.m4 serial 24 (gettext-0.18.2) dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -165,7 +165,7 @@ AC_DEFUN([AC_LIB_FROMPACKAGE], pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, - m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4 index 910ac922..fe5befc2 100644 --- a/gl/m4/malloc.m4 +++ b/gl/m4/malloc.m4 @@ -1,25 +1,40 @@ -# malloc.m4 serial 9 +# malloc.m4 serial 10 dnl Copyright (C) 2007, 2009, 2010 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. +# gl_FUNC_MALLOC_GNU +# ------------------ +# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if +# it is not. +AC_DEFUN([gl_FUNC_MALLOC_GNU], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. + _AC_FUNC_MALLOC_IF( + [AC_DEFINE([HAVE_MALLOC], [1], + [Define to 1 if your system has a GNU libc compatible 'malloc' + function, and to 0 otherwise.])], + [AC_DEFINE([HAVE_MALLOC], [0]) + gl_REPLACE_MALLOC + ]) +]) + # gl_FUNC_MALLOC_POSIX # -------------------- # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace malloc if it is not. AC_DEFUN([gl_FUNC_MALLOC_POSIX], [ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then - HAVE_MALLOC_POSIX=1 AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if the 'malloc' function is POSIX compliant.]) else - AC_LIBOBJ([malloc]) - HAVE_MALLOC_POSIX=0 + gl_REPLACE_MALLOC fi - AC_SUBST([HAVE_MALLOC_POSIX]) ]) # Test whether malloc, realloc, calloc are POSIX compliant, @@ -39,3 +54,9 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX], ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no]) ]) ]) + +AC_DEFUN([gl_REPLACE_MALLOC], +[ + AC_LIBOBJ([malloc]) + REPLACE_MALLOC=1 +]) diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 index dd84796d..fc150197 100644 --- a/gl/m4/stdlib_h.m4 +++ b/gl/m4/stdlib_h.m4 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 28 +# stdlib_h.m4 serial 30 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -33,7 +33,7 @@ AC_DEFUN([gl_STDLIB_H], #if HAVE_RANDOM_H # include <random.h> #endif - ]], [atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp + ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt unsetenv]) @@ -50,6 +50,7 @@ AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ + GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) @@ -75,13 +76,12 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) dnl Assume proper GNU behavior unless another module says otherwise. + HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) - HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX]) HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) - HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) @@ -89,7 +89,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) - HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) @@ -100,9 +99,12 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) + REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) + REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) + REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) |