summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJakub KulĂ­k <Kulikjak@gmail.com>2023-10-09 21:18:05 (GMT)
committerGitHub <noreply@github.com>2023-10-09 21:18:05 (GMT)
commit3b1580af07c0ce90d1c2073ab087772283d7e3b9 (patch)
tree764bd45ee98417ec03223e7d0324cf93cf0c36ca /configure
parent0050670d76193ea529f51d0526256cb7a769d61b (diff)
downloadcpython-3b1580af07c0ce90d1c2073ab087772283d7e3b9.zip
cpython-3b1580af07c0ce90d1c2073ab087772283d7e3b9.tar.gz
cpython-3b1580af07c0ce90d1c2073ab087772283d7e3b9.tar.bz2
gh-78469: Declare missing sethostname for Solaris 10 (#109447)
Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure b/configure
index 1799323..d68c4e8 100755
--- a/configure
+++ b/configure
@@ -4284,6 +4284,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; }