Date: Tue, 19 Apr 1994 12:52:31 +0800 From: pierre AT phi DOT la DOT tce DOT com (Pierre Willard) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: bug tmpnam() in djgpp 111m4 Reply-To: pierre AT la DOT tce DOT com 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