source: trunk/dports/tex/texlive-bin/files/patch-svn31700-dvipdfmx.diff @ 111792

Last change on this file since 111792 was 111792, checked in by dports@…, 7 years ago

texlive-bin: backport various fixes from upstream (see #39334, and
http://www.tug.org/pipermail/tldistro/2013q3/000218.html)

File size: 2.6 KB
  • texk/dvipdfmx/src/dpxcrypt.c

     
    2828# include <sys/types.h>
    2929#endif
    3030#include <string.h>
    31 #ifdef HAVE_INTTYPES_H
    32 # include <inttypes.h>
    33 #endif
    34 #ifdef HAVE_STDINT_H
    35 # include <stdint.h>
    36 #endif
    3731
    3832#include "dpxcrypt.h"
    3933
     
    289283#define X(a) do { *p++ = hd->a; *p++ = hd->a >> 8; \
    290284                  *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while (0)
    291285#else /* little endian */
    292 #define X(a) do { *(unsigned long *)p = (*hd).a ; p += 4; } while (0)
     286#define X(a) do { *(uint32_t *)p = (*hd).a ; p += sizeof(uint32_t); } while (0)
    293287#endif
    294288  X(A);
    295289  X(B);
  • texk/dvipdfmx/src/dpxcrypt.h

     
    2424#define _DPXCRYPT_H_
    2525
    2626#include <stdio.h>
     27#ifdef HAVE_INTTYPES_H
     28# include <inttypes.h>
     29#endif
     30#ifdef HAVE_STDINT_H
     31# include <stdint.h>
     32#endif
    2733
    2834/* libgcrypt md5 */
    2935typedef struct {
    30   unsigned long A,B,C,D; /* chaining variables */
     36  uint32_t A,B,C,D; /* chaining variables */
    3137  unsigned long nblocks;
    3238  unsigned char buf[64];
    3339  int count;
  • texk/xdvipdfmx/src/dpxcrypt.c

     
    2828# include <sys/types.h>
    2929#endif
    3030#include <string.h>
    31 #ifdef HAVE_INTTYPES_H
    32 # include <inttypes.h>
    33 #endif
    34 #ifdef HAVE_STDINT_H
    35 # include <stdint.h>
    36 #endif
    3731
    3832#include "dpxcrypt.h"
    3933
     
    289283#define X(a) do { *p++ = hd->a; *p++ = hd->a >> 8; \
    290284                  *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while (0)
    291285#else /* little endian */
    292 #define X(a) do { *(unsigned long *)p = (*hd).a ; p += 4; } while (0)
     286#define X(a) do { *(uint32_t *)p = (*hd).a ; p += sizeof(uint32_t); } while (0)
    293287#endif
    294288  X(A);
    295289  X(B);
  • texk/xdvipdfmx/src/dpxcrypt.h

     
    2424#define _DPXCRYPT_H_
    2525
    2626#include <stdio.h>
     27#ifdef HAVE_INTTYPES_H
     28# include <inttypes.h>
     29#endif
     30#ifdef HAVE_STDINT_H
     31# include <stdint.h>
     32#endif
    2733
    2834/* libgcrypt md5 */
    2935typedef struct {
    30   unsigned long A,B,C,D; /* chaining variables */
     36  uint32_t A,B,C,D; /* chaining variables */
    3137  unsigned long nblocks;
    3238  unsigned char buf[64];
    3339  int count;
Note: See TracBrowser for help on using the repository browser.