PATCH: tools/wmc/write.c and dlls/ntdll/time.c -- time_t fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In line with the previous two patches; this should cover all of Wine now.

Gerald

ChangeLog:
Properly cast parameters to fprintf(...,"%l",...) to long.

Index: tools/wmc/write.c
===================================================================
RCS file: /home/wine/wine/tools/wmc/write.c,v
retrieving revision 1.7
diff -u -3 -p -r1.7 write.c
--- tools/wmc/write.c	21 Mar 2003 21:30:51 -0000	1.7
+++ tools/wmc/write.c	1 Oct 2003 16:54:38 -0000
@@ -170,8 +170,8 @@ void write_h_file(const char *fname)
 	cptr = ctime(&now);
 	killnl(cptr, 0);
 	fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline, cptr);
-	fprintf(fp, "#ifndef __WMCGENERATED_%08lx_H\n", now);
-	fprintf(fp, "#define __WMCGENERATED_%08lx_H\n", now);
+	fprintf(fp, "#ifndef __WMCGENERATED_%08lx_H\n", (long)now);
+	fprintf(fp, "#define __WMCGENERATED_%08lx_H\n", (long)now);
 	fprintf(fp, "\n");

 	/* Write severity and facility aliases */
Index: dlls/ntdll/time.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/time.c,v
retrieving revision 1.34
diff -u -3 -p -r1.34 time.c
--- dlls/ntdll/time.c	5 Sep 2003 23:08:34 -0000	1.34
+++ dlls/ntdll/time.c	1 Oct 2003 16:54:36 -0000
@@ -831,8 +831,9 @@ NTSTATUS WINAPI NtSetSystemTime(const LA

     ERR("Cannot set time to %d/%d/%d %d:%d:%d Time adjustment %ld %s\n",
             tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second,
-            sec-oldsec, err == -1 ? "No Permission" :
-                sec == (time_t)-1 ? "" : "is too large." );
+            (long)(sec-oldsec),
+            err == -1 ? "No Permission"
+                      : sec == (time_t)-1 ? "" : "is too large." );

     if(err == 2)
         return STATUS_INVALID_PARAMETER;


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux