summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub KulĂ­k <Kulikjak@gmail.com>2021-04-30 15:21:42 +0200
committerGitHub <noreply@github.com>2021-04-30 15:21:42 +0200
commit9032cf5cb1e33c0349089cfb0f6bf11ed3c30e86 (patch)
tree86ccc15aac78e1225299e09c12215d942b147d6f /configure
parentbpo-43916: PyStdPrinter_Type uses Py_TPFLAGS_DISALLOW_INSTANTIATION (GH-25749) (diff)
downloadcpython-9032cf5cb1e33c0349089cfb0f6bf11ed3c30e86.tar.gz
cpython-9032cf5cb1e33c0349089cfb0f6bf11ed3c30e86.tar.bz2
cpython-9032cf5cb1e33c0349089cfb0f6bf11ed3c30e86.zip
bpo-43667: Fix broken Unicode encoding in non-UTF locales on Solaris (GH-25096)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index ad0367fe0e2..08a88aa46d5 100755
--- a/configure
+++ b/configure
@@ -15264,6 +15264,22 @@ else
$as_echo "no" >&6; }
fi
+case $ac_sys_system/$ac_sys_release in
+SunOS/*)
+ if test -f /etc/os-release; then
+ OS_NAME=$(awk -F= '/^NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
+ if test "x$OS_NAME" = "xOracle Solaris"; then
+ # bpo-43667: In Oracle Solaris, the internal form of wchar_t in
+ # non-Unicode locales is not Unicode and hence cannot be used directly.
+ # https://docs.oracle.com/cd/E37838_01/html/E61053/gmwke.html
+
+$as_echo "#define HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION 1" >>confdefs.h
+
+ fi
+ fi
+ ;;
+esac
+
# check for endianness
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }