/pidgin/main: 8a0ae6cc73fc: Fix win32 build
Tomasz Wasilczyk
twasilczyk at pidgin.im
Mon Feb 24 15:22:14 EST 2014
Changeset: 8a0ae6cc73fca992ca3e84ab8e24a32a87b5e083
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-02-24 21:22 +0100
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/8a0ae6cc73fc
Description:
Fix win32 build
diffstat:
libpurple/plugins/perl/Makefile.mingw | 3 +++
libpurple/plugins/perl/common/Makefile.mingw | 3 +++
libpurple/protocols/gg/keymapper.c | 10 +++++-----
libpurple/protocols/gg/keymapper.h | 4 ++--
libpurple/protocols/mxit/markup.c | 2 +-
libpurple/win32/global.mak | 2 +-
pidgin/libpidgin.c | 2 +-
pidgin/pidgin.c | 4 ++++
pidgin/plugins/Makefile.mingw | 2 +-
pidgin/plugins/perl/Makefile.mingw | 3 +++
pidgin/plugins/perl/common/Makefile.mingw | 3 +++
pidgin/win32/gtkwin32dep.c | 9 ++++++---
pidgin/win32/gtkwin32dep.h | 3 ++-
13 files changed, 35 insertions(+), 15 deletions(-)
diffs (220 lines):
diff --git a/libpurple/plugins/perl/Makefile.mingw b/libpurple/plugins/perl/Makefile.mingw
--- a/libpurple/plugins/perl/Makefile.mingw
+++ b/libpurple/plugins/perl/Makefile.mingw
@@ -7,6 +7,9 @@
PIDGIN_TREE_TOP := ../../..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
+#we cannot include win32dep.h, but we need struct sockaddr_in6 definition
+CFLAGS += -include ws2tcpip.h
+
DEFINES := $(subst -DWIN32_LEAN_AND_MEAN,,$(DEFINES))
TARGET = perl
diff --git a/libpurple/plugins/perl/common/Makefile.mingw b/libpurple/plugins/perl/common/Makefile.mingw
--- a/libpurple/plugins/perl/common/Makefile.mingw
+++ b/libpurple/plugins/perl/common/Makefile.mingw
@@ -7,6 +7,9 @@
PIDGIN_TREE_TOP := ../../../..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
+#we cannot include win32dep.h, but we need struct sockaddr_in6 definition
+CFLAGS += -include ws2tcpip.h
+
GCCWARNINGS += -Wno-comment -Wno-unused -Wno-nested-externs
DEFINES := $(subst -DWIN32_LEAN_AND_MEAN,,$(DEFINES))
diff --git a/libpurple/protocols/gg/keymapper.c b/libpurple/protocols/gg/keymapper.c
--- a/libpurple/protocols/gg/keymapper.c
+++ b/libpurple/protocols/gg/keymapper.c
@@ -78,9 +78,9 @@ ggp_keymapper_free(ggp_keymapper *km)
}
gpointer
-ggp_keymapper_to_key(ggp_keymapper *km, uint64_t val)
+ggp_keymapper_to_key(ggp_keymapper *km, guint64 val)
{
- uint64_t *key;
+ guint64 *key;
g_return_val_if_fail(km != NULL, NULL);
@@ -88,7 +88,7 @@ ggp_keymapper_to_key(ggp_keymapper *km,
if (key)
return key;
- key = g_new(uint64_t, 1);
+ key = g_new(guint64, 1);
*key = val;
g_hash_table_insert(km->val_to_key, key, key);
@@ -96,11 +96,11 @@ ggp_keymapper_to_key(ggp_keymapper *km,
return key;
}
-uint64_t
+guint64
ggp_keymapper_from_key(ggp_keymapper *km, gpointer key)
{
g_return_val_if_fail(km != NULL, 0);
g_return_val_if_fail(key != NULL, 0);
- return *((uint64_t*)key);
+ return *((guint64*)key);
}
diff --git a/libpurple/protocols/gg/keymapper.h b/libpurple/protocols/gg/keymapper.h
--- a/libpurple/protocols/gg/keymapper.h
+++ b/libpurple/protocols/gg/keymapper.h
@@ -39,10 +39,10 @@ void
ggp_keymapper_free(ggp_keymapper *km);
gpointer
-ggp_keymapper_to_key(ggp_keymapper *km, uint64_t val);
+ggp_keymapper_to_key(ggp_keymapper *km, guint64 val);
/* The key have to be valid. */
-uint64_t
+guint64
ggp_keymapper_from_key(ggp_keymapper *km, gpointer key);
#endif /* _GGP_KEYMAPPER_H */
diff --git a/libpurple/protocols/mxit/markup.c b/libpurple/protocols/mxit/markup.c
--- a/libpurple/protocols/mxit/markup.c
+++ b/libpurple/protocols/mxit/markup.c
@@ -214,7 +214,7 @@ static int asn_getUtf8( const gchar* dat
return -1;
}
- len = (uint8_t)data[1]; /* length field [1 byte] */
+ len = (guint8)data[1]; /* length field [1 byte] */
out_str = g_malloc(len + 1);
memcpy(out_str, &data[2], len); /* data field */
out_str[len] = '\0';
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -19,7 +19,7 @@ BONJOUR_TOP ?= $(WIN32_DEV_TOP)/bonjour-
JSON_GLIB_TOP ?= $(WIN32_DEV_TOP)/json-glib-0.14
LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.9
MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0
-NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.15.4-nspr-4.10.2
+NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.14
PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl-5.10
SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1
TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.5
diff --git a/pidgin/libpidgin.c b/pidgin/libpidgin.c
--- a/pidgin/libpidgin.c
+++ b/pidgin/libpidgin.c
@@ -736,7 +736,7 @@ int pidgin_start(int argc, char *argv[])
#endif
#ifdef _WIN32
- winpidgin_init(hint);
+ winpidgin_init();
#endif
purple_core_set_ui_ops(pidgin_core_get_ui_ops());
diff --git a/pidgin/pidgin.c b/pidgin/pidgin.c
--- a/pidgin/pidgin.c
+++ b/pidgin/pidgin.c
@@ -43,5 +43,9 @@ int main(int argc, char *argv[])
g_set_prgname("Pidgin");
g_set_application_name(PIDGIN_NAME);
+#ifdef _WIN32
+ winpidgin_set_exe_hinstance(hint);
+#endif
+
return pidgin_start(argc, argv);
}
diff --git a/pidgin/plugins/Makefile.mingw b/pidgin/plugins/Makefile.mingw
--- a/pidgin/plugins/Makefile.mingw
+++ b/pidgin/plugins/Makefile.mingw
@@ -93,7 +93,7 @@ themeedit.dll: $(THEMEEDIT_OBJECTS)
include $(PIDGIN_COMMON_RULES)
plugins: \
- convcolors.dll \
+ contact_priority.dll \
extplacement.dll \
gtkbuddynote.dll \
history.dll \
diff --git a/pidgin/plugins/perl/Makefile.mingw b/pidgin/plugins/perl/Makefile.mingw
--- a/pidgin/plugins/perl/Makefile.mingw
+++ b/pidgin/plugins/perl/Makefile.mingw
@@ -7,6 +7,9 @@
PIDGIN_TREE_TOP := ../../..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
+#we cannot include win32dep.h, but we need struct sockaddr_in6 definition
+CFLAGS += -include ws2tcpip.h
+
##
## TARGET DEFINITIONS
##
diff --git a/pidgin/plugins/perl/common/Makefile.mingw b/pidgin/plugins/perl/common/Makefile.mingw
--- a/pidgin/plugins/perl/common/Makefile.mingw
+++ b/pidgin/plugins/perl/common/Makefile.mingw
@@ -7,6 +7,9 @@
PIDGIN_TREE_TOP := ../../../..
include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
+#we cannot include win32dep.h, but we need struct sockaddr_in6 definition
+CFLAGS += -include ws2tcpip.h
+
GCCWARNINGS += -Wno-comment -Wno-unused -Wno-nested-externs
DEFINES := $(subst -DWIN32_LEAN_AND_MEAN,,$(DEFINES))
diff --git a/pidgin/win32/gtkwin32dep.c b/pidgin/win32/gtkwin32dep.c
--- a/pidgin/win32/gtkwin32dep.c
+++ b/pidgin/win32/gtkwin32dep.c
@@ -74,6 +74,11 @@ HINSTANCE winpidgin_exe_hinstance(void)
return exe_hInstance;
}
+void winpidgin_set_exe_hinstance(HINSTANCE hint)
+{
+ exe_hInstance = hint;
+}
+
HINSTANCE winpidgin_dll_hinstance(void) {
return dll_hInstance;
}
@@ -385,7 +390,7 @@ winpidgin_conv_im_blink(PurpleAccount *a
return FALSE;
}
-void winpidgin_init(HINSTANCE hint) {
+void winpidgin_init(void) {
typedef void (__cdecl* LPFNSETLOGFILE)(const LPCSTR);
LPFNSETLOGFILE MySetLogFile;
gchar *exchndl_dll_path;
@@ -393,8 +398,6 @@ void winpidgin_init(HINSTANCE hint) {
if (purple_debug_is_verbose())
purple_debug_misc("winpidgin", "winpidgin_init start\n");
- exe_hInstance = hint;
-
exchndl_dll_path = g_build_filename(wpurple_install_dir(), "exchndl.dll", NULL);
MySetLogFile = (LPFNSETLOGFILE) wpurple_find_and_loadproc(exchndl_dll_path, "SetLogFile");
g_free(exchndl_dll_path);
diff --git a/pidgin/win32/gtkwin32dep.h b/pidgin/win32/gtkwin32dep.h
--- a/pidgin/win32/gtkwin32dep.h
+++ b/pidgin/win32/gtkwin32dep.h
@@ -28,6 +28,7 @@
HINSTANCE winpidgin_dll_hinstance(void);
HINSTANCE winpidgin_exe_hinstance(void);
+void winpidgin_set_exe_hinstance(HINSTANCE hint);
/* Utility */
int winpidgin_gz_decompress(const char* in, const char* out);
@@ -42,7 +43,7 @@ void winpidgin_window_flash(GtkWindow *w
DWORD winpidgin_get_lastactive(void);
/* init / cleanup */
-void winpidgin_init(HINSTANCE);
+void winpidgin_init(void);
void winpidgin_post_init(void);
void winpidgin_cleanup(void);
More information about the Commits
mailing list