This first patch should not break the Unix build. This patch fixes building most of the source files on MS_VC. I tested building under Mingw and we can still build and link but one of you guys on *nix may want to double check. After this patch you will still get the following errors with MS_VC and the PSDK headers. I figured I would wait and ask for comments on how to move forward to fix the following problems as there has been a little work in setupapi recently. Thanks Steven Changelog: Setupapi porting fixes --------------------Configuration: setupapi - Win32-------------------- Compiling... devinst.c F:\src\wine-dev\wine\dlls\setupapi\devinst.c(41) : error C2146: syntax error : missing ')' before identifier 'DeviceInterfaceDetailData' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(41) : error C2081: 'PSP_DEVICE_INTERFACE_DETAIL_DATAA' : name in formal parameter list illegal F:\src\wine-dev\wine\dlls\setupapi\devinst.c(41) : error C2061: syntax error : identifier 'DeviceInterfaceDetailData' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(41) : error C2059: syntax error : ';' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(41) : error C2059: syntax error : ',' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(44) : error C2059: syntax error : ')' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(56) : error C2146: syntax error : missing ')' before identifier 'DeviceInterfaceDetailData' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(56) : error C2081: 'PSP_DEVICE_INTERFACE_DETAIL_DATAW' : name in formal parameter list illegal F:\src\wine-dev\wine\dlls\setupapi\devinst.c(56) : error C2061: syntax error : identifier 'DeviceInterfaceDetailData' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(56) : error C2059: syntax error : ';' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(56) : error C2059: syntax error : ',' F:\src\wine-dev\wine\dlls\setupapi\devinst.c(59) : error C2059: syntax error : ')' setupcab.c F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(257) : error C2065: 'FILE_IN_CABINET_INFOA' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(257) : error C2146: syntax error : missing ';' before identifier 'fici' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(257) : error C2065: 'fici' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(258) : error C2275: 'PSC_HSC_A' : illegal use of this type as an expression F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(64) : see declaration of 'PSC_HSC_A' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(258) : error C2146: syntax error : missing ';' before identifier 'phsc' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(258) : error C2065: 'phsc' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(259) : error C2065: 'CABINET_INFOA' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(259) : error C2146: syntax error : missing ';' before identifier 'ci' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(259) : error C2065: 'ci' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(260) : error C2275: 'FILEPATHS_A' : illegal use of this type as an expression C:\Program Files\Microsoft SDK\include\setupapi.h(439) : see declaration of 'FILEPATHS_A' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(260) : error C2146: syntax error : missing ';' before identifier 'fp' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(260) : error C2065: 'fp' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(261) : error C2275: 'UINT' : illegal use of this type as an expression C:\Program Files\Microsoft SDK\include\windef.h(162) : see declaration of 'UINT' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(261) : error C2146: syntax error : missing ';' before identifier 'err' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(261) : error C2065: 'err' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(263) : error C2275: 'CHAR' : illegal use of this type as an expression C:\Program Files\Microsoft SDK\include\winnt.h(265) : see declaration of 'CHAR' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(263) : error C2146: syntax error : missing ';' before identifier 'mysterio' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(263) : error C2065: 'mysterio' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(263) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(265) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(265) : error C2102: '&' requires l-value F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(265) : error C2198: 'memset' : too few actual parameters F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(270) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct SC_HSC_A *' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(285) : error C2224: left of '.CabinetFile' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(285) : error C2223: left of '->most_recent_cabinet_name' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(286) : error C2224: left of '.CabinetPath' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(287) : error C2224: left of '.DiskName' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(288) : error C2224: left of '.SetId' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(289) : error C2224: left of '.CabinetNumber' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(290) : error C2223: left of '->msghandler' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(290) : error C2223: left of '->context' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(303) : error C2224: left of '.NameInCabinet' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(304) : error C2224: left of '.FileSize' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(305) : error C2224: left of '.Win32Error' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(306) : error C2224: left of '.DosDate' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(307) : error C2224: left of '.DosTime' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(308) : error C2224: left of '.DosAttribs' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(309) : error C2224: left of '.FullTargetName' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(309) : error C2198: 'memset' : too few actual parameters F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(310) : error C2223: left of '->msghandler' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(310) : error C2223: left of '->context' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(313) : error C2224: left of '.FullTargetName' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(313) : error C2198: 'debugstr_a' : too few actual parameters F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(314) : error C2224: left of '.FullTargetName' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(319) : error C2224: left of '.FullTargetName' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(319) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'const int ' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(319) : warning C4024: 'sc_cb_open' : different types for formal and actual parameter 1 F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(319) : error C2198: 'sc_cb_open' : too few actual parameters F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(329) : error C2224: left of '.Source' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(329) : error C2223: left of '->most_recent_cabinet_name' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(330) : error C2224: left of '.Target' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(331) : error C2224: left of '.Win32Error' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(332) : error C2224: left of '.Flags' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(335) : error C2223: left of '->msghandler' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(335) : error C2223: left of '->context' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(350) : error C2224: left of '.CabinetFile' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(351) : error C2224: left of '.CabinetPath' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(352) : error C2224: left of '.DiskName' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(353) : error C2224: left of '.SetId' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(354) : error C2224: left of '.CabinetNumber' must have struct/union type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(356) : error C2223: left of '->most_recent_cabinet_name' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(356) : error C2198: 'strcpy' : too few actual parameters F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(357) : error C2223: left of '->msghandler' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(357) : error C2223: left of '->context' must point to struct/union F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(357) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(357) : error C2102: '&' requires l-value F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(362) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(364) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(364) : error C2106: '=' : left operand must be l-value F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(365) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(365) : error C2102: '&' requires l-value F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(365) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'const int ' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(365) : warning C4024: 'strncpy' : different types for formal and actual parameter 2 F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(365) : error C2198: 'strncpy' : too few actual parameters F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(366) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(366) : error C2106: '=' : left operand must be l-value F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(378) : error C2065: 'FILE_IN_CABINET_INFOW' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(378) : error C2146: syntax error : missing ';' before identifier 'fici' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(379) : error C2275: 'PSC_HSC_W' : illegal use of this type as an expression F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(73) : see declaration of 'PSC_HSC_W' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(379) : error C2146: syntax error : missing ';' before identifier 'phsc' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(380) : error C2065: 'CABINET_INFOW' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(380) : error C2146: syntax error : missing ';' before identifier 'ci' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(381) : error C2275: 'FILEPATHS_W' : illegal use of this type as an expression C:\Program Files\Microsoft SDK\include\setupapi.h(446) : see declaration of 'FILEPATHS_W' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(381) : error C2146: syntax error : missing ';' before identifier 'fp' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(382) : error C2275: 'UINT' : illegal use of this type as an expression C:\Program Files\Microsoft SDK\include\windef.h(162) : see declaration of 'UINT' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(382) : error C2146: syntax error : missing ';' before identifier 'err' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(383) : error C2143: syntax error : missing ';' before 'type' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(385) : error C2275: 'WCHAR' : illegal use of this type as an expression C:\Program Files\Microsoft SDK\include\winnt.h(275) : see declaration of 'WCHAR' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(385) : error C2146: syntax error : missing ';' before identifier 'mysterio' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(385) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(386) : error C2275: 'WCHAR' : illegal use of this type as an expression C:\Program Files\Microsoft SDK\include\winnt.h(275) : see declaration of 'WCHAR' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(386) : error C2146: syntax error : missing ';' before identifier 'buf' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(386) : error C2065: 'buf' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(386) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(386) : error C2065: 'buf2' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(386) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(387) : error C2275: 'CHAR' : illegal use of this type as an expression C:\Program Files\Microsoft SDK\include\winnt.h(265) : see declaration of 'CHAR' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(387) : error C2146: syntax error : missing ';' before identifier 'charbuf' F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(387) : error C2065: 'charbuf' : undeclared identifier F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(387) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(389) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(389) : error C2102: '&' requires l-value F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(389) : error C2198: 'memset' : too few actual parameters F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(390) : error C2109: subscript requires array or pointer type F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(390) : error C2102: '&' requires l-value F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(390) : error C2198: 'memset' : too few actual parameters F:\src\wine-dev\wine\dlls\setupapi\setupcab.c(390) : fatal error C1003: error count exceeds 100; stopping compilation Generating Code... Error executing cl.exe. setupapi.dll - 114 error(s), 5 warning(s) WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
Attachment:
patch.diff
Description: Binary data