[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkstemp declaration fix
From: |
Bruce Korb |
Subject: |
Re: mkstemp declaration fix |
Date: |
Tue, 20 Mar 2007 09:00:43 -0700 |
User-agent: |
Thunderbird 1.5.0.8 (X11/20060911) |
Bruno Haible wrote:
> Hello,
>
> On MacOS X 10.3, one gets this warning:
>
> mkstemp-safer.c:34: warning: implicit declaration of function `mkstemp'
>
> The reason is that mkstemp is declared in <unistd.h>, not <stdlib.h>, on
> this platform. But for POSIX compatibility, only gnulib's <stdlib.h> should
> be sufficient to declare the function. I'm applying this:
Just a question: is including "unistd.h" the right approach?
Not clear to me that pulling in all of unistd.h is the right way
since that means ``#include <stdlib.h>'' implies ``#include <unistd.h>''.
Probably the easiest solution,....
It's almost tempting to look at fixincludes, but on second thought
that would undoubtedly bring in way too much baggage. Way too much.