bin2res - Make adding resources work on Windows.

Steven Edwards steven_ed4153 at yahoo.com
Sat Jan 17 22:54:02 CST 2004


I dont know if anyone else has tried this but when I try to add
resources to a *.rc I get a error. This patch fixes it.

cvs diff -u bin2res.c 
Index: bin2res.c
===================================================================
RCS file: /home/wine/wine/tools/bin2res.c,v
retrieving revision 1.20
diff -u -r1.20 bin2res.c
--- bin2res.c	14 Jan 2004 05:12:33 -0000	1.20
+++ bin2res.c	18 Jan 2004 04:52:20 -0000
@@ -183,6 +183,13 @@
     if (inserting)
     {
 	fclose(ftmp);
+	if (unlink(input_file_name) == -1) 
+	   { 
+	       perror("unlink"); 
+	       unlink(tmp_file_name); 
+	       return 0; 
+	   } 
+
 	if (c == EOF && rename(tmp_file_name, input_file_name) < 0)
 	    c = '.'; /* force an error */
 	else unlink(tmp_file_name);



__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus



More information about the wine-patches mailing list