[vlc-commits] commit: Use pragma packing for suncc (Francois Cartegnie )

git at videolan.org git at videolan.org
Wed Apr 14 18:33:37 CEST 2010


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Apr 14 16:53:20 2010 +0200| [1de44b7c8ade27148d90aec2b095424a66b3e64d] | committer: Rémi Denis-Courmont 

Use pragma packing for suncc

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1de44b7c8ade27148d90aec2b095424a66b3e64d
---

 include/vlc_codecs.h |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/include/vlc_codecs.h b/include/vlc_codecs.h
index 14d7af4..d3a5a55 100644
--- a/include/vlc_codecs.h
+++ b/include/vlc_codecs.h
@@ -30,12 +30,6 @@
  * This file defines codec related structures needed by the demuxers and decoders
  */
 
-#ifdef HAVE_ATTRIBUTE_PACKED
-#   define ATTR_PACKED __attribute__((__packed__))
-#else
-#   error FIXME
-#endif
-
 /* Structures exported to the demuxers and decoders */
 
 #if !(defined _GUID_DEFINED || defined GUID_DEFINED)
@@ -49,6 +43,15 @@ typedef struct _GUID
 } GUID, *REFGUID, *LPGUID;
 #endif /* GUID_DEFINED */
 
+#ifdef HAVE_ATTRIBUTE_PACKED
+#   define ATTR_PACKED __attribute__((__packed__))
+#elif defined(__SUNPRO_C)
+#   pragma pack(1)
+#   define ATTR_PACKED
+#else
+#   error FIXME
+#endif
+
 #ifndef _WAVEFORMATEX_
 #define _WAVEFORMATEX_
 typedef struct
@@ -199,6 +202,10 @@ ATTR_PACKED
 } VIDEOINFO;
 #endif
 
+#if defined(__SUNPRO_C)
+#   pragma pack()
+#endif
+
 /* WAVE format wFormatTag IDs */
 #define WAVE_FORMAT_UNKNOWN             0x0000 /* Microsoft Corporation */
 #define WAVE_FORMAT_PCM                 0x0001 /* Microsoft Corporation */



More information about the vlc-commits mailing list