Skip to content

Commit 90166a0

Browse files
ZackerySpytzserhiy-storchaka
authored andcommitted
bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX (pythonGH-19856)
Always include <sys/types.h> before <sys/sysmacros.h>. Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 89867ca commit 90166a0

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

239+
#ifdef HAVE_SYS_TYPES_H
240+
/* Should be included before <sys/sysmacros.h> on HP-UX v3 */
241+
# include <sys/types.h>
242+
#endif /* HAVE_SYS_TYPES_H */
243+
239244
#ifdef HAVE_SYS_SYSMACROS_H
240245
/* GNU C Library: major(), minor(), makedev() */
241246
# include <sys/sysmacros.h>
242247
#endif
243248

244-
#ifdef HAVE_SYS_TYPES_H
245-
# include <sys/types.h>
246-
#endif /* HAVE_SYS_TYPES_H */
247-
248249
#ifdef HAVE_SYS_STAT_H
249250
# include <sys/stat.h>
250251
#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
@@ -5102,6 +5102,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
51025102
#if defined(MAJOR_IN_MKDEV)
51035103
#include <sys/mkdev.h>
51045104
#elif defined(MAJOR_IN_SYSMACROS)
5105+
#include <sys/types.h>
51055106
#include <sys/sysmacros.h>
51065107
#else
51075108
#include <sys/types.h>

0 commit comments

Comments
 (0)