> does anyone know of a GCC #pragma that will suppress
> the warnings about tmpnam being used unsafely?
Or better yet, is there a 'safe', ANSI-specified, way of obtaining a temporary file name?
If not, and if tmpnam/tempnam have platform-specific behaviour, we could better implement our own vul_tempname or so.
On Thu, Dec 13, 2001 at 04:05:56PM +0100, Peter.Vanroose@... wrote:
> If not, and if tmpnam/tempnam have platform-specific behaviour, we
> could better implement our own vul_tempname or so.
The GCC warnings and errors on tmpnam have bugged me enough that I
wrote vul_tmpnam. I'll replace all instances of tmpnam with vul_tmpnam
soon, unless someone protests.
[ Question for Windows users: is there a way to find out what the temp
directory name is? ANSI C says use P_tmpdir from stdio.h, and the
Windows documentation concurs, but when I ran a test on Windows,
P_tmpdir was set to "/" [ or may be "C:\"; I forget ]. )