[cmake-developers] "Conflicting types for 'cmsysProcess_SetPipeNative'" compiling in MinGW

Brad King brad.king at kitware.com
Mon Feb 16 10:06:25 EST 2015


On 02/15/2015 05:47 AM, vano at mail.mipt.ru wrote:
> c:/Users/native_api/Documents/cmake-3.2.0-rc1/Source/kwsys/ProcessWin32.c:749:6: note: in expansion of macro 'kwsysProcess_SetPipeNative'
>  void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, HANDLE p[2])
[snip]
> c:/Users/native_api/Documents/cmake-3.2.0-rc1/Bootstrap.cmk/cmsys/Process.h:175:18: note: in expansion of macro 'kwsysProcess_SetPipeNative'
>  kwsysEXPORT void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe,

One of these is in the header and one is in the implementation file.
The code has been this way for years and we do have nightly testing
on some (likely older) versions of MinGW tools.  Something about the
environment may have changed.

The one in the header is:

 typedef void* kwsysProcess_Pipe_Handle;
 ...
 void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe,
                                 kwsysProcess_Pipe_Handle p[2]);

to avoid exposing clients to <windows.h>.  The one in the implementation
file is

 void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, HANDLE p[2])

Is HANDLE not "void*"?  Is this compiler picky about the different
typedef names for the same type?

Thanks,
-Brad



More information about the cmake-developers mailing list