sys_types_h.m4 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # sys_types_h.m4 serial 13
  2. dnl Copyright (C) 2011-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. AC_DEFUN_ONCE([gl_SYS_TYPES_H],
  7. [
  8. AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
  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. gl_NEXT_HEADERS([sys/types.h])
  12. dnl Ensure the type pid_t gets defined.
  13. AC_REQUIRE([AC_TYPE_PID_T])
  14. dnl Ensure the type mode_t gets defined.
  15. AC_REQUIRE([AC_TYPE_MODE_T])
  16. dnl Whether to override the 'off_t' type.
  17. AC_REQUIRE([gl_TYPE_OFF_T])
  18. dnl Whether to override the 'dev_t' and 'ino_t' types.
  19. m4_ifdef([gl_WINDOWS_STAT_INODES], [
  20. AC_REQUIRE([gl_WINDOWS_STAT_INODES])
  21. ], [
  22. WINDOWS_STAT_INODES=0
  23. ])
  24. AC_SUBST([WINDOWS_STAT_INODES])
  25. ])
  26. # Initializes the default values for AC_SUBSTed shell variables.
  27. # This macro must not be AC_REQUIREd. It must only be invoked, and only
  28. # outside of macros or in macros that are not AC_REQUIREd.
  29. AC_DEFUN([gl_SYS_TYPES_H_REQUIRE_DEFAULTS],
  30. [
  31. m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS], [
  32. ])
  33. m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS])
  34. AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
  35. ])
  36. AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
  37. [
  38. ])
  39. # This works around a buggy version in autoconf <= 2.69.
  40. # See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html>
  41. # The 2.70 version isn't quoted properly, so override it too.
  42. m4_version_prereq([2.70.1], [], [
  43. m4_undefine([AC_HEADER_MAJOR])
  44. AC_DEFUN([AC_HEADER_MAJOR],
  45. [AC_CHECK_HEADERS_ONCE([sys/types.h])
  46. AC_CHECK_HEADER([sys/mkdev.h],
  47. [AC_DEFINE([MAJOR_IN_MKDEV], [1],
  48. [Define to 1 if `major', `minor', and `makedev' are
  49. declared in <mkdev.h>.])])
  50. if test $ac_cv_header_sys_mkdev_h = no; then
  51. AC_CHECK_HEADER([sys/sysmacros.h],
  52. [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
  53. [Define to 1 if `major', `minor', and `makedev'
  54. are declared in <sysmacros.h>.])])
  55. fi
  56. ])# AC_HEADER_MAJOR
  57. ])