Skip to content

Commit 0e3cf5b

Browse files
miss-islingtonZackerySpytzserhiy-storchaka
authored
[3.12] bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX (pythonGH-19856) (pythonGH-113540)
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 72073ca commit 0e3cf5b

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
@@ -226,15 +226,16 @@ corresponding Unix manual entries for more information on calls.");
226226
# include <sys/uio.h>
227227
#endif
228228

229+
#ifdef HAVE_SYS_TYPES_H
230+
/* Should be included before <sys/sysmacros.h> on HP-UX v3 */
231+
# include <sys/types.h>
232+
#endif /* HAVE_SYS_TYPES_H */
233+
229234
#ifdef HAVE_SYS_SYSMACROS_H
230235
/* GNU C Library: major(), minor(), makedev() */
231236
# include <sys/sysmacros.h>
232237
#endif
233238

234-
#ifdef HAVE_SYS_TYPES_H
235-
# include <sys/types.h>
236-
#endif /* HAVE_SYS_TYPES_H */
237-
238239
#ifdef HAVE_SYS_STAT_H
239240
# include <sys/stat.h>
240241
#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
@@ -5260,6 +5260,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
52605260
#if defined(MAJOR_IN_MKDEV)
52615261
#include <sys/mkdev.h>
52625262
#elif defined(MAJOR_IN_SYSMACROS)
5263+
#include <sys/types.h>
52635264
#include <sys/sysmacros.h>
52645265
#else
52655266
#include <sys/types.h>

0 commit comments

Comments
 (0)