gnulib: add module sys_wait, for compilation on MinGW

Also, upgrade to gnulib 4af1990a0902f5914f582bade9d1aa843a291f5a.

* lib/sys_wait.in.h, m4/sys_wait_h.m4: New files.
* m4/sys_stat_h.m4, m4/stdlib_h.m4, m4/gnulib-comp.m4,
m4/gnulib-cache.m4, lib/stdlib.in.h, lib/Makefile.am: Update.
This commit is contained in:
Alexandre Duret-Lutz 2012-10-13 18:13:52 +02:00
parent d22fb0b61f
commit 7e79fcb4e3
8 changed files with 218 additions and 5 deletions

View file

@ -27,7 +27,7 @@
# Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=tools --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files --no-libtool --no-vc-files argp error gethrxtime mkstemp progname
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=tools --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files --no-libtool --no-vc-files argp error gethrxtime mkstemp progname sys_wait
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
@ -39,6 +39,7 @@ gl_MODULES([
gethrxtime
mkstemp
progname
sys_wait
])
gl_AVOID([])
gl_SOURCE_BASE([lib])

View file

@ -100,6 +100,7 @@ AC_DEFUN([gl_EARLY],
# Code from module sys_stat:
# Code from module sys_time:
# Code from module sys_types:
# Code from module sys_wait:
# Code from module sysexits:
# Code from module tempname:
# Code from module time:
@ -305,6 +306,8 @@ AC_DEFUN([gl_INIT],
AC_PROG_MKDIR_P
gl_SYS_TYPES_H
AC_PROG_MKDIR_P
gl_SYS_WAIT_H
AC_PROG_MKDIR_P
gl_SYSEXITS
gl_FUNC_GEN_TEMPNAME
gl_HEADER_TIME_H
@ -540,6 +543,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/sys_stat.in.h
lib/sys_time.in.h
lib/sys_types.in.h
lib/sys_wait.in.h
lib/sysexits.in.h
lib/tempname.c
lib/tempname.h
@ -616,6 +620,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/sys_stat_h.m4
m4/sys_time_h.m4
m4/sys_types_h.m4
m4/sys_wait_h.m4
m4/sysexits.m4
m4/tempname.m4
m4/time_h.m4

View file

@ -102,6 +102,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])

View file

@ -1,4 +1,4 @@
# sys_stat_h.m4 serial 28 -*- Autoconf -*-
# sys_stat_h.m4 serial 27 -*- Autoconf -*-
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -11,6 +11,9 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
dnl For the mkdir substitute.
AC_REQUIRE([AC_C_INLINE])
dnl Check for broken stat macros.
AC_REQUIRE([AC_HEADER_STAT])

36
m4/sys_wait_h.m4 Normal file
View file

@ -0,0 +1,36 @@
# sys_wait_h.m4 serial 6
dnl Copyright (C) 2008-2012 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.
AC_DEFUN([gl_SYS_WAIT_H],
[
AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
dnl <sys/wait.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([sys/wait.h])
dnl Ensure the type pid_t gets defined.
AC_REQUIRE([AC_TYPE_PID_T])
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 <sys/wait.h>]],
[waitpid])
])
AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
dnl Define it also as a C macro, for the benefit of the unit tests.
gl_MODULE_INDICATOR_FOR_TESTS([$1])
])
AC_DEFUN([gl_SYS_WAIT_H_DEFAULTS],
[
GNULIB_WAITPID=0; AC_SUBST([GNULIB_WAITPID])
dnl Assume proper GNU behavior unless another module says otherwise.
])