[llvm-commits] [Patch] Trivial fix for build failure on MinGW

Ruben Van Boxem vanboxem.ruben at gmail.com
Mon Jun 6 13:25:08 PDT 2011


2011/6/6 Anton Korobeynikov <anton at korobeynikov.info>:
> Hi Ruben,
>
>> Attached patch changes _MSC_VER to _WIN32 so that the correct version
>> of the mkdir function is called with all Win32 platforms.
> What was the problem with mkdir call on mingw/cygwin?

The used overload (with a second argument) doesn't exist for MinGW,
because it doesn't exist for MSVC. MinGW is as close to MSVC as it can
be API-wise, so what goes for MSVC should work for MinGW, or it's a
bug or difficult to implement feature. Cygwin probably has the second
overload, but shouldn't define _WIN32 AFAIK. Cygwin isn't Win32 as far
as anything is concerned. It's __CYGWIN__, not _WIN32

For reference, the error message I got:
> M:\Development\Source\LLVM\runtime\libprofile\GCDAProfiling.c: In function 'recursive_mkdir':
> M:\Development\Source\LLVM\runtime\libprofile\GCDAProfiling.c:95:7: error: too many arguments to function 'mkdir'
> m:\development\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/include/io.h:267:15: note: declared here


>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>



More information about the llvm-commits mailing list