]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/mingw-compatibility.hh
Run grand-replace (issue 3765)
[lilypond.git] / lily / include / mingw-compatibility.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 2005--2014 Jan Nieuwenhuizen <janneke@gnu.org>
5
6   LilyPond is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   LilyPond is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef MINGW_COMPATIBILITY_HH
21 #define MINGW_COMPATIBILITY_HH
22
23 #if __MINGW32__
24
25 /* Mingw uses invalid names for typedefs and defines.  Not yet
26    investigated whether this is a mingw bug or a windows bug (ie,
27    mingw compatibility feature), also not reported yet.  */
28
29 # ifdef CHAR
30 # define LILY_CHAR CHAR
31 # undef CHAR
32 # endif
33 # define CHAR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CHAR
34
35 # ifdef CONTEXT
36 # define LILY_CONTEXT CONTEXT
37 # undef CONTEXT
38 # endif
39 # define CONTEXT MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CONTEXT
40
41 # ifdef DATADIR
42 # define LILY_DATADIR DATADIR
43 # undef DATADIR
44 # endif
45 # define DATADIR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_DATADIR
46
47 # ifdef RELATIVE
48 # define LILY_RELATIVE RELATIVE
49 # undef RELATIVE
50 # endif
51 # define RELATIVE MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_RELATIVE
52
53 # ifdef THIS
54 # define LILY_THIS THIS
55 # undef THIS
56 # endif
57 # define THIS MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_THIS
58
59 //#include <winsock2.h>
60
61 #if defined (__MINGW32__) && !defined (STATIC)
62 # define SCM_IMPORT 1
63 #endif
64
65 #include <libguile.h>
66
67 # undef CHAR
68 # ifdef LILY_CHAR
69 # define CHAR LILY_CHAR
70 # endif
71
72 # undef CONTEXT
73 # ifdef LILY_CONTEXT
74 # define CONTEXT LILY_CONTEXT
75 # endif
76 # undef CONTEXT
77
78 # undef DATADIR
79 # ifdef LILY_DATADIR
80 # define DATADIR LILY_DATADIR
81 # endif
82 # undef DATADIR
83
84 # undef RELATIVE
85 # ifdef LILY_RELATIVE
86 # define RELATIVE LILY_RELATIVE
87 # endif
88
89 # undef THIS
90 # ifdef LILY_THIS
91 # define THIS LILY_THIS
92 # endif
93
94 #endif /* __MINGW__ */
95
96 #endif /* MINGW_COMPATIBILITY_HH */