summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2005-05-02 13:10:33 +0000
committerJan Nieuwenhuizen <janneke@gnu.org>2005-05-02 13:10:33 +0000
commit37bd53c916fb015e22c83c200db0d850232af0f4 (patch)
tree3b2156ed60d2139c6b69887945ecbc9863baf578
parent6c0a242bac0f7b3538adce970b5543cc415b46c4 (diff)
New file.
-rw-r--r--lily/include/mingw-compatibility.hh86
1 files changed, 86 insertions, 0 deletions
diff --git a/lily/include/mingw-compatibility.hh b/lily/include/mingw-compatibility.hh
new file mode 100644
index 0000000000..407d0b4e25
--- /dev/null
+++ b/lily/include/mingw-compatibility.hh
@@ -0,0 +1,86 @@
+/*
+ mingw-compatibility.hh -- MINGW workarounds
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2005 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#ifndef MINGW_COMPATIBILITY_HH
+#define MINGW_COMPATIBILITY_HH
+
+#if __MINGW32__
+
+/* Mingw uses invalid names for typedefs and defines. Not yet
+ investigated whether this is a mingw bug or a windows bug (ie,
+ mingw compatibility feature), also not reported yet. */
+
+# ifdef CHAR
+# define LILY_CHAR CHAR
+# undef CHAR
+# endif
+# define CHAR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CHAR
+
+# ifdef CONTEXT
+# define LILY_CONTEXT CONTEXT
+# undef CONTEXT
+# endif
+# define CONTEXT MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CONTEXT
+
+# ifdef DATADIR
+# define LILY_DATADIR DATADIR
+# undef DATADIR
+# endif
+# define DATADIR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_DATADIR
+
+# ifdef RELATIVE
+# define LILY_RELATIVE RELATIVE
+# undef RELATIVE
+# endif
+# define RELATIVE MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_RELATIVE
+
+# ifdef THIS
+# define LILY_THIS THIS
+# undef THIS
+# endif
+# define THIS MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_THIS
+
+//# include <winsock2.h>
+
+#if defined (__MINGW32__) && !defined (STATIC)
+# define SCM_IMPORT 1
+#endif
+
+# include <libguile.h>
+
+# undef CHAR
+# ifdef LILY_CHAR
+# define CHAR LILY_CHAR
+# endif
+
+# undef CONTEXT
+# ifdef LILY_CONTEXT
+# define CONTEXT LILY_CONTEXT
+# endif
+# undef CONTEXT
+
+# undef DATADIR
+# ifdef LILY_DATADIR
+# define DATADIR LILY_DATADIR
+# endif
+# undef DATADIR
+
+# undef RELATIVE
+# ifdef LILY_RELATIVE
+# define RELATIVE LILY_RELATIVE
+# endif
+
+# undef THIS
+# ifdef LILY_THIS
+# define THIS LILY_THIS
+# endif
+
+
+#endif /* __MINGW__ */
+
+#endif /* MINGW_COMPATIBILITY_HH */