summaryrefslogtreecommitdiff
path: root/dmake
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-12-17 15:01:08 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-12-17 15:01:08 +0000
commit44ede31e8103a4925ce382034f3a5bd731c3c8b3 (patch)
tree8910bb7fb6618bb6f3a75d3c2018702ddbe31377 /dmake
parent837fe73c664155aa63f9125f3872fc1d8f19f311 (diff)
INTEGRATION: CWS geordi2q11 (1.5.8); FILE MERGED
2003/12/16 11:17:16 hr 1.5.8.1: #111934#: join CWS ooo111fix1
Diffstat (limited to 'dmake')
-rw-r--r--dmake/function.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/dmake/function.c b/dmake/function.c
index 647c91110fc5..6c62ed439a35 100644
--- a/dmake/function.c
+++ b/dmake/function.c
@@ -2,9 +2,9 @@
*
* $RCSfile: function.c,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hjs $ $Date: 2003-08-18 15:04:15 $
+ * last change: $Author: vg $ $Date: 2003-12-17 16:01:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -346,8 +346,11 @@ char *data;
char *newtmp;
/* This call to Get_temp sets TMPFILE for subsequent expansion of file.
- * DO NOT DELETE IT! */
- Get_temp( &newtmp, "", FALSE ); FREE(newtmp);
+ * The contents file variable passed may include TMPFILE to be expanded. */
+ /* Using TMPFILE as an argument to mktmp is no longer supported because it is not
+ * safe to create a random filename and assume the file does not exist. Howver,
+ * we still allow Expand() to do its job for fixed filenames */
+ /* Get_temp( &newtmp, "", FALSE ); FREE(newtmp); */
tmpname = Expand(file);
if( *tmpname ) {
@@ -562,10 +565,9 @@ char *mod1;
cell.ce_attr = A_PHONY|A_SILENT;
if( nestlevel == 0 ) {
- tmpnm = tempnam(NIL(char),"mk");
org_out = dup(1);
- if( (tmp = fopen(tmpnm, "w+")) == NIL(FILE) )
+ if( (tmp = Get_temp(&tmpnm, "", "w+")) == NIL(FILE) )
Open_temp_error( tmpnm, cname.ht_name );
close(1);