diff options
Diffstat (limited to 'gl/m4/sys_types_h.m4')
-rw-r--r-- | gl/m4/sys_types_h.m4 | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4 index d15c1b3..627671f 100644 --- a/gl/m4/sys_types_h.m4 +++ b/gl/m4/sys_types_h.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # sys_types_h.m4 serial 5 | 1 | # sys_types_h.m4 serial 13 |
2 | dnl Copyright (C) 2011-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2011-2023 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -7,6 +7,10 @@ dnl with or without modifications, as long as this notice is preserved. | |||
7 | AC_DEFUN_ONCE([gl_SYS_TYPES_H], | 7 | AC_DEFUN_ONCE([gl_SYS_TYPES_H], |
8 | [ | 8 | [ |
9 | AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) | 9 | AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) |
10 | |||
11 | dnl Use sane struct stat types in OpenVMS 8.2 and later. | ||
12 | AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.]) | ||
13 | |||
10 | gl_NEXT_HEADERS([sys/types.h]) | 14 | gl_NEXT_HEADERS([sys/types.h]) |
11 | 15 | ||
12 | dnl Ensure the type pid_t gets defined. | 16 | dnl Ensure the type pid_t gets defined. |
@@ -17,8 +21,50 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H], | |||
17 | 21 | ||
18 | dnl Whether to override the 'off_t' type. | 22 | dnl Whether to override the 'off_t' type. |
19 | AC_REQUIRE([gl_TYPE_OFF_T]) | 23 | AC_REQUIRE([gl_TYPE_OFF_T]) |
24 | |||
25 | dnl Whether to override the 'dev_t' and 'ino_t' types. | ||
26 | m4_ifdef([gl_WINDOWS_STAT_INODES], [ | ||
27 | AC_REQUIRE([gl_WINDOWS_STAT_INODES]) | ||
28 | ], [ | ||
29 | WINDOWS_STAT_INODES=0 | ||
30 | ]) | ||
31 | AC_SUBST([WINDOWS_STAT_INODES]) | ||
32 | ]) | ||
33 | |||
34 | # Initializes the default values for AC_SUBSTed shell variables. | ||
35 | # This macro must not be AC_REQUIREd. It must only be invoked, and only | ||
36 | # outside of macros or in macros that are not AC_REQUIREd. | ||
37 | AC_DEFUN([gl_SYS_TYPES_H_REQUIRE_DEFAULTS], | ||
38 | [ | ||
39 | m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS], [ | ||
40 | ]) | ||
41 | m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS]) | ||
42 | AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) | ||
20 | ]) | 43 | ]) |
21 | 44 | ||
22 | AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], | 45 | AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], |
23 | [ | 46 | [ |
24 | ]) | 47 | ]) |
48 | |||
49 | # This works around a buggy version in autoconf <= 2.69. | ||
50 | # See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html> | ||
51 | # The 2.70 version isn't quoted properly, so override it too. | ||
52 | |||
53 | m4_version_prereq([2.70.1], [], [ | ||
54 | |||
55 | m4_undefine([AC_HEADER_MAJOR]) | ||
56 | AC_DEFUN([AC_HEADER_MAJOR], | ||
57 | [AC_CHECK_HEADERS_ONCE([sys/types.h]) | ||
58 | AC_CHECK_HEADER([sys/mkdev.h], | ||
59 | [AC_DEFINE([MAJOR_IN_MKDEV], [1], | ||
60 | [Define to 1 if `major', `minor', and `makedev' are | ||
61 | declared in <mkdev.h>.])]) | ||
62 | if test $ac_cv_header_sys_mkdev_h = no; then | ||
63 | AC_CHECK_HEADER([sys/sysmacros.h], | ||
64 | [AC_DEFINE([MAJOR_IN_SYSMACROS], [1], | ||
65 | [Define to 1 if `major', `minor', and `makedev' | ||
66 | are declared in <sysmacros.h>.])]) | ||
67 | fi | ||
68 | ])# AC_HEADER_MAJOR | ||
69 | |||
70 | ]) | ||