fix wrc and mabey other on windows platforms - 2 options

Steven Edwards steven_ed4153 at yahoo.com
Wed Aug 21 03:17:35 CDT 2002


There may be some way to get the preprocer to use the system enviormental define for %temp% or
some other nicer way to do this but I dont know how. I figured you unix guys like to always try to
keep temp stuff in /tmp so I made two patches. Note bin2res doesnt use /tmp when making its temp
files.

Changlog1: use local directory for temp space when invoking wrc on windows platforms.

cvs diff -u wpp.c 
Index: wpp.c
===================================================================
RCS file: /home/wine/wine/tools/wpp/wpp.c,v
retrieving revision 1.4
diff -u -r1.4 wpp.c
--- wpp.c	29 Jul 2002 23:55:40 -0000	1.4
+++ wpp.c	21 Aug 2002 08:11:07 -0000
@@ -116,7 +116,11 @@
     int ret, fd;
     char tmpfn[20], *temp_name;
 
+#ifdef _WINDOWS
+    strcpy(tmpfn,"wpp.XXXXXX");
+#else
     strcpy(tmpfn,"/tmp/wpp.XXXXXX");
+#endif
 
     if((fd = mkstemp(tmpfn)) == -1)
     {

Changlog2: porting fix

cvs diff -u wpp.c 
Index: wpp.c
===================================================================
RCS file: /home/wine/wine/tools/wpp/wpp.c,v
retrieving revision 1.4
diff -u -r1.4 wpp.c
--- wpp.c	29 Jul 2002 23:55:40 -0000	1.4
+++ wpp.c	21 Aug 2002 08:15:16 -0000
@@ -116,7 +116,7 @@
     int ret, fd;
     char tmpfn[20], *temp_name;
 
-    strcpy(tmpfn,"/tmp/wpp.XXXXXX");
+    strcpy(tmpfn,"wpp.XXXXXX");
 
     if((fd = mkstemp(tmpfn)) == -1)
     {


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com



More information about the wine-patches mailing list