Re: [PATCH] msvc: Fix compilation error due to missing mktemp() declaration
- From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
- Date
- Dec 30, 2010, 19:33 UTC
- Message-ID
- <4D1CDE84.7090402@ramsay1.demon.co.uk>
- In-Reply-To
- <AANLkTineKS2e8PJs76PLZP4L4APwX2kAiFPg4pz3esae@mail.gmail.com>
Erik Faye-Lund wrote:
Show 16 quoted lines
> On Thu, Dec 23, 2010 at 8:05 PM, Ramsay Jones > <ramsay@ramsay1.demon.co.uk> wrote: >> Commit d1b6e6e (win32: use our own dirent.h, 2010-11-23) removed >> the compat/vcbuild/include/dirent.h compatibility header file. >> This file, among other things, included the <io.h> system header >> file which provides the declaration of the mktemp() function. >> >> In order to fix the compilation error, we add an include directive >> for <io.h> to the compat/vcbuild/include/unistd.h header. (The >> MinGW build includes <io.h> from it's <unistd.h> header too.) >> >> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> >> --- > > Thanks. But shouldn't this header be included in mingw.h (or perhaps > msvc.h) because of _get_osfhandle and _commit?
Er... no. ;-)
All uses of _get_osfhandle() and _commit() on the msvc build (after this patch) are within the scope of an appropriate declaration, so there is no *need* to include <io.h> in either mingw.h or msvc.h. [I'm confident the same is true of the MinGW build as well, but I didn't have time to check before sending this mail...]
I suspect that you already know this and I'm just being dumb in missing the import of your question... Perhaps you could clarify your concerns regarding this patch?
ATB, Ramsay Jones