--- a/libpurple/protocols/ircv3/purpleircv3capabilities.c Tue Nov 29 00:06:45 2022 -0600
+++ b/libpurple/protocols/ircv3/purpleircv3capabilities.c Thu Dec 01 03:18:56 2022 -0600
@@ -28,6 +28,14 @@
static GParamSpec *properties[N_PROPERTIES] = {NULL, };
+/* Windows is does something weird with signal handling that includes defining + * SIG_ACK. We don't care about that here, so we undef it if we find it. + * See https://learn.microsoft.com/en-us/cpp/c-runtime-library/signal-action-constants?view=msvc-170 --- a/pidgin/meson.build Tue Nov 29 00:06:45 2022 -0600
+++ b/pidgin/meson.build Thu Dec 01 03:18:56 2022 -0600
@@ -176,11 +176,13 @@
input : 'win32/pidgin_exe_rc.rc.in',
output : 'pidgin_exe_rc.rc',
configuration : version_conf)
+ pidgin_WIN32_RESOURCES = windows.compile_resources(pidgin_exe_rc, + include_directories : include_directories('win32'))
- windows.compile_resources(pidgin_exe_rc,
- include_directories : include_directories('win32')
+ pidgin_WIN32_RESOURCES, --- a/pidgin/win32/gtkwin32dep.c Tue Nov 29 00:06:45 2022 -0600
+++ b/pidgin/win32/gtkwin32dep.c Thu Dec 01 03:18:56 2022 -0600
@@ -132,7 +132,7 @@
purple_debug_misc("winpidgin", "winpidgin_init start\n");
exchndl_dll_path = g_build_filename(wpurple_bin_dir(), "exchndl.dll", NULL);
- MySetLogFile = (LPFNSETLOGFILE) wpurple_find_and_loadproc(exchndl_dll_path, "SetLogFile");
+ MySetLogFile = (gpointer)wpurple_find_and_loadproc(exchndl_dll_path, "SetLogFile"); g_free(exchndl_dll_path);
@@ -168,7 +168,7 @@
/* suppress gcc "no previous prototype" warning */
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, G_GNUC_UNUSED DWORD fdwReason, G_GNUC_UNUSED LPVOID lpvReserved) { dll_hInstance = hinstDLL;
--- a/pidgin/win32/winpidgin.c Tue Nov 29 00:06:45 2022 -0600
+++ b/pidgin/win32/winpidgin.c Thu Dec 01 03:18:56 2022 -0600
@@ -41,6 +41,15 @@
+/* We can't include glib.h per the above warning, so we define our own unused +# define PIDGIN_WIN32_UNUSED __attribute__((unused)) +# define PIDGIN_WIN32_UNUSED typedef int (__cdecl* LPFNPIDGINMAIN)(HINSTANCE, int, char**);
typedef BOOL (WINAPI* LPFNSETDLLDIRECTORY)(LPCWSTR);
typedef BOOL (WINAPI* LPFNATTACHCONSOLE)(DWORD);
@@ -175,9 +184,12 @@
-WinMain (struct HINSTANCE__ *hInstance, struct HINSTANCE__ *hPrevInstance,
- char *lpszCmdLine, int nCmdShow) {
+WinMain(struct HINSTANCE__ *hInstance, + PIDGIN_WIN32_UNUSED struct HINSTANCE__ *hPrevInstance, + PIDGIN_WIN32_UNUSED char *lpszCmdLine, + PIDGIN_WIN32_UNUSED int nCmdShow) wchar_t pidgin_dir[MAX_PATH];
wchar_t *pidgin_dir_start = NULL;
@@ -220,8 +232,7 @@
/* Permanently enable DEP if the OS supports it */
if ((hmod = GetModuleHandleW(L"kernel32.dll"))) {
LPFNSETPROCESSDEPPOLICY MySetProcessDEPPolicy =
- (LPFNSETPROCESSDEPPOLICY)
- GetProcAddress(hmod, "SetProcessDEPPolicy");
+ (void *)GetProcAddress(hmod, "SetProcessDEPPolicy"); if (MySetProcessDEPPolicy)
MySetProcessDEPPolicy(1); //PROCESS_DEP_ENABLE
@@ -233,8 +244,7 @@
LPFNATTACHCONSOLE MyAttachConsole = NULL;
- GetProcAddress(hmod, "AttachConsole");
+ (void *)GetProcAddress(hmod, "AttachConsole"); if ((MyAttachConsole && MyAttachConsole(ATTACH_PARENT_PROCESS))
freopen("CONOUT$", "w", stdout);
@@ -274,7 +284,7 @@
/* Temporarily override exchndl.dll's logfile
* to something sane (Pidgin will override it
* again when it initializes) */
- MySetLogFile = (LPFNSETLOGFILE) GetProcAddress(hmod, "SetLogFile");
+ MySetLogFile = (void *)GetProcAddress(hmod, "SetLogFile"); if (GetTempPathA(sizeof(debug_dir), debug_dir) != 0) {
strcat(debug_dir, "pidgin.RPT");
@@ -285,7 +295,7 @@
/* The function signature for SetDebugInfoDir is the same as SetLogFile,
* so we can reuse the variable */
- MySetLogFile = (LPFNSETLOGFILE) GetProcAddress(hmod, "SetDebugInfoDir");
+ MySetLogFile = (void *)GetProcAddress(hmod, "SetDebugInfoDir"); char *pidgin_dir_ansi = NULL;
/* Restore pidgin_dir to point to where the executable is */
@@ -330,7 +340,7 @@
hmod = GetModuleHandleW(L"kernel32.dll");
- MySetDllDirectory = (LPFNSETDLLDIRECTORY) GetProcAddress(hmod, "SetDllDirectoryW");
+ MySetDllDirectory = (void *)GetProcAddress(hmod, "SetDllDirectoryW"); if (MySetDllDirectory == NULL) {
DWORD dw = GetLastError();
const wchar_t *err_msg = get_win32_error_message(dw);
@@ -370,7 +380,7 @@
/* Now we are ready for Pidgin .. */
if ((hmod = LoadLibraryW(LIBPIDGIN_DLL_NAMEW)))
- pidgin_main = (LPFNPIDGINMAIN) GetProcAddress(hmod, "pidgin_main");
+ pidgin_main = (void *)GetProcAddress(hmod, "pidgin_main"); DWORD dw = GetLastError();