Skip to content

Commit 4b7c371

Browse files
author
kristjan.jonsson
committed
Fixing changes to getbuildinfo.c that broke linux builds
git-svn-id: http://svn.python.org/projects/python/trunk@55821 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent b0903a0 commit 4b7c371

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Modules/getbuildinfo.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
2020
#endif
2121
#endif
2222

23+
/* on unix, SVNVERSION is passed on the command line.
24+
* on Windows, the string is interpolated using
25+
* subwcrev.exe
26+
*/
27+
#ifndef SVNVERSION
2328
#define SVNVERSION "$WCRANGE$$WCMODS?M:$"
29+
#endif
30+
2431
const char *
2532
Py_GetBuildInfo(void)
2633
{
@@ -39,7 +46,7 @@ _Py_svnversion(void)
3946
{
4047
/* the following string can be modified by subwcrev.exe */
4148
static const char svnversion[] = SVNVERSION;
42-
if (!strstr(svnversion, "$"))
43-
return svnversion; /* it was interpolated */
49+
if (svnversion[0] != '$')
50+
return svnversion; /* it was interpolated, or passed on command line */
4451
return "exported";
4552
}

0 commit comments

Comments
 (0)