From: stevenknight Date: Thu, 2 Dec 2004 03:05:24 +0000 (+0000) Subject: Fix the internal Conftest._Have() function to not translate non-alphanumeric characte... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7a7d9dfdcdbb8d7e6ed58c28b6b90227a01b383;p=scons.git Fix the internal Conftest._Have() function to not translate non-alphanumeric characters to underscores in string values. (Gary Oberbrunner) git-svn-id: http://scons.tigris.org/svn/scons/trunk@1177 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/CHANGES.txt b/src/CHANGES.txt index b163ec66..7776757b 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -206,6 +206,9 @@ RELEASE 0.97 - XXX and Linux, where it's named icc. (Niall Douglas contributed an early prototype of parts of this module.) + - Fix the private Conftest._Have() function so it doesn't change + non-alphanumeric characters to underscores. + From Chris Pawling: - Have the linkloc tool use $MSVS_VERSION to select the Microsoft diff --git a/src/engine/SCons/Conftest.py b/src/engine/SCons/Conftest.py index f8912437..4d178bd8 100644 --- a/src/engine/SCons/Conftest.py +++ b/src/engine/SCons/Conftest.py @@ -456,8 +456,7 @@ def _Have(context, key, have): elif type(have) == IntType: line = "#define %s %d\n" % (key_up, have) else: - line = "#define %s %s\n" % (key_up, - re.sub('[^A-Za-z0-9_]', '_', str(have))) + line = "#define %s %s\n" % (key_up, str(have)) if context.headerfilename: f = open(context.headerfilename, "a")