[issue6965] tmpnam should not be used if tempfile or mkstemp are available
Florent Xicluna la...@yahoo.fr added the comment: I get similar warnings while building on Debian AMD64: (...) libpython2.7.a(posixmodule.o): In function `posix_tmpnam': ./Modules/posixmodule.c:7193: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp' libpython2.7.a(posixmodule.o): In function `posix_tempnam': ./Modules/posixmodule.c:7148: warning: the use of `tempnam' is dangerous, better use `mkstemp' (...) -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6965] tmpnam should not be used if tempfile or mkstemp are available
Changes by Florent Xicluna la...@yahoo.fr: -- type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6965] tmpnam should not be used if tempfile or mkstemp are available
Florent Xicluna la...@yahoo.fr added the comment: Then close it as duplicate of issue486434, which was closed for the same reason. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6965] tmpnam should not be used if tempfile or mkstemp are available
New submission from djc dirk...@ochtman.nl: I have a bug report in the Gentoo tracker (http://bugs.gentoo.org/show_bug.cgi?id=221183): This is a rather strange request, but please bear me. While building Posix module, python checks (among others) for tmpfile, tmpnam and tmpnam_r however man pages state explicitly, that in case tmpfile is available, other two should not be used if libpython2.5.a is built with either of them, linker complains each time it's added While this doesn't break anything, it's still a bit annoying. so I propose to remove functionality as an enhancement: to change in Modules/posixmodule.c #ifdef HAVE_TMPNAM to #ifdef HAVE_TMPNAM !defined(HAVE_TMPFILE) Your thoughts? man 3 tmpnam state Never use this function. Use mkstemp(3) or tmpfile(3) instead.. Not sure whether this is exposed anywhere, but I figured this bug would be better handled upstream from Gentoo. -- components: Extension Modules messages: 92975 nosy: djc severity: normal status: open title: tmpnam should not be used if tempfile or mkstemp are available versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6965 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com