summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-10 09:26:36 (GMT)
committerGitHub <noreply@github.com>2023-10-10 09:26:36 (GMT)
commit190660abe9168ef16370c2b8f346288ebda11fb3 (patch)
treeb3a44b26fb85c836433b366d2c1fed1a5628f017 /configure
parent2fc80814bf55445fb2cc56b25ec54d8e308e3408 (diff)
downloadcpython-190660abe9168ef16370c2b8f346288ebda11fb3.zip
cpython-190660abe9168ef16370c2b8f346288ebda11fb3.tar.gz
cpython-190660abe9168ef16370c2b8f346288ebda11fb3.tar.bz2
[3.12] gh-78469: Declare missing sethostname for Solaris 10 (GH-109447) (#110580)
Add OS version specific macro for Solaris: Py_SUNOS_VERSION. (cherry picked from commit 3b1580af07c0ce90d1c2073ab087772283d7e3b9) Co-authored-by: Jakub KulĂ­k <Kulikjak@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure b/configure
index 985b374..0240ff8 100755
--- a/configure
+++ b/configure
@@ -4304,6 +4304,15 @@ then
darwin*) MACHDEP="darwin";;
'') MACHDEP="unknown";;
esac
+
+ if test "$ac_sys_system" = "SunOS"; then
+ # For Solaris, there isn't an OS version specific macro defined
+ # in most compilers, so we define one here.
+ SUNOS_VERSION=`echo $ac_sys_release | sed -e 's!\.\(0-9\)$!.0\1!g' | tr -d '.'`
+
+printf "%s\n" "#define Py_SUNOS_VERSION $SUNOS_VERSION" >>confdefs.h
+
+ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
printf "%s\n" "\"$MACHDEP\"" >&6; }