Line 0
Link Here
|
|
|
1 |
/* |
2 |
* Restore previously saved *WIN* defines |
3 |
* |
4 |
* Copyright 2011 Alexandre Rostovtsev |
5 |
* |
6 |
* This library is free software; you can redistribute it and/or |
7 |
* modify it under the terms of the GNU Lesser General Public |
8 |
* License as published by the Free Software Foundation; either |
9 |
* version 2.1 of the License, or (at your option) any later version. |
10 |
* |
11 |
* This library 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 GNU |
14 |
* Lesser General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU Lesser General Public |
17 |
* License along with this library; if not, write to the Free Software |
18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
19 |
*/ |
20 |
|
21 |
/* libxml2 can be built with icu support, in which case libxml2 and libxslt |
22 |
* headers will pull in icu headers. |
23 |
* icu-4.6 (and perhaps other versions too) assumes that if WIN32, _WIN32, |
24 |
* WIN64, or _WIN64 are defined, then the platform lacks inttypes.h; it then |
25 |
* tries to define some standard integer types, which conflict with existing |
26 |
* definitions, and as a result, msxml3 will fail to build. |
27 |
* See http://bugs.gentoo.org/show_bug.cgi?id=354745 |
28 |
* |
29 |
* We therefore need to wrap all libxml2 and libxslt include statements with |
30 |
* #include "win_defines_save.h" / #include "win_defines_restore.h" |
31 |
* which will save and then restore the *WIN* defines. */ |
32 |
|
33 |
#ifndef __WINE_CONFIG_H |
34 |
# error You must include config.h to use this header |
35 |
#endif |
36 |
|
37 |
#ifdef HAVE_INTTYPES_H |
38 |
|
39 |
#ifdef WIN32_DEFINE_SAVED |
40 |
# define WIN32 WIN32_DEFINE_SAVED |
41 |
# undef WIN32_DEFINE_SAVED |
42 |
#endif |
43 |
#ifdef _WIN32_DEFINE_SAVED |
44 |
# define _WIN32 _WIN32_DEFINE_SAVED |
45 |
# undef _WIN32_DEFINE_SAVED |
46 |
#endif |
47 |
#ifdef WIN64_DEFINE_SAVED |
48 |
# define WIN64 WIN64_DEFINE_SAVED |
49 |
# undef WIN64_DEFINE_SAVED |
50 |
#endif |
51 |
#ifdef _WIN64_DEFINE_SAVED |
52 |
# define _WIN64 _WIN64_DEFINE_SAVED |
53 |
# undef _WIN64_DEFINE_SAVED |
54 |
#endif |
55 |
|
56 |
#endif /* HAVE_INTTYPES_H */ |