diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-31 16:14:33 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-31 16:14:33 (GMT) |
commit | 5b5e81c637eb115b27b4c5c66cf1cf348c706162 (patch) | |
tree | e83d0ce68e92750e40fbb901a0659bade6f41674 /PCbuild/make_buildinfo.c | |
parent | 862543aa85249b46649b60da96743b4b14c6c83b (diff) | |
download | cpython-5b5e81c637eb115b27b4c5c66cf1cf348c706162.zip cpython-5b5e81c637eb115b27b4c5c66cf1cf348c706162.tar.gz cpython-5b5e81c637eb115b27b4c5c66cf1cf348c706162.tar.bz2 |
Merged revisions 59605-59624 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r59606 | georg.brandl | 2007-12-29 11:57:00 +0100 (Sat, 29 Dec 2007) | 2 lines
Some cleanup in the docs.
........
r59611 | martin.v.loewis | 2007-12-29 19:49:21 +0100 (Sat, 29 Dec 2007) | 2 lines
Bug #1699: Define _BSD_SOURCE only on OpenBSD.
........
r59612 | raymond.hettinger | 2007-12-29 23:09:34 +0100 (Sat, 29 Dec 2007) | 1 line
Simpler documentation for itertools.tee(). Should be backported.
........
r59613 | raymond.hettinger | 2007-12-29 23:16:24 +0100 (Sat, 29 Dec 2007) | 1 line
Improve docs for itertools.groupby(). The use of xrange(0) to create a unique object is less obvious than object().
........
r59620 | christian.heimes | 2007-12-31 15:47:07 +0100 (Mon, 31 Dec 2007) | 3 lines
Added wininst-9.0.exe executable for VS 2008
Integrated bdist_wininst into PCBuild9 directory
........
r59621 | christian.heimes | 2007-12-31 15:51:18 +0100 (Mon, 31 Dec 2007) | 1 line
Moved PCbuild directory to PC/VS7.1
........
r59622 | christian.heimes | 2007-12-31 15:59:26 +0100 (Mon, 31 Dec 2007) | 1 line
Fix paths for build bot
........
r59623 | christian.heimes | 2007-12-31 16:02:41 +0100 (Mon, 31 Dec 2007) | 1 line
Fix paths for build bot, part 2
........
r59624 | christian.heimes | 2007-12-31 16:18:55 +0100 (Mon, 31 Dec 2007) | 1 line
Renamed PCBuild9 directory to PCBuild
........
Diffstat (limited to 'PCbuild/make_buildinfo.c')
-rw-r--r-- | PCbuild/make_buildinfo.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/PCbuild/make_buildinfo.c b/PCbuild/make_buildinfo.c index 4cebf45..22b9882 100644 --- a/PCbuild/make_buildinfo.c +++ b/PCbuild/make_buildinfo.c @@ -3,6 +3,8 @@ #include <sys/stat.h> #include <stdio.h> +#define CMD_SIZE 500 + /* This file creates the getbuildinfo.o object, by first invoking subwcrev.exe (if found), and then invoking cl.exe. As a side effect, it might generate PCBuild\getbuildinfo2.c @@ -23,7 +25,7 @@ int make_buildinfo2() { struct _stat st; HKEY hTortoise; - char command[500]; + char command[CMD_SIZE+1]; DWORD type, size; if (_stat(".svn", &st) < 0) return 0; @@ -40,11 +42,11 @@ int make_buildinfo2() type != REG_SZ) /* Registry corrupted */ return 0; - strcat(command, "bin\\subwcrev.exe"); + strcat_s(command, CMD_SIZE, "bin\\subwcrev.exe"); if (_stat(command+1, &st) < 0) /* subwcrev.exe not part of the release */ return 0; - strcat(command, "\" .. ..\\Modules\\getbuildinfo.c getbuildinfo2.c"); + strcat_s(command, CMD_SIZE, "\" .. ..\\Modules\\getbuildinfo.c getbuildinfo2.c"); puts(command); fflush(stdout); if (system(command) < 0) return 0; @@ -60,17 +62,17 @@ int main(int argc, char*argv[]) return EXIT_FAILURE; } if (strcmp(argv[1], "Release") == 0) { - strcat(command, "-MD "); + strcat_s(command, CMD_SIZE, "-MD "); } else if (strcmp(argv[1], "Debug") == 0) { - strcat(command, "-D_DEBUG -MDd "); + strcat_s(command, CMD_SIZE, "-D_DEBUG -MDd "); } else if (strcmp(argv[1], "ReleaseItanium") == 0) { - strcat(command, "-MD /USECL:MS_ITANIUM "); + strcat_s(command, CMD_SIZE, "-MD /USECL:MS_ITANIUM "); } else if (strcmp(argv[1], "ReleaseAMD64") == 0) { - strcat(command, "-MD "); - strcat(command, "-MD /USECL:MS_OPTERON "); + strcat_s(command, CMD_SIZE, "-MD "); + strcat_s(command, CMD_SIZE, "-MD /USECL:MS_OPTERON "); } else { fprintf(stderr, "unsupported configuration %s\n", argv[1]); @@ -78,14 +80,14 @@ int main(int argc, char*argv[]) } if ((do_unlink = make_buildinfo2())) - strcat(command, "getbuildinfo2.c -DSUBWCREV "); + strcat_s(command, CMD_SIZE, "getbuildinfo2.c -DSUBWCREV "); else - strcat(command, "..\\Modules\\getbuildinfo.c"); - strcat(command, " -Fogetbuildinfo.o -I..\\Include -I..\\PC"); + strcat_s(command, CMD_SIZE, "..\\Modules\\getbuildinfo.c"); + strcat_s(command, CMD_SIZE, " -Fogetbuildinfo.o -I..\\Include -I..\\PC"); puts(command); fflush(stdout); result = system(command); if (do_unlink) - unlink("getbuildinfo2.c"); + _unlink("getbuildinfo2.c"); if (result < 0) return EXIT_FAILURE; return 0; |