Skip to content

Commit

Permalink
bpo-11102: Make configure enable major(), makedev(), and minor() on H…
Browse files Browse the repository at this point in the history
…P-UX (GH-19856)

Always include <sys/types.h> before <sys/sysmacros.h>.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
ZackerySpytz and serhiy-storchaka authored Dec 28, 2023
1 parent f167686 commit f108468
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The :func:`os.major`, :func:`os.makedev`, and :func:`os.minor` functions are
now available on HP-UX v3.
9 changes: 5 additions & 4 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,16 @@ corresponding Unix manual entries for more information on calls.");
# include <sys/uio.h>
#endif

#ifdef HAVE_SYS_TYPES_H
/* Should be included before <sys/sysmacros.h> on HP-UX v3 */
# include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */

#ifdef HAVE_SYS_SYSMACROS_H
/* GNU C Library: major(), minor(), makedev() */
# include <sys/sysmacros.h>
#endif

#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */

#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif /* HAVE_SYS_STAT_H */
Expand Down
1 change: 1 addition & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5102,6 +5102,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
#elif defined(MAJOR_IN_SYSMACROS)
#include <sys/types.h>
#include <sys/sysmacros.h>
#else
#include <sys/types.h>
Expand Down

0 comments on commit f108468

Please sign in to comment.