[PATCH 0/1] MR1694: setupapi: Move prototypes not in Windows's setupapi.h to setupapi_private.h.
And delete the ones we don't need. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1694
From: Alex Henrie <alexhenrie24(a)gmail.com> And delete the ones we don't need. --- dlls/setupapi/setupapi_private.h | 8 ++++++++ dlls/setupapi/tests/misc.c | 4 +++- include/setupapi.h | 22 ---------------------- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h index 7681348a11c..b9f67995829 100644 --- a/dlls/setupapi/setupapi_private.h +++ b/dlls/setupapi/setupapi_private.h @@ -87,6 +87,14 @@ static inline WCHAR *strdupAtoW( const char *str ) return ret; } +/* exported functions not in public headers */ + +void WINAPI MyFree( void *mem ); +void * WINAPI MyMalloc( DWORD size ) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(MyFree) __WINE_MALLOC; +void * WINAPI MyRealloc( void *src, DWORD size ) __WINE_ALLOC_SIZE(2) __WINE_DEALLOC(MyFree); +WCHAR * WINAPI MultiByteToUnicode( const char *str, UINT code_page ) __WINE_DEALLOC(MyFree) __WINE_MALLOC; +char * WINAPI UnicodeToMultiByte( const WCHAR *str, UINT code_page ) __WINE_DEALLOC(MyFree) __WINE_MALLOC; + /* string substitutions */ struct inf_file; diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index 769bcbcb5ca..b9eb3e6c75f 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -47,6 +47,7 @@ static CHAR CURR_DIR[MAX_PATH]; * - copy styles */ +static void (WINAPI *pMyFree)(void*); static BOOL (WINAPI *pSetupGetFileCompressionInfoExA)(PCSTR, PSTR, DWORD, PDWORD, PDWORD, PDWORD, PUINT); static BOOL (WINAPI *pSetupQueryInfOriginalFileInformationA)(PSP_INF_INFORMATION, UINT, PSP_ALTPLATFORM_INFO, PSP_ORIGINAL_FILE_INFO_A); @@ -470,7 +471,7 @@ static void test_SetupGetFileCompressionInfo(void) ok(target_size == sizeof(uncompressed), "got %ld\n", target_size); ok(type == FILE_COMPRESSION_NONE, "got %d, expected FILE_COMPRESSION_NONE\n", type); - MyFree(name); + pMyFree(name); DeleteFileA(source); } @@ -907,6 +908,7 @@ START_TEST(misc) { HMODULE hsetupapi = GetModuleHandleA("setupapi.dll"); + pMyFree = (void*)GetProcAddress(hsetupapi, "MyFree"); pSetupGetFileCompressionInfoExA = (void*)GetProcAddress(hsetupapi, "SetupGetFileCompressionInfoExA"); pSetupQueryInfOriginalFileInformationA = (void*)GetProcAddress(hsetupapi, "SetupQueryInfOriginalFileInformationA"); diff --git a/include/setupapi.h b/include/setupapi.h index 806df7baaf5..21992ead500 100644 --- a/include/setupapi.h +++ b/include/setupapi.h @@ -1417,26 +1417,9 @@ typedef enum { /* SetupUninstallOEMInf Flags values */ #define SUOI_FORCEDELETE 0x00000001 -LONG WINAPI AddTagToGroupOrderList(PCWSTR lpGroupName, DWORD dwUnknown2, DWORD dwUnknown3); -DWORD WINAPI CaptureAndConvertAnsiArg(PCSTR lpSrc, PWSTR *lpDst); -DWORD WINAPI CaptureStringArg(PCWSTR lpSrc, PWSTR *lpDst); -BOOL WINAPI DelayedMove(PCWSTR lpExistingFileName, PCWSTR lpNewFileName); -BOOL WINAPI DoesUserHavePrivilege(PCWSTR lpPrivilegeName); -PWSTR WINAPI DuplicateString(PCWSTR lpSrc); -BOOL WINAPI EnablePrivilege(PCWSTR lpPrivilegeName, BOOL bEnable); -BOOL WINAPI FileExists(PCWSTR lpFileName, PWIN32_FIND_DATAW lpFileFindData); void WINAPI InstallHinfSectionA( HWND hwnd, HINSTANCE handle, PCSTR cmdline, INT show ); void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, PCWSTR cmdline, INT show ); #define InstallHinfSection WINELIB_NAME_AW(InstallHinfSection) -BOOL WINAPI IsUserAdmin(VOID); -PWSTR WINAPI MultiByteToUnicode(PCSTR lpMultiByteStr, UINT uCodePage); -VOID WINAPI MyFree(PVOID lpMem); -PVOID WINAPI MyMalloc(DWORD dwSize); -PVOID WINAPI MyRealloc(PVOID lpSrc, DWORD dwSize); -DWORD WINAPI OpenAndMapForRead(PCWSTR, PDWORD, PHANDLE, PHANDLE, PVOID *); -LONG WINAPI QueryRegistryValue(HKEY, PCWSTR, PBYTE *, PDWORD, PDWORD); -/* RetreiveFileSecurity is not a typo, as per Microsoft's dlls */ -DWORD WINAPI RetreiveFileSecurity(PCWSTR, PSECURITY_DESCRIPTOR *); BOOL WINAPI SetupAddSectionToDiskSpaceListA(HDSKSPC, HINF, HINF, PCSTR, UINT, PVOID, UINT); BOOL WINAPI SetupAddSectionToDiskSpaceListW(HDSKSPC, HINF, HINF, PCWSTR, UINT, PVOID, UINT); #define SetupAddSectionToDiskSpaceList WINELIB_NAME_AW(SetupAddSectionToDiskSpaceList) @@ -1875,11 +1858,6 @@ BOOL WINAPI SetupUninstallNewlyCopiedInfs(HSPFILEQ, DWORD, PVOID); BOOL WINAPI SetupVerifyInfFileA(PCSTR, PSP_ALTPLATFORM_INFO, PSP_INF_SIGNER_INFO_A); BOOL WINAPI SetupVerifyInfFileW(PCWSTR, PSP_ALTPLATFORM_INFO, PSP_INF_SIGNER_INFO_W); #define SetupVerifyInfFile WINELIB_NAME_AW(SetupVerifyInfFile) -DWORD WINAPI StampFileSecurity(PCWSTR, PSECURITY_DESCRIPTOR); -DWORD WINAPI TakeOwnershipOfFile(PCWSTR); -PSTR WINAPI UnicodeToMultiByte(PCWSTR lpUnicodeStr, UINT uCodePage); -BOOL WINAPI UnmapAndCloseFile(HANDLE, HANDLE, PVOID); - #ifdef __cplusplus } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1694
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=127233 Your paranoid android. === debian11 (build log) === /home/winetest/tools/testbot/var/wine-win32/../wine/dlls/setupapi/stringtable.c:137: undefined reference to `MyMalloc' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-win32/../wine/dlls/setupapi/stringtable.c:141: undefined reference to `MyMalloc' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-win32/../wine/dlls/setupapi/stringtable.c:143: undefined reference to `MyFree' /home/winetest/tools/testbot/var/wine-win32/../wine/dlls/setupapi/stringtable.c:197: undefined reference to `MyFree' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-win32/../wine/dlls/setupapi/stringtable.c:198: undefined reference to `MyFree' /home/winetest/tools/testbot/var/wine-win32/../wine/dlls/setupapi/stringtable.c:223: undefined reference to `MyMalloc' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-win32/../wine/dlls/setupapi/stringtable.c:228: undefined reference to `MyMalloc' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-win32/../wine/dlls/setupapi/stringtable.c:230: undefined reference to `MyFree' collect2: error: ld returned 1 exit status Task: The win32 Wine build failed === debian11b (build log) === /home/winetest/tools/testbot/var/wine-wow32/../wine/dlls/setupapi/stringtable.c:137: undefined reference to `MyMalloc' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-wow32/../wine/dlls/setupapi/stringtable.c:141: undefined reference to `MyMalloc' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-wow32/../wine/dlls/setupapi/stringtable.c:143: undefined reference to `MyFree' /home/winetest/tools/testbot/var/wine-wow32/../wine/dlls/setupapi/stringtable.c:197: undefined reference to `MyFree' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-wow32/../wine/dlls/setupapi/stringtable.c:198: undefined reference to `MyFree' /home/winetest/tools/testbot/var/wine-wow32/../wine/dlls/setupapi/stringtable.c:223: undefined reference to `MyMalloc' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-wow32/../wine/dlls/setupapi/stringtable.c:228: undefined reference to `MyMalloc' /usr/bin/i686-w64-mingw32-ld: /home/winetest/tools/testbot/var/wine-wow32/../wine/dlls/setupapi/stringtable.c:230: undefined reference to `MyFree' collect2: error: ld returned 1 exit status Task: The wow32 Wine build failed
participants (3)
-
Alex Henrie -
Alex Henrie (@alexhenrie) -
Marvin