diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-05-11 21:59:26 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-05-11 21:59:26 +0000 |
| commit | 8e46606ce757e07874cde51fe0ad21ec0078094f (patch) | |
| tree | 2e5608d665cab7ff4f8ab26007ec2b3d3a014599 /src/prefix.cpp | |
| parent | fix build for some (windows 64 bit devlibs attempt) (diff) | |
| download | inkscape-8e46606ce757e07874cde51fe0ad21ec0078094f.tar.gz inkscape-8e46606ce757e07874cde51fe0ad21ec0078094f.zip | |
fix build on Windows with newer gcc / other Windows headers. redefining NULL is terrible, perhaps we can remove these lines for all build platforms?
(bzr r13358)
Diffstat (limited to 'src/prefix.cpp')
| -rw-r--r-- | src/prefix.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/prefix.cpp b/src/prefix.cpp index 99e20171f..126d16a72 100644 --- a/src/prefix.cpp +++ b/src/prefix.cpp @@ -44,8 +44,11 @@ extern "C" { #endif /* __cplusplus */ -#undef NULL -#define NULL ((void *) 0) + // Why is NULL being redefined?! This breaks compilation on Windows, as it disables the safe assignment of NULL to other pointer types. +#ifndef __WIN32__ +# undef NULL +# define NULL ((void *) 0) +#endif #ifdef __GNUC__ #define br_return_val_if_fail(expr,val) if (!(expr)) {fprintf (stderr, "** BinReloc (%s): assertion %s failed\n", __PRETTY_FUNCTION__, #expr); return val;} |
