Fix compiler warning: only use "_r" form of 'ctermid()' and 'tmpnam()' when
building a threaded Python.
This commit is contained in:
parent
c6e87a2925
commit
9217fcbb38
|
@ -649,7 +649,7 @@ posix_ctermid(self, args)
|
||||||
if (!PyArg_ParseTuple(args, ":ctermid"))
|
if (!PyArg_ParseTuple(args, ":ctermid"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#ifdef HAVE_CTERMID_R
|
#if defined(HAVE_CTERMID_R) && defined(WITH_THREAD)
|
||||||
ret = ctermid_r(buffer);
|
ret = ctermid_r(buffer);
|
||||||
#else
|
#else
|
||||||
ret = ctermid(buffer);
|
ret = ctermid(buffer);
|
||||||
|
@ -3342,7 +3342,7 @@ posix_tmpnam(self, args)
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, ":tmpnam"))
|
if (!PyArg_ParseTuple(args, ":tmpnam"))
|
||||||
return NULL;
|
return NULL;
|
||||||
#ifdef HAVE_TMPNAM_R
|
#if defined(HAVE_TMPNAM_R) && defined(WITH_THREAD)
|
||||||
name = tmpnam_r(buffer);
|
name = tmpnam_r(buffer);
|
||||||
#else
|
#else
|
||||||
name = tmpnam(buffer);
|
name = tmpnam(buffer);
|
||||||
|
|
Loading…
Reference in New Issue