Author: spouliot
Date: 2007-03-29 12:48:07 -0500 (Thu, 29 Mar 2007)
New Revision: 75161
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/metafile.h
Log:
2007-03-29 Sebastien Pouliot <[EMAIL PROTECTED]>
* metafile.h: Use __attribute__ ((packed)) instead of #pragma pack(2)
in the hope this construct works on the ARM architecture.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2007-03-29 17:23:14 UTC (rev 75160)
+++ trunk/libgdiplus/src/ChangeLog 2007-03-29 17:48:07 UTC (rev 75161)
@@ -1,3 +1,8 @@
+2007-03-29 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * metafile.h: Use __attribute__ ((packed)) instead of #pragma pack(2)
+ in the hope this construct works on the ARM architecture.
+
2007-03-23 Sebastien Pouliot <[EMAIL PROTECTED]>
* jpegcodec.c: Re-enable sigsetjmp to handle malformed JPEG files.
Modified: trunk/libgdiplus/src/metafile.h
===================================================================
--- trunk/libgdiplus/src/metafile.h 2007-03-29 17:23:14 UTC (rev 75160)
+++ trunk/libgdiplus/src/metafile.h 2007-03-29 17:48:07 UTC (rev 75161)
@@ -132,8 +132,6 @@
LONG lbHatch;
} LOGBRUSH;
-#pragma pack(2)
-
typedef struct {
int left;
int top;
@@ -147,6 +145,21 @@
} SIZE, SIZEL;
typedef struct {
+ SHORT Left;
+ SHORT Top;
+ SHORT Right;
+ SHORT Bottom;
+} PWMFRect16;
+
+#ifndef __GNUC__
+ #pragma pack(2)
+#endif
+
+typedef struct
+#ifdef __GNUC__
+ __attribute__ ((packed))
+#endif
+{
WORD mtType; /* 1 for disk, 0 for memory */
WORD mtHeaderSize;
WORD mtVersion;
@@ -156,6 +169,23 @@
WORD mtNoParameters;
} METAHEADER;
+typedef struct
+#ifdef __GNUC__
+ __attribute__ ((packed))
+#endif
+{
+ DWORD Key;
+ SHORT Hmf;
+ PWMFRect16 BoundingBox;
+ SHORT Inch;
+ DWORD Reserved;
+ SHORT Checksum;
+} WmfPlaceableFileHeader;
+
+#ifndef __GNUC__
+ #pragma pack()
+#endif
+
typedef struct {
DWORD iType;
DWORD nSize;
@@ -175,22 +205,6 @@
} ENHMETAHEADER3;
typedef struct {
- SHORT Left;
- SHORT Top;
- SHORT Right;
- SHORT Bottom;
-} PWMFRect16;
-
-typedef struct {
- DWORD Key;
- SHORT Hmf;
- PWMFRect16 BoundingBox;
- SHORT Inch;
- DWORD Reserved;
- SHORT Checksum;
-} WmfPlaceableFileHeader;
-
-typedef struct {
int Type;
int Size;
int Version;
@@ -280,8 +294,6 @@
typedef BOOL (*EnumerateMetafileProc) (EmfPlusRecordType, UINT, UINT, const
BYTE*, void*);
-#pragma pack()
-
/* function prototypes */
GpStatus GdipCreateMetafileFromWmf (HMETAFILE hWmf, BOOL deleteWmf, GDIPCONST
WmfPlaceableFileHeader *wmfPlaceableFileHeader, GpMetafile **metafile);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches