From 13259299ba75e5bd46e3d721118c69b3cad1d27b Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 20 Feb 2014 03:00:52 +0000 Subject: [PATCH] [SCons] Correctly identify Cygwin builds The correct preprocessor macro to use is the one provided by the compiler, '__CYGWIN__'. --- SConstruct | 3 ++- include/cantera/base/config.h.in | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index 060b7f923..d44cd773f 100644 --- a/SConstruct +++ b/SConstruct @@ -138,6 +138,8 @@ env = Environment(tools=toolchain+['textfile', 'subst', 'recursiveInstall', 'wix env['OS'] = platform.system() env['OS_BITS'] = int(platform.architecture()[0][:2]) +if 'cygwin' in env['OS'].lower(): + env['OS'] = 'Cygwin' # remove Windows version suffix # Fixes a linker error in Windows if os.name == 'nt' and 'TMP' in os.environ: @@ -1118,7 +1120,6 @@ cdefine('DEBUG_MODE', 'debug_verbose') # Need to test all of these to see what platform.system() returns configh['SOLARIS'] = 1 if env['OS'] == 'Solaris' else None configh['DARWIN'] = 1 if env['OS'] == 'Darwin' else None -configh['CYGWIN'] = 1 if env['OS'] == 'Cygwin' else None cdefine('NEEDS_GENERIC_TEMPL_STATIC_DECL', 'OS', 'Solaris') if env['python_package'] == 'none' and env['python3_package'] == 'n': diff --git a/include/cantera/base/config.h.in b/include/cantera/base/config.h.in index db800e60a..2926ea885 100644 --- a/include/cantera/base/config.h.in +++ b/include/cantera/base/config.h.in @@ -65,10 +65,6 @@ typedef int ftnlen; // Fortran hidden string length type // data file search path. %(DARWIN)s -// Identify whether the operating system is cygwin's overlay of -// windows, with gcc being used as the compiler. -%(CYGWIN)s - // Identify whether the operating system is Solaris // with a native compiler %(SOLARIS)s