summaryrefslogtreecommitdiff
path: root/tiff/port
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2021-01-15 12:26:22 +0000
committerChris Liddell <chris.liddell@artifex.com>2021-01-15 12:50:33 +0000
commit4e956a2ee5137812007a7862a6eb8fddd9b709d2 (patch)
treec44015b333d179dae1db50775db196c6f364331f /tiff/port
parent35035761ffe178284c4ef9fc2ef75a4843e64a63 (diff)
downloadghostpdl-4e956a2ee5137812007a7862a6eb8fddd9b709d2.tar.gz
Update libtiff to 4.2.0
And then re-apply: ef66198ade77d5d551b3045cd36bed81c0b04f54 Changes to libtiff for gpdl. 1) Ensure that libtiff doesn't mess with 'boolean' in GS builds on Windows. Without this, the jpeg structures used by our JPEG lib build are different in size when called from gs and libtiff, resulting in runtime errors. 2) Update libtiff so that it can correctly call into the jpeg library so that memory operations happen from our pools, not malloc/free. Slightly horrid in that this is more complex with OJPEG than JPEG files.
Diffstat (limited to 'tiff/port')
-rw-r--r--tiff/port/Makefile.in4
-rw-r--r--tiff/port/Makefile.vc44
-rw-r--r--tiff/port/libport.h12
3 files changed, 52 insertions, 8 deletions
diff --git a/tiff/port/Makefile.in b/tiff/port/Makefile.in
index 72e192b0a..ba9d98f87 100644
--- a/tiff/port/Makefile.in
+++ b/tiff/port/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/tiff/port/Makefile.vc b/tiff/port/Makefile.vc
index 992d26966..e4471af51 100644
--- a/tiff/port/Makefile.vc
+++ b/tiff/port/Makefile.vc
@@ -23,13 +23,53 @@
# Makefile for MS Visual C and Watcom C compilers.
#
# To build:
-# C:\libtiff\port> nmake /f makefile.vc
+# C:\libtiff\port> nmake /f makefile.vc
!INCLUDE ..\nmake.opt
+HAVE_STRTOL = 1
+HAVE_STRTOUL = 1
+
+# strtoul()/strtoull() are provided together
+!IF $(HAVE_STRTOLL)
+HAVE_STRTOULL = 1
+!ELSE
+HAVE_STRTOULL = 0
+!endif
+
+!IF $(HAVE_STRTOL)
+STRTOL_OBJ =
+!ELSE
+STRTOL_OBJ = strtol.obj
+!ENDIF
+
+!IF $(HAVE_STRTOUL)
+STRTOUL_OBJ =
+!ELSE
+STRTOUL_OBJ = strtoul.obj
+!ENDIF
+
+!IF $(HAVE_STRTOLL)
+STRTOLL_OBJ =
+!ELSE
+STRTOLL_OBJ = strtoll.obj
+!ENDIF
+
+!IF $(HAVE_STRTOULL)
+STRTOULL_OBJ =
+!ELSE
+STRTOULL_OBJ = strtoull.obj
+!ENDIF
+
+INCL = -I..\libtiff
+
OBJ = \
- snprintf.obj \
+ snprintf.obj \
strcasecmp.obj \
+ $(STRTOL_OBJ) \
+ $(STRTOUL_OBJ) \
+ $(STRTOLL_OBJ) \
+ $(STRTOULL_OBJ) \
getopt.obj
all: libport.lib
diff --git a/tiff/port/libport.h b/tiff/port/libport.h
index ff2626382..9f2dace14 100644
--- a/tiff/port/libport.h
+++ b/tiff/port/libport.h
@@ -24,6 +24,10 @@
#ifndef _LIBPORT_
#define _LIBPORT_
+#if defined(HAVE_CONFIG_H)
+# include <tif_config.h>
+#endif
+
int getopt(int argc, char * const argv[], const char *optstring);
extern char *optarg;
extern int opterr;
@@ -36,16 +40,16 @@ int strcasecmp(const char *s1, const char *s2);
# define HAVE_GETOPT 1
#endif
-#if HAVE_STRTOL
+#if !defined(HAVE_STRTOL)
long strtol(const char *nptr, char **endptr, int base);
#endif
-#if HAVE_STRTOLL
+#if !defined(HAVE_STRTOLL)
long long strtoll(const char *nptr, char **endptr, int base);
#endif
-#if HAVE_STRTOUL
+#if !defined(HAVE_STRTOUL)
unsigned long strtoul(const char *nptr, char **endptr, int base);
#endif
-#if HAVE_STRTOULL
+#if !defined(HAVE_STRTOULL)
unsigned long long strtoull(const char *nptr, char **endptr, int base);
#endif