Fixing changes to getbuildinfo.c that broke linux builds

parent ff871226
...@@ -20,7 +20,14 @@ ...@@ -20,7 +20,14 @@
#endif #endif
#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:$" #define SVNVERSION "$WCRANGE$$WCMODS?M:$"
#endif
const char * const char *
Py_GetBuildInfo(void) Py_GetBuildInfo(void)
{ {
...@@ -39,7 +46,7 @@ _Py_svnversion(void) ...@@ -39,7 +46,7 @@ _Py_svnversion(void)
{ {
/* the following string can be modified by subwcrev.exe */ /* the following string can be modified by subwcrev.exe */
static const char svnversion[] = SVNVERSION; static const char svnversion[] = SVNVERSION;
if (!strstr(svnversion, "$")) if (svnversion[0] != '$')
return svnversion; /* it was interpolated */ return svnversion; /* it was interpolated, or passed on command line */
return "exported"; return "exported";
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment