summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-03-01 18:59:47 (GMT)
committerGreg Ward <gward@python.net>2000-03-01 18:59:47 (GMT)
commit9217fcbb38887f2d0a25fb798d4df5fa9edcd797 (patch)
treea7c85ced64165c15c9907da3a336bc18820983a3 /Modules/posixmodule.c
parentc6e87a2925e41c0847c1eccc994d7f32d069778b (diff)
downloadcpython-9217fcbb38887f2d0a25fb798d4df5fa9edcd797.zip
cpython-9217fcbb38887f2d0a25fb798d4df5fa9edcd797.tar.gz
cpython-9217fcbb38887f2d0a25fb798d4df5fa9edcd797.tar.bz2
Fix compiler warning: only use "_r" form of 'ctermid()' and 'tmpnam()' when
building a threaded Python.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 77c0ba1..4e50f1b 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -649,7 +649,7 @@ posix_ctermid(self, args)
if (!PyArg_ParseTuple(args, ":ctermid"))
return NULL;
-#ifdef HAVE_CTERMID_R
+#if defined(HAVE_CTERMID_R) && defined(WITH_THREAD)
ret = ctermid_r(buffer);
#else
ret = ctermid(buffer);
@@ -3342,7 +3342,7 @@ posix_tmpnam(self, args)
if (!PyArg_ParseTuple(args, ":tmpnam"))
return NULL;
-#ifdef HAVE_TMPNAM_R
+#if defined(HAVE_TMPNAM_R) && defined(WITH_THREAD)
name = tmpnam_r(buffer);
#else
name = tmpnam(buffer);