summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/dvipdf-x/ChangeLog6
-rw-r--r--Build/source/texk/dvipdf-x/dpxcrypt.c8
-rw-r--r--Build/source/texk/dvipdf-x/dpxcrypt.h8
3 files changed, 14 insertions, 8 deletions
diff --git a/Build/source/texk/dvipdf-x/ChangeLog b/Build/source/texk/dvipdf-x/ChangeLog
index 6dfbf0c1223..a80e8c3340d 100644
--- a/Build/source/texk/dvipdf-x/ChangeLog
+++ b/Build/source/texk/dvipdf-x/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * dpxcrypt.h, dpxcrypt.c: Use uint32_t instead of unsigned long to
+ calculate MD5, because it leads to an error if compiled with clang
+ on 64bit OS X, reported by T. Yamamoto.
+
2013-09-18 Peter Breitenlohner <peb@mppmu.mpg.de>
Better handling of annotations and bookmarks.
diff --git a/Build/source/texk/dvipdf-x/dpxcrypt.c b/Build/source/texk/dvipdf-x/dpxcrypt.c
index cc61cd55dc8..e7b96af169f 100644
--- a/Build/source/texk/dvipdf-x/dpxcrypt.c
+++ b/Build/source/texk/dvipdf-x/dpxcrypt.c
@@ -28,12 +28,6 @@
# include <sys/types.h>
#endif
#include <string.h>
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
#include "dpxcrypt.h"
@@ -289,7 +283,7 @@ void MD5_final (unsigned char *outbuf, MD5_CONTEXT *hd)
#define X(a) do { *p++ = hd->a; *p++ = hd->a >> 8; \
*p++ = hd->a >> 16; *p++ = hd->a >> 24; } while (0)
#else /* little endian */
-#define X(a) do { *(unsigned long *)p = (*hd).a ; p += 4; } while (0)
+#define X(a) do { *(uint32_t *)p = (*hd).a ; p += sizeof(uint32_t); } while (0)
#endif
X(A);
X(B);
diff --git a/Build/source/texk/dvipdf-x/dpxcrypt.h b/Build/source/texk/dvipdf-x/dpxcrypt.h
index d2613043cf8..4470bfd4095 100644
--- a/Build/source/texk/dvipdf-x/dpxcrypt.h
+++ b/Build/source/texk/dvipdf-x/dpxcrypt.h
@@ -24,10 +24,16 @@
#define _DPXCRYPT_H_
#include <stdio.h>
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
/* libgcrypt md5 */
typedef struct {
- unsigned long A,B,C,D; /* chaining variables */
+ uint32_t A,B,C,D; /* chaining variables */
unsigned long nblocks;
unsigned char buf[64];
int count;