X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fspawn_h.m4;h=a9bd161416db9f3cde29a77cc4723542423488ec;hb=34deb3471655d57d311749b68d194ceee0081898;hp=a369c27317c4b0f560313bf15ab29f84dca05486;hpb=0bf85001e78afe170ee53158a5ca3c2036b5da99;p=gnulib.git diff --git a/m4/spawn_h.m4 b/m4/spawn_h.m4 index a369c2731..a9bd16141 100644 --- a/m4/spawn_h.m4 +++ b/m4/spawn_h.m4 @@ -1,5 +1,5 @@ -# spawn_h.m4 serial 4 -dnl Copyright (C) 2008-2009 Free Software Foundation, Inc. +# spawn_h.m4 serial 6 +dnl Copyright (C) 2008-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. @@ -12,8 +12,7 @@ AC_DEFUN([gl_SPAWN_H], dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_SPAWN_H_DEFAULTS]) - dnl Execute this unconditionally, because SPAWN_H may be set by other - dnl modules, after this code is executed. + dnl is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([spawn.h]) AC_CHECK_HEADERS_ONCE([spawn.h]) @@ -35,13 +34,27 @@ AC_DEFUN([gl_SPAWN_H], AC_SUBST([HAVE_SPAWN_H]) AC_REQUIRE([AC_C_RESTRICT]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy + posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault + posix_spawnattr_getsigmask posix_spawnattr_setsigmask + posix_spawnattr_getflags posix_spawnattr_setflags + posix_spawnattr_getpgroup posix_spawnattr_setpgroup + posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy + posix_spawnattr_getschedparam posix_spawnattr_setschedparam + posix_spawn_file_actions_init posix_spawn_file_actions_destroy + posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose + posix_spawwn_file_actions_adddup2]) ]) dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_SPAWN_H], [ - AC_REQUIRE([gl_SPAWN_H_DEFAULTS]) - SPAWN_H='spawn.h' + dnl This is a no-op, because is always overridden. + : ]) AC_DEFUN([gl_SPAWN_MODULE_INDICATOR], @@ -80,5 +93,4 @@ AC_DEFUN([gl_SPAWN_H_DEFAULTS], HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1; AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_T]) REPLACE_POSIX_SPAWN=0; AC_SUBST([REPLACE_POSIX_SPAWN]) - SPAWN_H=''; AC_SUBST([SPAWN_H]) ])