/pidgin/main: 02bf3200b9cb: cross-win32: make use of WIN32_LEAN_...

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Apr 23 19:42:09 EDT 2014


Changeset: 02bf3200b9cbb400c947a8c92a71d88c83d5b1b7
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-24 01:42 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/02bf3200b9cb

Description:

cross-win32: make use of WIN32_LEAN_AND_MEAN define

diffstat:

 configure.ac                     |  2 ++
 libpurple/win32/giowin32.c       |  2 +-
 libpurple/win32/libc_interface.c |  4 +++-
 libpurple/win32/libc_interface.h |  3 +++
 libpurple/win32/win32dep.h       |  3 +++
 pidgin/gtkutils.c                |  3 +--
 pidgin/gtkxfer.c                 |  4 ++++
 pidgin/win32/gtkdocklet-win32.c  |  3 +++
 pidgin/win32/gtkwin32dep.c       |  1 +
 pidgin/win32/gtkwin32dep.h       |  3 +++
 pidgin/win32/winpidgin.c         |  1 +
 11 files changed, 25 insertions(+), 4 deletions(-)

diffs (147 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -141,6 +141,8 @@ case "$host" in
 			cross-compiling) for windows. It's a temporary hack to remain
 			non-autotools win32 build working. Drop it when we fully
 			switch our win32 build to autotools.])
+		AC_DEFINE(WIN32_LEAN_AND_MEAN, 1,
+			[Define to 1, to build faster on win32.])
 		;;
 	*)
 		is_win32="no"
diff --git a/libpurple/win32/giowin32.c b/libpurple/win32/giowin32.c
--- a/libpurple/win32/giowin32.c
+++ b/libpurple/win32/giowin32.c
@@ -32,7 +32,7 @@
 /* Define this to get (very) verbose logging of all channels */
 /* #define G_IO_WIN32_DEBUG */
 
-/* #include "config.h" */
+#include <config.h>
 
 #include <glib.h>
 
diff --git a/libpurple/win32/libc_interface.c b/libpurple/win32/libc_interface.c
--- a/libpurple/win32/libc_interface.c
+++ b/libpurple/win32/libc_interface.c
@@ -18,6 +18,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  *
  */
+
+#include <config.h>
+
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <io.h>
@@ -28,7 +31,6 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <glib.h>
-#include "config.h"
 #include "debug.h"
 #include "libc_internal.h"
 #include <glib/gstdio.h>
diff --git a/libpurple/win32/libc_interface.h b/libpurple/win32/libc_interface.h
--- a/libpurple/win32/libc_interface.h
+++ b/libpurple/win32/libc_interface.h
@@ -22,6 +22,9 @@
  */
 #ifndef _LIBC_INTERFACE_H_
 #define _LIBC_INTERFACE_H_
+
+#include <config.h>
+
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <io.h>
diff --git a/libpurple/win32/win32dep.h b/libpurple/win32/win32dep.h
--- a/libpurple/win32/win32dep.h
+++ b/libpurple/win32/win32dep.h
@@ -22,6 +22,9 @@
  */
 #ifndef _WIN32DEP_H_
 #define _WIN32DEP_H_
+
+#include <config.h>
+
 #include <winsock2.h>
 #include <windows.h>
 #include <shlobj.h>
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -25,9 +25,8 @@
 #include "pidgin.h"
 
 #ifdef _WIN32
-# ifdef small
 #  undef small
-# endif
+#  include <shellapi.h>
 #endif /*_WIN32*/
 
 #ifdef USE_GTKSPELL
diff --git a/pidgin/gtkxfer.c b/pidgin/gtkxfer.c
--- a/pidgin/gtkxfer.c
+++ b/pidgin/gtkxfer.c
@@ -32,6 +32,10 @@
 #include "pidginstock.h"
 #include "gtkutils.h"
 
+#ifdef _WIN32
+#  include <shellapi.h>
+#endif
+
 /* the maximum size of files we will try to make a thumbnail for */
 #define PIDGIN_XFER_MAX_SIZE_IMAGE_THUMBNAIL 10 * 1024 * 1024
 
diff --git a/pidgin/win32/gtkdocklet-win32.c b/pidgin/win32/gtkdocklet-win32.c
--- a/pidgin/win32/gtkdocklet-win32.c
+++ b/pidgin/win32/gtkdocklet-win32.c
@@ -21,6 +21,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  * 02111-1301, USA.
  */
+
+#include <config.h>
+
 #include <windows.h>
 #include <gdk/gdkwin32.h>
 #include <gdk/gdk.h>
diff --git a/pidgin/win32/gtkwin32dep.c b/pidgin/win32/gtkwin32dep.c
--- a/pidgin/win32/gtkwin32dep.c
+++ b/pidgin/win32/gtkwin32dep.c
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <winuser.h>
+#include <shellapi.h>
 
 #include <glib.h>
 #include <glib/gstdio.h>
diff --git a/pidgin/win32/gtkwin32dep.h b/pidgin/win32/gtkwin32dep.h
--- a/pidgin/win32/gtkwin32dep.h
+++ b/pidgin/win32/gtkwin32dep.h
@@ -22,6 +22,9 @@
  */
 #ifndef _GTKWIN32DEP_H_
 #define _GTKWIN32DEP_H_
+
+#include <config.h>
+
 #include <windows.h>
 #include <gtk/gtk.h>
 #include "conversation.h"
diff --git a/pidgin/win32/winpidgin.c b/pidgin/win32/winpidgin.c
--- a/pidgin/win32/winpidgin.c
+++ b/pidgin/win32/winpidgin.c
@@ -28,6 +28,7 @@
 #include "config.h"
 
 #include <windows.h>
+#include <shellapi.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>



More information about the Commits mailing list