summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_posixsubprocess.c2
-rw-r--r--Modules/posixmodule.c2
-rw-r--r--Modules/socketmodule.c2
-rw-r--r--Modules/timemodule.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 2b2c57d..81a23c6 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -30,7 +30,7 @@
# define SYS_getdents64 __NR_getdents64
#endif
-#if defined(sun)
+#if defined(__sun) && defined(__SVR4)
/* readdir64 is used to work around Solaris 9 bug 6395699. */
# define readdir readdir64
# define dirent dirent64
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 41fedb0..4ff1694 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -6335,7 +6335,7 @@ os_openpty_impl(PyObject *module)
#endif
#if defined(HAVE_DEV_PTMX) && !defined(HAVE_OPENPTY) && !defined(HAVE__GETPTY)
PyOS_sighandler_t sig_saved;
-#ifdef sun
+#if defined(__sun) && defined(__SVR4)
extern char *ptsname(int fildes);
#endif
#endif
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 0ae280f..8c3c2fa 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -267,7 +267,7 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&
#endif
/* Solaris fails to define this variable at all. */
-#if defined(sun) && !defined(INET_ADDRSTRLEN)
+#if (defined(__sun) && defined(__SVR4)) && !defined(INET_ADDRSTRLEN)
#define INET_ADDRSTRLEN 16
#endif
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 43951d5..fa0f198 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -755,7 +755,7 @@ time_strftime(PyObject *self, PyObject *args)
return NULL;
}
-#if defined(_MSC_VER) || defined(sun) || defined(_AIX)
+#if defined(_MSC_VER) || (defined(__sun) && defined(__SVR4)) || defined(_AIX)
if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) {
PyErr_SetString(PyExc_ValueError,
"strftime() requires year in [1; 9999]");
@@ -801,7 +801,7 @@ time_strftime(PyObject *self, PyObject *args)
return NULL;
}
}
-#elif (defined(_AIX) || defined(sun)) && defined(HAVE_WCSFTIME)
+#elif (defined(_AIX) || (defined(__sun) && defined(__SVR4))) && defined(HAVE_WCSFTIME)
for (outbuf = wcschr(fmt, '%');
outbuf != NULL;
outbuf = wcschr(outbuf+2, '%'))