Kaydet (Commit) e5471fb5 authored tarafından Enrico Tröger's avatar Enrico Tröger

Include win32defines.h before win32.h to fix build errors

üst f11a2eb0
......@@ -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>
......
......@@ -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 */
......
......@@ -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);
......
/*
* 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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment