This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [TRIVIAL] libiberty, fix includes for mktemp()


On Tue, Sep 22, 2009 at 5:03 PM, Ian Lance Taylor <iant@google.com> wrote:
>> On Sat, Sep 5, 2009 at 11:23 PM, Ozkan Sezer <sezeroz@gmail.com> wrote:
>> Hello: ?The folllowing trivial patch fixes warnings emitted from
>> libiberty/choose-temp.c in mingw* builds:
>> choose-temp.c:68: warning: implicit declaration of function 'mktemp'
>> Mingw* headers declare mktemp() in io.h which is included from
>> unistd.h.
>>
>> --- a/libiberty/choose-temp.c ? 2007-01-31 22:05:50.000000000 +0200
>> +++ b/libiberty/choose-temp.c ? 2009-09-05 21:33:41.000000000 +0300
>> @@ -22,6 +22,10 @@ Boston, MA 02110-1301, USA. ?*/
>> ?#endif
>>
>> ?#include <stdio.h> ? ? /* May get P_tmpdir. ?*/
>> +#include <sys/types.h>
>> +#ifdef HAVE_UNISTD_H
>> +#include <unistd.h>
>> +#endif
>> ?#ifdef HAVE_STDLIB_H
>> ?#include <stdlib.h>
>> ?#endif
>>
>> Tested by compiling binutils for x86_64-pc-mingw32. ?Please apply
>> to gcc and sourceware.org. ?(I don't have write permissions.)
>
> This patch is OK with a ChangeLog entry.
>

This would be the ChangeLog entry:

2009-09-22  Ozkan Sezer  <sezeroz@gmail.com>

	* choose-temp.c: Include unistd.h for mingw targets.


> It would be helpful is somebody volunteered to apply it.
>

Thanks.

--
Ozkan


> Thanks.
>
> Ian
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]