summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdffont.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-05-04 04:24:00 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-05-04 04:24:00 +0000
commit9b84c0a0b4043d78a3a39d604673f6f33ae815da (patch)
tree618d8b3a13fc5064fceb23cf1421dc624dc4404f /Build/source/texk/dvipdfm-x/pdffont.c
parent2167e5f4a53a054f135fe585c804e19c8f062abf (diff)
dvipdfm-x: improve SOURCE_DATE_EPOCH support
git-svn-id: svn://tug.org/texlive/trunk@40881 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdffont.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdffont.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdffont.c b/Build/source/texk/dvipdfm-x/pdffont.c
index 66578da8915..7c8a94ea435 100644
--- a/Build/source/texk/dvipdfm-x/pdffont.c
+++ b/Build/source/texk/dvipdfm-x/pdffont.c
@@ -90,7 +90,8 @@ pdf_font_set_dpi (int font_dpi)
/* If an environment variable SOURCE_DATE_EPOCH is correctly defined like
* SOURCE_DATE_EPOCH=1456304492, then returns this value, to be used as the
- * 'current time', otherwise returns 0.
+ * 'current time', otherwise returns INVALID_EPOCH_VALUE (= 0xfffffffffULL).
+ * The value should be less than about (3000 - 1970) years in seconds.
*/
time_t
@@ -99,7 +100,7 @@ get_unique_time_if_given(void)
const char *source_date_epoch;
int64_t epoch;
char *endptr;
- time_t ret = 0;
+ time_t ret = INVALID_EPOCH_VALUE;
source_date_epoch = getenv("SOURCE_DATE_EPOCH");
if (source_date_epoch) {
@@ -121,7 +122,7 @@ pdf_font_make_uniqueTag (char *tag)
if (first) {
time_t current_time;
current_time = get_unique_time_if_given();
- if (current_time == 0)
+ if (current_time == INVALID_EPOCH_VALUE)
current_time = time(NULL);
srand(current_time);
first = 0;