[Python-checkins] cpython: Issue #19922: define _INCLUDE__STDC_A1_SOURCE in HP-UX to include mbstate_t

christian.heimes python-checkins at python.org
Sat Dec 7 23:39:42 CET 2013


http://hg.python.org/cpython/rev/d8cfc7106f41
changeset:   87815:d8cfc7106f41
user:        Christian Heimes <christian at cheimes.de>
date:        Sat Dec 07 23:39:33 2013 +0100
summary:
  Issue #19922: define _INCLUDE__STDC_A1_SOURCE in HP-UX to include mbstate_t
for mbrtowc().

files:
  Misc/NEWS     |  3 +++
  configure     |  9 +++++++++
  configure.ac  |  7 +++++++
  pyconfig.h.in |  3 +++
  4 files changed, 22 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -108,6 +108,9 @@
 Build
 -----
 
+- Issue #19922: define _INCLUDE__STDC_A1_SOURCE in HP-UX to include mbstate_t
+  for mbrtowc().
+
 - Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the
   pythoncore sub-project.  This should prevent build errors due a previous
   build's python(_d).exe still running.
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -3445,6 +3445,15 @@
 
 fi
 
+# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
+case $ac_sys_system in
+hp*|HP*)
+
+$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
+
+  ;;
+esac
+
 #
 # SGI compilers allow the specification of the both the ABI and the
 # ISA on the command line.  Depending on the values of these switches,
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -522,6 +522,13 @@
   AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008)
 fi
 
+# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
+case $ac_sys_system in
+hp*|HP*)
+  AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc)
+  ;;
+esac
+
 #
 # SGI compilers allow the specification of the both the ABI and the
 # ISA on the command line.  Depending on the values of these switches,
diff --git a/pyconfig.h.in b/pyconfig.h.in
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -1382,6 +1382,9 @@
 /* Define on Linux to activate all library features */
 #undef _GNU_SOURCE
 
+/* Define to include mbstate_t for mbrtowc */
+#undef _INCLUDE__STDC_A1_SOURCE
+
 /* This must be defined on some systems to enable large file support. */
 #undef _LARGEFILE_SOURCE
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list