summaryrefslogtreecommitdiff
path: root/dmake
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-05 17:28:45 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-05 17:28:45 +0000
commit7e0d741a6fe72c62d9eb3efa48beb63fd7ef7389 (patch)
tree606394ad1f7e594ee61ddee24863f2caeb8ef5dc /dmake
parentacb382e25e38b41cedced953e14acd3609ffd105 (diff)
INTEGRATION: CWS dmake412_DEV300 (1.11.2); FILE MERGED
2008/02/07 19:50:01 vq 1.11.2.2: #i83940# Make the result of $(mktmp ..) aware of the .WINPATH setting. 2007/11/11 00:03:32 vq 1.11.2.1: #i83523# Rename macro PVOID to DMPVOID to avoid problems when including windows.h.
Diffstat (limited to 'dmake')
-rw-r--r--dmake/function.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/dmake/function.c b/dmake/function.c
index f764026eb595..c0942db09213 100644
--- a/dmake/function.c
+++ b/dmake/function.c
@@ -1,6 +1,6 @@
/* $RCSfile: function.c,v $
--- $Revision: 1.11 $
--- last change: $Author: ihi $ $Date: 2007-10-15 15:39:11 $
+-- $Revision: 1.12 $
+-- last change: $Author: kz $ $Date: 2008-03-05 18:28:45 $
--
-- SYNOPSIS
-- GNU style functions for dmake.
@@ -41,7 +41,7 @@ static char *_exec_assign ANSI((char *));
static char *_exec_foreach ANSI((char *, char *, char *));
static char *_exec_andor ANSI((char *, int));
static char *_exec_not ANSI((char *));
-static int _mystrcmp ANSI((const PVOID, const PVOID));
+static int _mystrcmp ANSI((const DMPVOID, const DMPVOID));
PUBLIC char *
@@ -367,18 +367,26 @@ char *data;
Link_temp( Current_target, tmpfile, tmpname );
/* Don't free tmpname if it is used. It is stored in a FILELIST
- * member in Link_temp(). */
+ * member in Link_temp() and freed by Unlink_temp_files(). */
}
else
FREE(tmpname);
}
+ /* If file expanded to a non empty value tmpfile is already opened,
+ * otherwise open it now. */
if( !tmpfile )
tmpfile = Start_temp( "", Current_target, &tmpname );
/* If the text parameter is given return its expanded value
* instead of the used filename. */
- if( !text || !*text ) text = tmpname;
+ if( !text || !*text ) {
+ /* tmpname is freed by Unlink_temp_files(). */
+ text = DmStrDup(DO_WINPATH(tmpname));
+ }
+ else {
+ text = Expand(text);
+ }
data = Expand(data);
@@ -386,7 +394,7 @@ char *data;
Close_temp( Current_target, tmpfile );
FREE(data);
- return( Expand(text) );
+ return( text );
}
@@ -500,8 +508,8 @@ char *args;
static int
_mystrcmp( p, q )
-const PVOID p;
-const PVOID q;
+const DMPVOID p;
+const DMPVOID q;
{
return(strcmp(*((const char **)p),*((const char **)q)));
}