159b005b3d426f1a8a065aaa4e5a1433dea46d87
[deliverable/binutils-gdb.git] / gnulib / import / m4 / sys_types_h.m4
1 # sys_types_h.m4 serial 6
2 dnl Copyright (C) 2011-2016 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 AC_DEFUN_ONCE([gl_SYS_TYPES_H],
8 [
9 AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
10 gl_NEXT_HEADERS([sys/types.h])
11
12 dnl Ensure the type pid_t gets defined.
13 AC_REQUIRE([AC_TYPE_PID_T])
14
15 dnl Ensure the type mode_t gets defined.
16 AC_REQUIRE([AC_TYPE_MODE_T])
17
18 dnl Whether to override the 'off_t' type.
19 AC_REQUIRE([gl_TYPE_OFF_T])
20 ])
21
22 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
23 [
24 ])
25
26 # This works around a buggy version in autoconf <= 2.69.
27 # See <https://lists.gnu.org/archive/html/autoconf/2016-08/msg00014.html>
28
29 m4_version_prereq([2.70], [], [
30
31 # This is taken from the following Autoconf patch:
32 # http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98
33
34 m4_undefine([AC_HEADER_MAJOR])
35 AC_DEFUN([AC_HEADER_MAJOR],
36 [AC_CHECK_HEADERS_ONCE([sys/types.h])
37 AC_CHECK_HEADER([sys/mkdev.h],
38 [AC_DEFINE([MAJOR_IN_MKDEV], [1],
39 [Define to 1 if `major', `minor', and `makedev' are declared in
40 <mkdev.h>.])])
41 if test $ac_cv_header_sys_mkdev_h = no; then
42 AC_CHECK_HEADER([sys/sysmacros.h],
43 [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
44 [Define to 1 if `major', `minor', and `makedev' are declared in
45 <sysmacros.h>.])])
46 fi
47 ])
48
49 ])
This page took 0.029889 seconds and 3 git commands to generate.