closes bpo-39619 Fix os.chroot on HP-UX 11.31 (GH-18495)
Setting `-D_XOPEN_SOURCE=700` on HP-UX causes system functions such as chroot to be undefined. This change stops `_XOPEN_SOURCE` begin set on HP-UX
Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit a9edf44a2de9b23a1690b36cdfeed7b41ab763bd)
Co-authored-by: Ian Norton <inorton@gmail.com>
diff --git a/configure.ac b/configure.ac
index 7051dc1..e57ef7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -521,6 +521,12 @@
define_xopen_source=no
;;
+ # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
+ # chroot() and other functions
+ hp*|HP*)
+ define_xopen_source=no
+ ;;
+
esac
if test $define_xopen_source = yes