[FFmpeg-cvslog] r19453 - in trunk: configure libavutil/intreadwrite.h

mru subversion
Fri Jul 17 10:21:43 CEST 2009


Author: mru
Date: Fri Jul 17 10:21:43 2009
New Revision: 19453

Log:
Check for __attribute__((packed)) support

Not all compilers claiming to be gcc support this attribute.

Modified:
   trunk/configure
   trunk/libavutil/intreadwrite.h

Modified: trunk/configure
==============================================================================
--- trunk/configure	Fri Jul 17 10:21:41 2009	(r19452)
+++ trunk/configure	Fri Jul 17 10:21:43 2009	(r19453)
@@ -899,6 +899,7 @@ HAVE_LIST="
     alsa_asoundlib_h
     altivec_h
     arpa_inet_h
+    attribute_packed
     bigendian
     bswap
     closesocket
@@ -2165,6 +2166,10 @@ void foo(char * $restrict_keyword p);
 EOF
 done
 
+check_cc <<EOF && enable attribute_packed
+struct { int x; } __attribute__((packed)) x;
+EOF
+
 ##########################################
 # SDL check
 

Modified: trunk/libavutil/intreadwrite.h
==============================================================================
--- trunk/libavutil/intreadwrite.h	Fri Jul 17 10:21:41 2009	(r19452)
+++ trunk/libavutil/intreadwrite.h	Fri Jul 17 10:21:43 2009	(r19453)
@@ -42,7 +42,7 @@
  * by per-arch headers.
  */
 
-#if   defined(__GNUC__)
+#if   HAVE_ATTRIBUTE_PACKED
 
 struct unaligned_64 { uint64_t l; } __attribute__((packed));
 struct unaligned_32 { uint32_t l; } __attribute__((packed));



More information about the ffmpeg-cvslog mailing list