summaryrefslogtreecommitdiffstats
path: root/Modules/getbuildinfo.c
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2007-06-07 23:53:49 (GMT)
committerKristján Valur Jónsson <kristjan@ccpgames.com>2007-06-07 23:53:49 (GMT)
commitb53940f238c55c8b715301e6b5902ef2d15cfefa (patch)
tree4824e5478816ca9deb8648d89ea1d5268c826130 /Modules/getbuildinfo.c
parentff8712263deb720496b174ab95fbe81b162b8b0a (diff)
downloadcpython-b53940f238c55c8b715301e6b5902ef2d15cfefa.zip
cpython-b53940f238c55c8b715301e6b5902ef2d15cfefa.tar.gz
cpython-b53940f238c55c8b715301e6b5902ef2d15cfefa.tar.bz2
Fixing changes to getbuildinfo.c that broke linux builds
Diffstat (limited to 'Modules/getbuildinfo.c')
-rw-r--r--Modules/getbuildinfo.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c
index 0f71ca0..b673f3f 100644
--- a/Modules/getbuildinfo.c
+++ b/Modules/getbuildinfo.c
@@ -20,7 +20,14 @@
#endif
#endif
+/* on unix, SVNVERSION is passed on the command line.
+ * on Windows, the string is interpolated using
+ * subwcrev.exe
+ */
+#ifndef SVNVERSION
#define SVNVERSION "$WCRANGE$$WCMODS?M:$"
+#endif
+
const char *
Py_GetBuildInfo(void)
{
@@ -39,7 +46,7 @@ _Py_svnversion(void)
{
/* the following string can be modified by subwcrev.exe */
static const char svnversion[] = SVNVERSION;
- if (!strstr(svnversion, "$"))
- return svnversion; /* it was interpolated */
+ if (svnversion[0] != '$')
+ return svnversion; /* it was interpolated, or passed on command line */
return "exported";
}