Skip to content

Commit 656eb16

Browse files
miss-islingtonZackerySpytzserhiy-storchaka
authored
[3.11] bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX (GH-19856) (GH-113541)
Always include <sys/types.h> before <sys/sysmacros.h>. (cherry picked from commit f108468) Co-authored-by: Zackery Spytz <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent a486d10 commit 656eb16

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The :func:`os.major`, :func:`os.makedev`, and :func:`os.minor` functions are
2+
now available on HP-UX v3.

Modules/posixmodule.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,16 @@ corresponding Unix manual entries for more information on calls.");
220220
# include <sys/uio.h>
221221
#endif
222222

223+
#ifdef HAVE_SYS_TYPES_H
224+
/* Should be included before <sys/sysmacros.h> on HP-UX v3 */
225+
# include <sys/types.h>
226+
#endif /* HAVE_SYS_TYPES_H */
227+
223228
#ifdef HAVE_SYS_SYSMACROS_H
224229
/* GNU C Library: major(), minor(), makedev() */
225230
# include <sys/sysmacros.h>
226231
#endif
227232

228-
#ifdef HAVE_SYS_TYPES_H
229-
# include <sys/types.h>
230-
#endif /* HAVE_SYS_TYPES_H */
231-
232233
#ifdef HAVE_SYS_STAT_H
233234
# include <sys/stat.h>
234235
#endif /* HAVE_SYS_STAT_H */

configure

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4995,6 +4995,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
49954995
#if defined(MAJOR_IN_MKDEV)
49964996
#include <sys/mkdev.h>
49974997
#elif defined(MAJOR_IN_SYSMACROS)
4998+
#include <sys/types.h>
49984999
#include <sys/sysmacros.h>
49995000
#else
50005001
#include <sys/types.h>

0 commit comments

Comments
 (0)