gnulib: update to 776af40e0
[deliverable/binutils-gdb.git] / gnulib / import / m4 / sys_types_h.m4
CommitLineData
9c9d63b1
PM
1# sys_types_h.m4 serial 11
2dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
8839a007
PA
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
4a626d0a 7AC_DEFUN_ONCE([gl_SYS_TYPES_H],
8839a007 8[
c0c3707f
CB
9 dnl Use sane struct stat types in OpenVMS 8.2 and later.
10 AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.])
11
8839a007
PA
12 AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
13 gl_NEXT_HEADERS([sys/types.h])
14
15 dnl Ensure the type pid_t gets defined.
16 AC_REQUIRE([AC_TYPE_PID_T])
17
18 dnl Ensure the type mode_t gets defined.
19 AC_REQUIRE([AC_TYPE_MODE_T])
20
21 dnl Whether to override the 'off_t' type.
22 AC_REQUIRE([gl_TYPE_OFF_T])
c0c3707f
CB
23
24 dnl Whether to override the 'dev_t' and 'ino_t' types.
25 m4_ifdef([gl_WINDOWS_STAT_INODES], [
26 AC_REQUIRE([gl_WINDOWS_STAT_INODES])
27 ], [
28 WINDOWS_STAT_INODES=0
29 ])
30 AC_SUBST([WINDOWS_STAT_INODES])
8839a007
PA
31])
32
33AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
34[
35])
49e4877c
PA
36
37# This works around a buggy version in autoconf <= 2.69.
c0c3707f 38# See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html>
9c9d63b1 39# The 2.70 version isn't quoted properly, so override it too.
49e4877c 40
9c9d63b1 41m4_version_prereq([2.70.1], [], [
49e4877c
PA
42
43m4_undefine([AC_HEADER_MAJOR])
44AC_DEFUN([AC_HEADER_MAJOR],
45[AC_CHECK_HEADERS_ONCE([sys/types.h])
46AC_CHECK_HEADER([sys/mkdev.h],
9c9d63b1
PM
47 [AC_DEFINE([MAJOR_IN_MKDEV], [1],
48 [Define to 1 if `major', `minor', and `makedev' are
49 declared in <mkdev.h>.])])
49e4877c
PA
50if test $ac_cv_header_sys_mkdev_h = no; then
51 AC_CHECK_HEADER([sys/sysmacros.h],
9c9d63b1
PM
52 [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
53 [Define to 1 if `major', `minor', and `makedev'
54 are declared in <sysmacros.h>.])])
49e4877c 55fi
9c9d63b1 56])# AC_HEADER_MAJOR
49e4877c
PA
57
58])
This page took 0.551984 seconds and 4 git commands to generate.