/pidgin/main: 7fd9d189c054: Fix win32 Finch build

Tomasz Wasilczyk twasilczyk at pidgin.im
Fri May 8 18:11:36 EDT 2015


Changeset: 7fd9d189c054bea8f6cf5f3280519f43a7cb63c5
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2015-05-09 00:11 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/7fd9d189c054

Description:

Fix win32 Finch build

diffstat:

 finch/libgnt/Makefile.am |    2 +
 finch/libgnt/gntkeys.h   |  106 +++++++++++++++++++++++-----------------------
 2 files changed, 55 insertions(+), 53 deletions(-)

diffs (146 lines):

diff --git a/finch/libgnt/Makefile.am b/finch/libgnt/Makefile.am
--- a/finch/libgnt/Makefile.am
+++ b/finch/libgnt/Makefile.am
@@ -101,6 +101,8 @@ LIBGNT_WIN32RES = libgnt_winres.o
 libgnt_la_DEPENDENCIES += $(LIBGNT_WIN32RES)
 libgnt_la_LDFLAGS += -Wl,$(LIBGNT_WIN32RES)
 
+libgnt_la_LIBADD += -lgmodule-2.0
+
 endif
 
 AM_CPPFLAGS = \
diff --git a/finch/libgnt/gntkeys.h b/finch/libgnt/gntkeys.h
--- a/finch/libgnt/gntkeys.h
+++ b/finch/libgnt/gntkeys.h
@@ -46,48 +46,48 @@ extern char *gnt_key_cright;
 /* This is needed so that g-ir-scanner does not take GNT_KEY_CTRL_* as
    constants -- because if it does, the .gir contains the following invalid XML
    characters, and parsing explodes */
-#define CONST(x) x
+#define CONSTCH(x) x
 
 #ifdef _WIN32
 
 /* XXX: \xe1 is a hacky alias for \x00 key code */
 
-#define GNT_KEY_POPUP CONST("") /* not supported? */
+#define GNT_KEY_POPUP CONSTCH("") /* not supported? */
 
-#define GNT_KEY_UP CONST("\033\xe0\x48")
-#define GNT_KEY_DOWN CONST("\033\xe0\x50")
-#define GNT_KEY_LEFT CONST("\033\xe0\x4B")
-#define GNT_KEY_RIGHT CONST("\033\xe0\x4D")
+#define GNT_KEY_UP CONSTCH("\033\xe0\x48")
+#define GNT_KEY_DOWN CONSTCH("\033\xe0\x50")
+#define GNT_KEY_LEFT CONSTCH("\033\xe0\x4B")
+#define GNT_KEY_RIGHT CONSTCH("\033\xe0\x4D")
 
-#define GNT_KEY_CTRL_UP CONST("\033\xe0\x8d")
-#define GNT_KEY_CTRL_DOWN CONST("\033\xe0\x91")
-#define GNT_KEY_CTRL_LEFT CONST("\033\xe0\x73")
-#define GNT_KEY_CTRL_RIGHT CONST("\033\xe0\x74")
+#define GNT_KEY_CTRL_UP CONSTCH("\033\xe0\x8d")
+#define GNT_KEY_CTRL_DOWN CONSTCH("\033\xe0\x91")
+#define GNT_KEY_CTRL_LEFT CONSTCH("\033\xe0\x73")
+#define GNT_KEY_CTRL_RIGHT CONSTCH("\033\xe0\x74")
 
-#define GNT_KEY_PGUP CONST("\033\xe0\x49")
-#define GNT_KEY_PGDOWN CONST("\033\xe0\x51")
-#define GNT_KEY_HOME CONST("\033\xe0\x47")
-#define GNT_KEY_END CONST("\033\xe0\x4f")
+#define GNT_KEY_PGUP CONSTCH("\033\xe0\x49")
+#define GNT_KEY_PGDOWN CONSTCH("\033\xe0\x51")
+#define GNT_KEY_HOME CONSTCH("\033\xe0\x47")
+#define GNT_KEY_END CONSTCH("\033\xe0\x4f")
 
-#define GNT_KEY_ENTER CONST("\x0d")
+#define GNT_KEY_ENTER CONSTCH("\x0d")
 
-#define GNT_KEY_BACKSPACE CONST("\x08")
-#define GNT_KEY_DEL CONST("\033\xe0\x53")
-#define GNT_KEY_INS CONST("\033\xe0\x52")
-#define GNT_KEY_BACK_TAB CONST("\033\xe1\x94")
+#define GNT_KEY_BACKSPACE CONSTCH("\x08")
+#define GNT_KEY_DEL CONSTCH("\033\xe0\x53")
+#define GNT_KEY_INS CONSTCH("\033\xe0\x52")
+#define GNT_KEY_BACK_TAB CONSTCH("\033\xe1\x94")
 
-#define GNT_KEY_F1 CONST("\033\xe1\x3b")
-#define GNT_KEY_F2 CONST("\033\xe1\x3c")
-#define GNT_KEY_F3 CONST("\033\xe1\x3d")
-#define GNT_KEY_F4 CONST("\033\xe1\x3e")
-#define GNT_KEY_F5 CONST("\033\xe1\x3f")
-#define GNT_KEY_F6 CONST("\033\xe1\x40")
-#define GNT_KEY_F7 CONST("\033\xe1\x41")
-#define GNT_KEY_F8 CONST("\033\xe1\x42")
-#define GNT_KEY_F9 CONST("\033\xe1\x43")
-#define GNT_KEY_F10 CONST("\033\xe1\x44")
-#define GNT_KEY_F11 CONST("\033\xe0\x85")
-#define GNT_KEY_F12 CONST("\033\xe0\x86")
+#define GNT_KEY_F1 CONSTCH("\033\xe1\x3b")
+#define GNT_KEY_F2 CONSTCH("\033\xe1\x3c")
+#define GNT_KEY_F3 CONSTCH("\033\xe1\x3d")
+#define GNT_KEY_F4 CONSTCH("\033\xe1\x3e")
+#define GNT_KEY_F5 CONSTCH("\033\xe1\x3f")
+#define GNT_KEY_F6 CONSTCH("\033\xe1\x40")
+#define GNT_KEY_F7 CONSTCH("\033\xe1\x41")
+#define GNT_KEY_F8 CONSTCH("\033\xe1\x42")
+#define GNT_KEY_F9 CONSTCH("\033\xe1\x43")
+#define GNT_KEY_F10 CONSTCH("\033\xe1\x44")
+#define GNT_KEY_F11 CONSTCH("\033\xe0\x85")
+#define GNT_KEY_F12 CONSTCH("\033\xe0\x86")
 
 #else
 
@@ -131,28 +131,28 @@ extern char *gnt_key_cright;
 
 #endif
 
-#define GNT_KEY_CTRL_A     CONST("\001")
-#define GNT_KEY_CTRL_B     CONST("\002")
-#define GNT_KEY_CTRL_D     CONST("\004")
-#define GNT_KEY_CTRL_E     CONST("\005")
-#define GNT_KEY_CTRL_F     CONST("\006")
-#define GNT_KEY_CTRL_G     CONST("\007")
-#define GNT_KEY_CTRL_H     CONST("\010")
-#define GNT_KEY_CTRL_I     CONST("\011")
-#define GNT_KEY_CTRL_J     CONST("\012")
-#define GNT_KEY_CTRL_K     CONST("\013")
-#define GNT_KEY_CTRL_L     CONST("\014")
-#define GNT_KEY_CTRL_M     CONST("\012")
-#define GNT_KEY_CTRL_N     CONST("\016")
-#define GNT_KEY_CTRL_O     CONST("\017")
-#define GNT_KEY_CTRL_P     CONST("\020")
-#define GNT_KEY_CTRL_R     CONST("\022")
-#define GNT_KEY_CTRL_T     CONST("\024")
-#define GNT_KEY_CTRL_U     CONST("\025")
-#define GNT_KEY_CTRL_V     CONST("\026")
-#define GNT_KEY_CTRL_W     CONST("\027")
-#define GNT_KEY_CTRL_X     CONST("\030")
-#define GNT_KEY_CTRL_Y     CONST("\031")
+#define GNT_KEY_CTRL_A     CONSTCH("\001")
+#define GNT_KEY_CTRL_B     CONSTCH("\002")
+#define GNT_KEY_CTRL_D     CONSTCH("\004")
+#define GNT_KEY_CTRL_E     CONSTCH("\005")
+#define GNT_KEY_CTRL_F     CONSTCH("\006")
+#define GNT_KEY_CTRL_G     CONSTCH("\007")
+#define GNT_KEY_CTRL_H     CONSTCH("\010")
+#define GNT_KEY_CTRL_I     CONSTCH("\011")
+#define GNT_KEY_CTRL_J     CONSTCH("\012")
+#define GNT_KEY_CTRL_K     CONSTCH("\013")
+#define GNT_KEY_CTRL_L     CONSTCH("\014")
+#define GNT_KEY_CTRL_M     CONSTCH("\012")
+#define GNT_KEY_CTRL_N     CONSTCH("\016")
+#define GNT_KEY_CTRL_O     CONSTCH("\017")
+#define GNT_KEY_CTRL_P     CONSTCH("\020")
+#define GNT_KEY_CTRL_R     CONSTCH("\022")
+#define GNT_KEY_CTRL_T     CONSTCH("\024")
+#define GNT_KEY_CTRL_U     CONSTCH("\025")
+#define GNT_KEY_CTRL_V     CONSTCH("\026")
+#define GNT_KEY_CTRL_W     CONSTCH("\027")
+#define GNT_KEY_CTRL_X     CONSTCH("\030")
+#define GNT_KEY_CTRL_Y     CONSTCH("\031")
 
 /**
  * gnt_init_keys:



More information about the Commits mailing list