[vlc-devel] [PATCH] Setup XP_WIN, XP_UNIX, XP_MACOSX macros.

David Menestrina dmenest-vlc at ofb.net
Mon Apr 19 20:33:36 CEST 2010


From: David Menestrina <dmenest-vlc at ofb dot net>

These macros were previously defined in mozilla-config.h, but we're
not supposed to include those files according to the mozilla devs.
However, the macros must be defined for npapi.h to define the
necessary platform-specific structures.  This patch sets up the
macros before including npapi.h.
---
 projects/mozilla/vlcplugin.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/projects/mozilla/vlcplugin.h b/projects/mozilla/vlcplugin.h
index c13b5e7..4ec3814 100644
--- a/projects/mozilla/vlcplugin.h
+++ b/projects/mozilla/vlcplugin.h
@@ -30,6 +30,17 @@
 #define __VLCPLUGIN_H__
 
 #include <vlc/vlc.h>
+
+// Setup XP_MACOSX, XP_UNIX, XP_WIN
+#if defined(_WIN32)
+#define XP_WIN 1
+#elif defined(__APPLE__)
+#define XP_MACOSX 1
+#else
+#define XP_UNIX 1
+#define MOZ_X11 1
+#endif
+
 #include <npapi.h>
 #include <vector>
 
-- 
1.7.0.3




More information about the vlc-devel mailing list