Mail Archives: djgpp/1994/04/19/16:28:05
1/ The macro P_tmpdir in include/stdio.h has a trailing '/' character and
tmpnam.c assumes there is none. For example, tmpnam() function would
return "/tmp//022937" !
I guess P_tmpdir should be defined as "/tmp" instead of "/tmp/".
2/ The function tmpnam () in libsrc/c/gen/tmpnam.c returns NULL if there is
no /tmp directory !
IMHO tmpnam() should try the following directories in that order :
TMPDIR environment variable
P_tmpdir macro
/tmp
current directory
Let me know your comments.
Regards
Pierre Willard
- Raw text -