diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2018-09-30 21:47:39 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2018-10-01 22:50:12 +0000 |
| commit | 172dbd2b94199731c1bbd2f789e55535188ade5c (patch) | |
| tree | 907ca31a726661673f72eb35c2a8431e0dc57873 /src/extension | |
| parent | config.h - remove all defines we never use (diff) | |
| download | inkscape-172dbd2b94199731c1bbd2f789e55535188ade5c.tar.gz inkscape-172dbd2b94199731c1bbd2f789e55535188ade5c.zip | |
Use _WIN32 instead of WIN32
The former is guaranteed to be set for any compiler targeting win32,
the latter is implementation dependent (but works for gcc)
See also
http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/extension.cpp | 2 | ||||
| -rw-r--r-- | src/extension/implementation/script.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/cairo-render-context.cpp | 10 | ||||
| -rw-r--r-- | src/extension/internal/cdr-input.cpp | 2 | ||||
| -rw-r--r-- | src/extension/internal/pdfinput/pdf-input.cpp | 2 | ||||
| -rw-r--r-- | src/extension/internal/vsd-input.cpp | 2 | ||||
| -rw-r--r-- | src/extension/internal/wpg-input.cpp | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index 3c9861aee..c6fcd0e7a 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -261,7 +261,7 @@ Extension::check () // No need to include Windows only extensions // See LP bug #1307554 for details - https://bugs.launchpad.net/inkscape/+bug/1307554 -#ifndef WIN32 +#ifndef _WIN32 const char* win_ext[] = {"com.vaxxine.print.win32"}; std::vector<std::string> v (win_ext, win_ext + sizeof(win_ext)/sizeof(win_ext[0])); std::string ext_id(id); diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 11961458a..9e0dd31c8 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -51,7 +51,7 @@ #include "path-prefix.h" -#ifdef WIN32 +#ifdef _WIN32 #include <windows.h> #include <sys/stat.h> #include "registrytool.h" @@ -86,7 +86,7 @@ void Script::pump_events () { */ Script::interpreter_t const Script::interpreterTab[] = { {"perl", "perl-interpreter", "perl" }, -#ifdef WIN32 +#ifdef _WIN32 {"python", "python-interpreter", "pythonw" }, #else {"python", "python-interpreter", "python" }, diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 679db9f6a..f7de8d85f 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -50,7 +50,7 @@ #include "object/sp-clippath.h" #include "util/units.h" -#ifdef WIN32 +#ifdef _WIN32 #include "libnrtype/FontFactory.h" // USE_PANGO_WIN32 #endif @@ -270,7 +270,7 @@ bool CairoRenderContext::setPdfTarget(gchar const *utf8_fn) if (*fn == '|') { fn += 1; while (isspace(*fn)) fn += 1; -#ifndef WIN32 +#ifndef _WIN32 osp = popen(fn, "w"); #else osp = _popen(fn, "w"); @@ -297,7 +297,7 @@ bool CairoRenderContext::setPdfTarget(gchar const *utf8_fn) gchar *qn = ( *fn ? g_strdup_printf("lpr -P %s", fn) /* FIXME: quote fn */ : g_strdup("lpr") ); -#ifndef WIN32 +#ifndef _WIN32 osp = popen(qn, "w"); #else osp = _popen(qn, "w"); @@ -352,7 +352,7 @@ bool CairoRenderContext::setPsTarget(gchar const *utf8_fn) if (*fn == '|') { fn += 1; while (isspace(*fn)) fn += 1; -#ifndef WIN32 +#ifndef _WIN32 osp = popen(fn, "w"); #else osp = _popen(fn, "w"); @@ -379,7 +379,7 @@ bool CairoRenderContext::setPsTarget(gchar const *utf8_fn) gchar *qn = ( *fn ? g_strdup_printf("lpr -P %s", fn) /* FIXME: quote fn */ : g_strdup("lpr") ); -#ifndef WIN32 +#ifndef _WIN32 osp = popen(qn, "w"); #else osp = _popen(qn, "w"); diff --git a/src/extension/internal/cdr-input.cpp b/src/extension/internal/cdr-input.cpp index 7848927ca..b86fb5049 100644 --- a/src/extension/internal/cdr-input.cpp +++ b/src/extension/internal/cdr-input.cpp @@ -233,7 +233,7 @@ void CdrImportDialog::_setPreviewPage() SPDocument *CdrInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) { - #ifdef WIN32 + #ifdef _WIN32 // RVNGFileStream uses fopen() internally which unfortunately only uses ANSI encoding on Windows // therefore attempt to convert uri to the system codepage // even if this is not possible the alternate short (8.3) file name will be used if available diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 21a91fa34..df04b2322 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -710,7 +710,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { // PDFDoc is from poppler. PDFDoc is used for preview and for native import. -#ifndef WIN32 +#ifndef _WIN32 // poppler does not use glib g_open. So on win32 we must use unicode call. code was copied from // glib gstdio.c GooString *filename_goo = new GooString(uri); diff --git a/src/extension/internal/vsd-input.cpp b/src/extension/internal/vsd-input.cpp index a0b41a990..783fcfc8b 100644 --- a/src/extension/internal/vsd-input.cpp +++ b/src/extension/internal/vsd-input.cpp @@ -233,7 +233,7 @@ void VsdImportDialog::_setPreviewPage() SPDocument *VsdInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) { - #ifdef WIN32 + #ifdef _WIN32 // RVNGFileStream uses fopen() internally which unfortunately only uses ANSI encoding on Windows // therefore attempt to convert uri to the system codepage // even if this is not possible the alternate short (8.3) file name will be used if available diff --git a/src/extension/internal/wpg-input.cpp b/src/extension/internal/wpg-input.cpp index a1c27e3e3..32e3a91f2 100644 --- a/src/extension/internal/wpg-input.cpp +++ b/src/extension/internal/wpg-input.cpp @@ -81,7 +81,7 @@ namespace Internal { SPDocument *WpgInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) { - #ifdef WIN32 + #ifdef _WIN32 // RVNGFileStream uses fopen() internally which unfortunately only uses ANSI encoding on Windows // therefore attempt to convert uri to the system codepage // even if this is not possible the alternate short (8.3) file name will be used if available |
