Don't like ads? PRO users don't see any ads ;-)
Guest

libEMF-amd64.patch

By: a guest on Mar 25th, 2011  |  syntax: None  |  size: 3.46 KB  |  hits: 101  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -urN libEMF-1.0.3/include/libEMF/wine/winbase.h libEMF-1.0.3.new/include/libEMF/wine/winbase.h
  2. --- libEMF-1.0.3/include/libEMF/wine/winbase.h  2004-07-29 08:20:38.000000000 +0200
  3. +++ libEMF-1.0.3.new/include/libEMF/wine/winbase.h      2009-05-15 19:56:25.774725477 +0200
  4. @@ -1802,6 +1802,7 @@
  5.  VOID        WINAPI SetLastError(DWORD);
  6.  #endif  /* __i386__ && __GNUC__ */
  7.  
  8. +#if 0
  9.  /* FIXME: should handle platforms where sizeof(void*) != sizeof(long) */
  10.  static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID *dest, PVOID xchg, PVOID compare )
  11.  {
  12. @@ -1812,6 +1813,7 @@
  13.  {
  14.      return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val );
  15.  }
  16. +#endif
  17.  
  18.  #ifdef __WINE__
  19.  #define GetCurrentProcess() ((HANDLE)0xffffffff)
  20. diff -urN libEMF-1.0.3/include/libEMF/wine/winnt.h libEMF-1.0.3.new/include/libEMF/wine/winnt.h
  21. --- libEMF-1.0.3/include/libEMF/wine/winnt.h    2005-08-07 17:50:12.000000000 +0200
  22. +++ libEMF-1.0.3.new/include/libEMF/wine/winnt.h        2009-05-15 18:50:24.735710711 +0200
  23. @@ -29,10 +29,14 @@
  24.  
  25.  /* Architecture dependent settings. */
  26.  /* These are hardcoded to avoid dependencies on config.h in Winelib apps. */
  27. -#if defined(__i386__)
  28. +#if defined(__i386__) || defined(__x86_64__)
  29.  # undef  WORDS_BIGENDIAN
  30.  # undef  BITFIELDS_BIGENDIAN
  31.  # define ALLOW_UNALIGNED_ACCESS
  32. +#elif defined(__alpha__)
  33. +# undef  WORDS_BIGENDIAN
  34. +# undef  BITFIELDS_BIGENDIAN
  35. +# undef  ALLOW_UNALIGNED_ACCESS
  36.  #elif defined(__sparc__)
  37.  # define WORDS_BIGENDIAN
  38.  # define BITFIELDS_BIGENDIAN
  39. @@ -222,8 +226,13 @@
  40.  typedef unsigned short  WORD,       *PWORD,    *LPWORD;
  41.  typedef int             INT,        *PINT,     *LPINT;
  42.  typedef unsigned int    UINT,       *PUINT,    *LPUINT;
  43. +#if defined(_LP64) || defined(__alpha__)
  44. +typedef unsigned int    DWORD,      *PDWORD,   *LPDWORD;
  45. +typedef unsigned int    ULONG,      *PULONG,   *LPULONG;
  46. +#else
  47.  typedef unsigned long   DWORD,      *PDWORD,   *LPDWORD;
  48.  typedef unsigned long   ULONG,      *PULONG,   *LPULONG;
  49. +#endif
  50.  typedef float           FLOAT,      *PFLOAT,   *LPFLOAT;
  51.  typedef double          DOUBLE,     *PDOUBLE,  *LPDOUBLE;
  52.  typedef double          DATE;
  53. @@ -263,7 +272,11 @@
  54.  typedef BYTE            BOOLEAN,    *PBOOLEAN;
  55.  typedef char            CHAR,       *PCHAR;
  56.  typedef short           SHORT,      *PSHORT;
  57. +#if defined(_LP64) || defined(__alpha__)
  58. +typedef int             LONG,       *PLONG,    *LPLONG;
  59. +#else
  60.  typedef long            LONG,       *PLONG,    *LPLONG;
  61. +#endif
  62.  
  63.  /* Some systems might have wchar_t, but we really need 16 bit characters */
  64.  #ifndef WINE_WCHAR_DEFINED
  65. @@ -652,6 +665,11 @@
  66.  
  67.  #endif  /* __i386__ */
  68.  
  69. +#ifdef __x86_64__
  70. +#define CONTEXT_FULL           1
  71. +typedef struct _CONTEXT CONTEXT;
  72. +#endif
  73. +
  74.  /* Alpha context definitions */
  75.  #ifdef _ALPHA_
  76.  
  77. diff -urN libEMF-1.0.3/libemf/libemf.h libEMF-1.0.3.new/libemf/libemf.h
  78. --- libEMF-1.0.3/libemf/libemf.h        2004-11-11 23:33:43.000000000 +0100
  79. +++ libEMF-1.0.3.new/libemf/libemf.h    2009-05-15 18:50:24.735710711 +0200
  80. @@ -306,6 +306,7 @@
  81.         fread( &word, sizeof(INT16), 1, fp_ );
  82.        return *this;
  83.      }
  84. +#if !(defined(_LP64) || defined(__alpha__))
  85.      /*!
  86.       * Output a double word (long) to the stream (swabbed).
  87.       * \param word word (long) to output.
  88. @@ -374,6 +375,7 @@
  89.         fread( &long_, sizeof(LONG), 1, fp_ );
  90.        return *this;
  91.      }
  92. +#endif
  93.      /*!
  94.       * Output a (long) int to the stream (swabbed).
  95.       * \param int_ (long) int to output.