From 04f1a4d2dd431f169a7aed2ae740c8cbd09e8d50 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Thu, 2 Dec 2004 03:05:24 +0000 Subject: Fix the internal Conftest._Have() function to not translate non-alphanumeric characters to underscores in string values. (Gary Oberbrunner) --- src/CHANGES.txt | 3 +++ src/engine/SCons/Conftest.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index b163ec6..7776757 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 f891243..4d178bd 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") -- cgit v0.12