Re: tmpnam vs mkstemp, was Re: [Exim] Problem with compiling…

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Adrian Phillips
日付:  
To: exim-users
題目: Re: tmpnam vs mkstemp, was Re: [Exim] Problem with compiling exim-3.22 on Linux
>>>>> "Philip" == Philip Hazel <ph10@???> writes:

    Philip> CONFORMING TO BSD 4.3


    Philip> which suggests it won't be in every Unix. Also, I see that
    Philip> the Solaris 8 man page states:


    Philip>      The tmpfile(3C) function is preferred over this
    Philip> function.


    Philip> This does not inspire me with confidence. However,
    Philip> tmpfile() *is* in the Standard. I'm not sure why I didn't
    Philip> make use of it (probably just forgot about its
    Philip> existence). I've noted the issue for investigation.


I just checked my (Debian) Linux manpage for tmpnam :-

BUGS
       Never use this function. Use tmpfile(3) instead.


!!

In fact I checked Debian's bug page to see if there was a bug report
for this but didn't find one, although I thought use of tmpnam was
heavily frowned upon now but may be my memory is going.

And one of the newer gccs (not sure from which version but 2.95.2 plus
patches at least) complains when compiling programs that use tmpnam.

I suggest seriously considering making the default to tmpfile with a
fallback to tmpnam at least for v4.

Sincerely,

Adrian Phillips

--
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now? [OK]