aboutsummaryrefslogtreecommitdiff
path: root/gnulib/import/m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-29 14:14:59 -0400
committerMike Frysinger <vapier@gentoo.org>2021-09-04 01:08:01 -0400
commite994f4ef451c83cd6c851c015433daa23566e2d9 (patch)
treef461757bbf4e3ab55a4805d5fe33aecdd560747e /gnulib/import/m4
parent3f630a60ea679f713474d98bfe4f2fe2fb59a68d (diff)
downloadgdb-e994f4ef451c83cd6c851c015433daa23566e2d9.zip
gdb-e994f4ef451c83cd6c851c015433daa23566e2d9.tar.gz
gdb-e994f4ef451c83cd6c851c015433daa23566e2d9.tar.bz2
gnulib: import sys_wait
A few sims use this to emulate process syscalls. Gdb builds seem to still be fine.
Diffstat (limited to 'gnulib/import/m4')
-rw-r--r--gnulib/import/m4/gnulib-cache.m42
-rw-r--r--gnulib/import/m4/gnulib-comp.m45
-rw-r--r--gnulib/import/m4/sys_wait_h.m436
3 files changed, 43 insertions, 0 deletions
diff --git a/gnulib/import/m4/gnulib-cache.m4 b/gnulib/import/m4/gnulib-cache.m4
index 689ebd3..5396840 100644
--- a/gnulib/import/m4/gnulib-cache.m4
+++ b/gnulib/import/m4/gnulib-cache.m4
@@ -76,6 +76,7 @@
# strstr \
# strtok_r \
# sys_stat \
+# sys_wait \
# time_r \
# unistd \
# unsetenv \
@@ -124,6 +125,7 @@ gl_MODULES([
strstr
strtok_r
sys_stat
+ sys_wait
time_r
unistd
unsetenv
diff --git a/gnulib/import/m4/gnulib-comp.m4 b/gnulib/import/m4/gnulib-comp.m4
index 03eff90..54ae5bb 100644
--- a/gnulib/import/m4/gnulib-comp.m4
+++ b/gnulib/import/m4/gnulib-comp.m4
@@ -213,6 +213,7 @@ AC_DEFUN([gl_EARLY],
# Code from module sys_time:
# Code from module sys_types:
# Code from module sys_uio:
+ # Code from module sys_wait:
# Code from module tempname:
# Code from module threadlib:
gl_THREADLIB_EARLY
@@ -777,6 +778,8 @@ AC_DEFUN([gl_INIT],
AC_PROG_MKDIR_P
gl_HEADER_SYS_UIO
AC_PROG_MKDIR_P
+ gl_SYS_WAIT_H
+ AC_PROG_MKDIR_P
gl_FUNC_GEN_TEMPNAME
gl_MODULE_INDICATOR([tempname])
AC_REQUIRE([gl_THREADLIB])
@@ -1184,6 +1187,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/sys_time.in.h
lib/sys_types.in.h
lib/sys_uio.in.h
+ lib/sys_wait.in.h
lib/tempname.c
lib/tempname.h
lib/time.in.h
@@ -1365,6 +1369,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/sys_time_h.m4
m4/sys_types_h.m4
m4/sys_uio_h.m4
+ m4/sys_wait_h.m4
m4/tempname.m4
m4/threadlib.m4
m4/time_h.m4
diff --git a/gnulib/import/m4/sys_wait_h.m4 b/gnulib/import/m4/sys_wait_h.m4
new file mode 100644
index 0000000..96e9ba2
--- /dev/null
+++ b/gnulib/import/m4/sys_wait_h.m4
@@ -0,0 +1,36 @@
+# sys_wait_h.m4 serial 6
+dnl Copyright (C) 2008-2021 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.
+])