summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJakub Kulík <Kulikjak@gmail.com>2021-05-21 14:59:39 (GMT)
committerGitHub <noreply@github.com>2021-05-21 14:59:39 (GMT)
commitd3cc68900dc99966007112f884779895daefc7db (patch)
tree52dc54deeb60f5cc538d05c75dd153c4ff524392 /configure
parent0593ae84af9e0e8332644e7ed13d7fd8306c4e1a (diff)
downloadcpython-d3cc68900dc99966007112f884779895daefc7db.zip
cpython-d3cc68900dc99966007112f884779895daefc7db.tar.gz
cpython-d3cc68900dc99966007112f884779895daefc7db.tar.bz2
[3.9] bpo-43667: Fix broken Unicode encoding in non-UTF locales on Solaris (GH-25096) (GH-25847)
(cherry picked from commit 9032cf5cb1e33c0349089cfb0f6bf11ed3c30e86) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index 8dcdbf1..c584866 100755
--- a/configure
+++ b/configure
@@ -15123,6 +15123,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; }