[easytag/wip/mingw: 1/8] Conditionally compile win32 compatibility code
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/mingw: 1/8] Conditionally compile win32 compatibility code
- Date: Mon, 21 Jan 2013 19:43:58 +0000 (UTC)
commit 1589934ae5f3a87668e6bfc8986621ba8a2d2a3d
Author: David King <amigadave amigadave com>
Date: Tue Jan 15 21:47:35 2013 +0000
Conditionally compile win32 compatibility code
If a Windows (strictly mingw) host is detected during configure, compile
the Windows compatibility wrapper functions.
Makefile.am | 11 +++++++++--
src/win32/win32dep.h | 5 +++++
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 54e542a..bcf65a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,6 +15,11 @@ easytag_CFLAGS = \
$(WARN_CFLAGS) \
$(EASYTAG_CFLAGS)
+if WINDOWS_HOST
+win32_sources = \
+ src/win32/win32dep.c
+endif
+
easytag_SOURCES = \
src/id3lib/c_wrapper.cpp \
src/libapetag/apetaglib.c \
@@ -59,7 +64,8 @@ easytag_SOURCES = \
src/setting.c \
src/vcedit.c \
src/wavpack_header.c \
- src/wavpack_tag.c
+ src/wavpack_tag.c \
+ $(win32_sources)
easytag_headers = \
src/id3lib/id3_bugfix.h \
@@ -103,7 +109,8 @@ easytag_headers = \
src/ui_manager.h \
src/vcedit.h \
src/wavpack_header.h \
- src/wavpack_tag.h
+ src/wavpack_tag.h \
+ src/win32/win32dep.h
easytag_LDADD = \
$(EASYTAG_LIBS) \
diff --git a/src/win32/win32dep.h b/src/win32/win32dep.h
index 5a12ba3..3b47b17 100644
--- a/src/win32/win32dep.h
+++ b/src/win32/win32dep.h
@@ -23,6 +23,9 @@
#ifndef _WIN32DEP_H_
#define _WIN32DEP_H_
+#include <glib.h> /* Needed for G_OS_WIN32. */
+
+#ifdef G_OS_WIN32
#include <shlobj.h>
#include <winsock2.h>
#include <process.h>
@@ -82,5 +85,7 @@ extern int mkstemp (char *template);
#define LIBDIR weasytag_lib_dir()
#define LOCALEDIR weasytag_locale_dir()
+#endif /* G_OS_WIN32 */
+
#endif /* _WIN32DEP_H_ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]