From 8ae9725b0124b429486033cc00a5a7dc05744469 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Fri, 1 May 2020 23:45:01 -0600 Subject: [PATCH 1/2] bpo-11102: Make configure find major(), makedev(), and minor() on HP-UX sys/types.h must be included before sys/sysmacros.h --- Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst | 2 ++ configure | 1 + configure.ac | 1 + 3 files changed, 4 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst diff --git a/Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst b/Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst new file mode 100644 index 00000000000000..6477538edf5550 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-05-01-23-44-31.bpo-11102.Fw9zeS.rst @@ -0,0 +1,2 @@ +The :func:`os.major`, :func:`os.makedev`, and :func:`os.minor` functions are +now available on HP-UX v3. diff --git a/configure b/configure index a8a35d0defc6b3..84c0c83db75314 100755 --- a/configure +++ b/configure @@ -13175,6 +13175,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #if defined(MAJOR_IN_MKDEV) #include #elif defined(MAJOR_IN_SYSMACROS) +#include #include #else #include diff --git a/configure.ac b/configure.ac index f996051efc719e..07174cc7e49b3b 100644 --- a/configure.ac +++ b/configure.ac @@ -3989,6 +3989,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #if defined(MAJOR_IN_MKDEV) #include #elif defined(MAJOR_IN_SYSMACROS) +#include #include #else #include From 2e916971c4d0a9db20a76d134d606f9e451caace Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 27 Dec 2023 14:54:09 +0200 Subject: [PATCH 2/2] Always include before . --- Modules/posixmodule.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index c635fd4d993d57..f4a18536e8f1e1 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -236,15 +236,16 @@ corresponding Unix manual entries for more information on calls."); # include #endif +#ifdef HAVE_SYS_TYPES_H +/* Should be included before on HP-UX v3 */ +# include +#endif /* HAVE_SYS_TYPES_H */ + #ifdef HAVE_SYS_SYSMACROS_H /* GNU C Library: major(), minor(), makedev() */ # include #endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif /* HAVE_SYS_TYPES_H */ - #ifdef HAVE_SYS_STAT_H # include #endif /* HAVE_SYS_STAT_H */