diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-10 10:43:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 10:43:20 (GMT) |
commit | c07206f2ccc2356aa74bc6813a94c2190017d44e (patch) | |
tree | 1677e5fdca5c3ce544e92c5484e16a0b68df1cc9 /gl/m4/pid_t.m4 | |
parent | e92046f810658016b7c373677efefda3b21400e4 (diff) | |
parent | d2fcf49ad4afc15f37d082d7bc96a808369ec2d4 (diff) | |
download | monitoring-plugins-c07206f2ccc2356aa74bc6813a94c2190017d44e.tar.gz |
Merge pull request #1832 from RincewindsHat/gnulib_update_2023
Gnulib update 2023 and attendant fixes
Diffstat (limited to 'gl/m4/pid_t.m4')
-rw-r--r-- | gl/m4/pid_t.m4 | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gl/m4/pid_t.m4 b/gl/m4/pid_t.m4 new file mode 100644 index 0000000..0fd7d0a --- /dev/null +++ b/gl/m4/pid_t.m4 | |||
@@ -0,0 +1,38 @@ | |||
1 | # pid_t.m4 serial 4 | ||
2 | dnl Copyright (C) 2020-2023 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | # The following implementation works around a problem in autoconf <= 2.69. | ||
8 | m4_version_prereq([2.70], [], [ | ||
9 | |||
10 | dnl Define pid_t if the headers don't define it. | ||
11 | AC_DEFUN([AC_TYPE_PID_T], | ||
12 | [ | ||
13 | AC_CHECK_TYPE([pid_t], | ||
14 | [], | ||
15 | [dnl On 64-bit native Windows, define it to the equivalent of 'intptr_t' | ||
16 | dnl (= 'long long' = '__int64'), because that is the return type | ||
17 | dnl of the _spawnv* functions | ||
18 | dnl <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/spawnvp-wspawnvp> | ||
19 | dnl and the argument type of the _cwait function | ||
20 | dnl <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/cwait>. | ||
21 | dnl Otherwise (on 32-bit Windows and on old Unix platforms), define it | ||
22 | dnl to 'int'. | ||
23 | AC_COMPILE_IFELSE( | ||
24 | [AC_LANG_PROGRAM([[ | ||
25 | #if defined _WIN64 && !defined __CYGWIN__ | ||
26 | LLP64 | ||
27 | #endif | ||
28 | ]]) | ||
29 | ], | ||
30 | [gl_pid_type='int'], | ||
31 | [gl_pid_type='__int64']) | ||
32 | AC_DEFINE_UNQUOTED([pid_t], [$gl_pid_type], | ||
33 | [Define as a signed integer type capable of holding a process identifier.]) | ||
34 | ], | ||
35 | [AC_INCLUDES_DEFAULT]) | ||
36 | ]) | ||
37 | |||
38 | ])# m4_version_prereq 2.70 | ||