Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Sun, 12 Jul 2015 15:40:30 UTC Commit: e5471fb5cedd11ed508971f909939da95a628c15 https://github.com/geany/geany/commit/e5471fb5cedd11ed508971f909939da95a628c...
Log Message: ----------- Include win32defines.h before win32.h to fix build errors
Modified Paths: -------------- src/socket.c src/spawn.c src/win32.c src/win32defines.h
Modified: src/socket.c 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -57,6 +57,8 @@
#ifdef HAVE_SOCKET
+#include "win32defines.h" /* should always come before any system headers */ + #include "socket.h"
#include "app.h" @@ -79,7 +81,6 @@ # include <netinet/in.h> # include <glib/gstdio.h> #else -# include "win32defines.h" # include <winsock2.h> # include <windows.h> # include <gdk/gdkwin32.h>
Modified: src/spawn.c 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -43,13 +43,14 @@ # include "config.h" #endif
+#include "win32defines.h" /* should always come before any system headers */ + #include <errno.h> #include <string.h>
#include "spawn.h"
#ifdef G_OS_WIN32 -# include "win32defines.h" # include <ctype.h> /* isspace() */ # include <fcntl.h> /* _O_RDONLY, _O_WRONLY */ # include <io.h> /* _open_osfhandle, _close */
Modified: src/win32.c 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -27,12 +27,12 @@ # include "config.h" #endif
+#include "win32defines.h" /* should always come before any system headers */ + #include "win32.h"
#ifdef G_OS_WIN32
-#include "win32defines.h" - #include "dialogs.h" #include "document.h" #include "editor.h" @@ -982,14 +982,14 @@ gchar *win32_get_shortcut_target(const gchar *file_name) gchar *path = NULL; wchar_t *wfilename = g_utf8_to_utf16(file_name, -1, NULL, NULL, NULL); HWND hWnd = NULL; - + if (main_widgets.window != NULL) { GdkWindow *window = gtk_widget_get_window(main_widgets.window); if (window != NULL) hWnd = GDK_WINDOW_HWND(window); } - + resolve_link(hWnd, wfilename, &path); g_free(wfilename);
Modified: src/win32defines.h 63 lines changed, 32 insertions(+), 31 deletions(-) =================================================================== @@ -1,31 +1,32 @@ -/* - * win32defines.h - this file is part of Geany, a fast and lightweight IDE - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef WIN32DEFINES_H -#define WIN32DEFINES_H 1 - -/* These defines are necessary defines *before* windows.h is included */ - -#define VC_EXTRALEAN -#define WIN32_LEAN_AND_MEAN -/* Need Windows XP for SHGetFolderPathAndSubDirW */ -#define WINVER 0x0501 -/* Needed for SHGFP_TYPE */ -#define _WIN32_IE 0x0500 - -#endif /* WIN32DEFINES_H */ +/* + * win32defines.h - this file is part of Geany, a fast and lightweight IDE + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef WIN32DEFINES_H +#define WIN32DEFINES_H 1 + +/* These defines are necessary defines *before* windows.h is included */ + +#define VC_EXTRALEAN +#define WIN32_LEAN_AND_MEAN +/* Need Windows XP for SHGetFolderPathAndSubDirW */ +#define WINVER 0x0501 +#define _WIN32_WINNT 0x0501 +/* Needed for SHGFP_TYPE */ +#define _WIN32_IE 0x0500 + +#endif /* WIN32DEFINES_H */
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).