Issue #19922: define _INCLUDE__STDC_A1_SOURCE in HP-UX to include mbstate_t
for mbrtowc().
diff --git a/configure b/configure
index 5d666ed..6bcc4b5 100755
--- 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,