From f3b877d0a12089662b6e88feb5fe860527c48a19 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 24 Feb 2014 03:27:17 +0000 Subject: [PATCH] [SCons] Correctly identify Cygwin builds The correct preprocessor macro to use is the one provided by the compiler, '__CYGWIN__'. Cherry-pick of trunk r2736. --- SConstruct | 3 ++- include/cantera/base/config.h.in | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index 8d9c6b482..298ecf836 100644 --- a/SConstruct +++ b/SConstruct @@ -143,6 +143,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: @@ -1142,7 +1144,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') cdefine('HAS_NUMPY', 'python_array', 'numpy') diff --git a/include/cantera/base/config.h.in b/include/cantera/base/config.h.in index 219c45094..457df68f8 100644 --- a/include/cantera/base/config.h.in +++ b/include/cantera/base/config.h.in @@ -68,10 +68,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