>I was just fiddling with updating the FreeBSD "port" of nmh from 1.0 to
>1.0.1 when I noticed that I get this warning compiling:
> cc -c -DHAVE_CONFIG_H -I.. -I. -I.. -O -pipe m_tmpfil.c
> m_tmpfil.c: In function `m_tmpfil':
> m_tmpfil.c:18: warning: passing arg 1 of `unlink' makes pointer from integer
>without a cast
>which caused me to check into it (it's probably happened forever without
>my checking into it :-)). The 'man mkstemp' shows this:
>...
>Now...unfortunately, it looks like all of the mkstemp() calls either
>assume that its return value is the char* filename or neglect to notice
>(or use) the fact that mkstemp() is returning an open file descriptor.
>Does anyone know if this is the standard mkstemp() definition? Has anyone
>noticed this? Or have a fix just waiting to be applied? I can take a
>look at it, but I'm not so sure WHEN...I've been in perpetual "deadline
>mode" for a while now (and a while longer)...
The solaris 7 definition agrees that it returns an open file
descriptor. Yes, I agree that this is a bug.
-NWR