From: Greg Ward Date: Wed, 1 Mar 2000 18:59:47 +0000 (+0000) Subject: Fix compiler warning: only use "_r" form of 'ctermid()' and 'tmpnam()' when X-Git-Tag: v1.6a1~314 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9217fcbb38887f2d0a25fb798d4df5fa9edcd797;p=thirdparty%2FPython%2Fcpython.git Fix compiler warning: only use "_r" form of 'ctermid()' and 'tmpnam()' when building a threaded Python. --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 77c0ba185e67..4e50f1bf370e 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);