summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib/openclose.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-09-18 17:35:30 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-09-18 17:35:30 +0000
commit0a79e02c16542d31043943dec87016f5b0da7cc5 (patch)
tree65ab6c25d57b965850968474eb9d1e01164caafb /Build/source/texk/web2c/lib/openclose.c
parent90c0c71a735e84ed8a19b201cc6811e35e1b86fe (diff)
web2c/lib: Reduce TL/W32TeX diffs
git-svn-id: svn://tug.org/texlive/trunk@27703 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/lib/openclose.c')
-rw-r--r--Build/source/texk/web2c/lib/openclose.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c
index b71df46e235..2620b8894bd 100644
--- a/Build/source/texk/web2c/lib/openclose.c
+++ b/Build/source/texk/web2c/lib/openclose.c
@@ -43,15 +43,12 @@ recorder_start(void)
default name. Throw in the pid so at least parallel builds might
work (Debian bug 575731). */
string cwd;
- pid_t pid = getpid();
char pid_str[MAX_INT_LENGTH];
- sprintf (pid_str, "%ld", (long) pid);
-
- recorder_name = xmalloc(strlen(kpse_program_name)
- + strlen (pid_str) + 5);
- strcpy(recorder_name, kpse_program_name);
- strcat(recorder_name, pid_str);
- strcat(recorder_name, ".fls");
+
+ /* Windows (MSVC) seems to have no pid_t, so instead of storing the
+ value returned by getpid() we immediately consume it. */
+ sprintf (pid_str, "%ld", (long) getpid());
+ recorder_name = concat3(kpse_program_name, pid_str, ".fls");
/* If an output directory was specified, use it instead of cwd. */
if (output_directory) {