texlive[42383] Build/source/texk/dvipsk: use -1 for

commits+karl at tug.org commits+karl at tug.org
Sun Oct 30 18:09:59 CET 2016


Revision: 42383
          http://tug.org/svn/texlive?view=revision&revision=42383
Author:   karl
Date:     2016-10-30 18:09:59 +0100 (Sun, 30 Oct 2016)
Log Message:
-----------
use -1 for INVALID_EPOCH_VALUE

Modified Paths:
--------------
    trunk/Build/source/texk/dvipsk/ChangeLog
    trunk/Build/source/texk/dvipsk/output.c

Modified: trunk/Build/source/texk/dvipsk/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipsk/ChangeLog	2016-10-30 17:02:56 UTC (rev 42382)
+++ trunk/Build/source/texk/dvipsk/ChangeLog	2016-10-30 17:09:59 UTC (rev 42383)
@@ -1,5 +1,9 @@
 2016-10-30  Karl Berry  <karl at tug.org>
 
+	* output.c (INVALID_EPOCH_VALUE): define as (time_t) -1,
+	to avoid warning with huge unsigned value on 32-bit systems.
+	(open_output): don't duplicate writing of %%CreationDate.
+
 	* dvips.texi (Invoking Dvips): TEXCONFIG does not include
 	. by default.
 

Modified: trunk/Build/source/texk/dvipsk/output.c
===================================================================
--- trunk/Build/source/texk/dvipsk/output.c	2016-10-30 17:02:56 UTC (rev 42382)
+++ trunk/Build/source/texk/dvipsk/output.c	2016-10-30 17:09:59 UTC (rev 42383)
@@ -90,7 +90,7 @@
 #define strtoll _strtoi64
 #endif
 
-#define INVALID_EPOCH_VALUE 0x7fffffffffffffffULL
+#define INVALID_EPOCH_VALUE ((time_t) -1)
 
 static time_t
 get_unique_time_if_given(void)
@@ -1421,12 +1421,8 @@
       jobtime = get_unique_time_if_given();
       if (jobtime == INVALID_EPOCH_VALUE) {
          jobtime = time(0);
-         fprintf(bitfile, "%%%%CreationDate: %s",
-                                    asctime(localtime(&jobtime)));
-      } else {
-         fprintf(bitfile, "%%%%CreationDate: %s",
-                                    asctime(gmtime(&jobtime)));
       }
+      fprintf(bitfile, "%%%%CreationDate: %s", asctime(gmtime(&jobtime)));
 #endif
       if (! isepsf) {
 /*



More information about the tex-live-commits mailing list