summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdffont.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdffont.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdffont.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdffont.c b/Build/source/texk/dvipdfm-x/pdffont.c
index e50503e94ec..d957977e05c 100644
--- a/Build/source/texk/dvipdfm-x/pdffont.c
+++ b/Build/source/texk/dvipdfm-x/pdffont.c
@@ -25,7 +25,6 @@
#endif
#include <string.h>
-#include <time.h>
#include "system.h"
#include "error.h"
@@ -62,41 +61,6 @@ pdf_font_set_dpi (int font_dpi)
PKFont_set_dpi(font_dpi);
}
-
-#if defined(_MSC_VER)
-#define strtoll _strtoi64
-#endif
-
-/* 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 INVALID_EPOCH_VALUE (= (time_t)-1).
- * In the case of Microsoft Visual Studio 2010, the value should be less
- * than 32535291600.
- */
-
-time_t
-get_unique_time_if_given(void)
-{
- const char *source_date_epoch;
- int64_t epoch;
- char *endptr;
- time_t ret = INVALID_EPOCH_VALUE;
-
- source_date_epoch = getenv("SOURCE_DATE_EPOCH");
- if (source_date_epoch) {
- errno = 0;
- epoch = strtoll(source_date_epoch, &endptr, 10);
- if (!(epoch < 0 || *endptr != '\0' || errno != 0)) {
- ret = (time_t) epoch;
-#if defined(_MSC_VER)
- if (ret > 32535291599ULL)
- ret = 32535291599ULL;
-#endif
- }
- }
- return ret;
-}
-
void
pdf_font_make_uniqueTag (char *tag)
{
@@ -106,7 +70,7 @@ pdf_font_make_uniqueTag (char *tag)
if (first) {
time_t current_time;
- current_time = get_unique_time_if_given();
+ current_time = dpx_util_get_unique_time_if_given();
if (current_time == INVALID_EPOCH_VALUE)
current_time = time(NULL);
srand(current_time);