summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfm-x')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog5
-rw-r--r--Build/source/texk/dvipdfm-x/config.h.in6
-rwxr-xr-xBuild/source/texk/dvipdfm-x/configure41
-rw-r--r--Build/source/texk/dvipdfm-x/epdf.c2
-rw-r--r--Build/source/texk/dvipdfm-x/pdfobj.c2
5 files changed, 54 insertions, 2 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index b56abb93416..994159c78e3 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * epdf.c (add_stream_flate): Use z_const.
+ * pdfobj.c (pdf_add_stream_flate): Use z_const.
+
2013-08-12 Peter Breitenlohner <peb@mppmu.mpg.de>
* dvipdfmx.c (show_usage): Adapt to modified program (stdin).
diff --git a/Build/source/texk/dvipdfm-x/config.h.in b/Build/source/texk/dvipdfm-x/config.h.in
index f5e7527b596..684bb4c43a0 100644
--- a/Build/source/texk/dvipdfm-x/config.h.in
+++ b/Build/source/texk/dvipdfm-x/config.h.in
@@ -214,6 +214,9 @@
# endif
#endif
+/* Define to 1 if <zlib.h> declares 'z_const'. */
+#undef ZLIB_CONST
+
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
@@ -261,3 +264,6 @@
/* Define to the type of an unsigned integer type of width exactly 64 bits if
such a type exists and the standard includes do not define it. */
#undef uint64_t
+
+/* Define as empty if not declared in <zlib.h>. */
+#undef z_const
diff --git a/Build/source/texk/dvipdfm-x/configure b/Build/source/texk/dvipdfm-x/configure
index 6409a164940..6e5804f4521 100755
--- a/Build/source/texk/dvipdfm-x/configure
+++ b/Build/source/texk/dvipdfm-x/configure
@@ -15483,6 +15483,47 @@ $(ZLIB_DEPEND): ${top_builddir}/../../libs/zlib/include/zconf.h
${top_builddir}/../../libs/zlib/include/zconf.h:
cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) rebuild'
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if <zlib.h> defines 'z_const'" >&5
+$as_echo_n "checking if <zlib.h> defines 'z_const'... " >&6; }
+if ${kpse_cv_have_decl_z_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval CPPFLAGS=\"$ZLIB_INCLUDES \$CPPFLAGS\"
+eval LIBS=\"$ZLIB_LIBS \$LIBS\"
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <zlib.h>
+int
+main ()
+{
+z_const char * foo();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ kpse_cv_have_decl_z_const=yes
+else
+ kpse_cv_have_decl_z_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$kpse_save_CPPFLAGS
+LIBS=$kpse_save_LIBS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_decl_z_const" >&5
+$as_echo "$kpse_cv_have_decl_z_const" >&6; }
+case $kpse_cv_have_decl_z_const in #(
+ yes) :
+
+$as_echo "#define ZLIB_CONST 1" >>confdefs.h
+ ;; #(
+ *) :
+
+$as_echo "#define z_const /**/" >>confdefs.h
+ ;;
+esac
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
diff --git a/Build/source/texk/dvipdfm-x/epdf.c b/Build/source/texk/dvipdfm-x/epdf.c
index e2c9e99878e..43d2f46cdac 100644
--- a/Build/source/texk/dvipdfm-x/epdf.c
+++ b/Build/source/texk/dvipdfm-x/epdf.c
@@ -883,7 +883,7 @@ add_stream_flate (pdf_obj *dst, const void *data, long len)
z.zalloc = Z_NULL; z.zfree = Z_NULL; z.opaque = Z_NULL;
- z.next_in = (Bytef *) data; z.avail_in = len;
+ z.next_in = (z_const Bytef *) data; z.avail_in = len;
z.next_out = (Bytef *) wbuf; z.avail_out = WBUF_SIZE;
if (inflateInit(&z) != Z_OK) {
diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c
index 711a4aca288..cbad9b8014d 100644
--- a/Build/source/texk/dvipdfm-x/pdfobj.c
+++ b/Build/source/texk/dvipdfm-x/pdfobj.c
@@ -1828,7 +1828,7 @@ pdf_add_stream_flate (pdf_obj *dst, const void *data, long len)
z.zalloc = Z_NULL; z.zfree = Z_NULL; z.opaque = Z_NULL;
- z.next_in = (Bytef *) data; z.avail_in = len;
+ z.next_in = (z_const Bytef *) data; z.avail_in = len;
z.next_out = (Bytef *) wbuf; z.avail_out = WBUF_SIZE;
if (inflateInit(&z) != Z_OK) {