make FOURCC macro produce right ordering for bigendien machines
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 2 Dec 2004 16:10:51 +0000 (16:10 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 2 Dec 2004 16:10:51 +0000 (16:10 +0000)
[r4547]

ir/adt/fourcc.h

index 3d04f7a..f8bc5ff 100644 (file)
 #ifndef _FOURCC_H
 #define _FOURCC_H
 
+#include "firm_config.h"
+
+/* define an always readable fourcc code */
+#ifdef WORDS_BIGENDIAN
+#define FOURCC(a,b,c,d)         ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24))
+#else
 #define FOURCC(a,b,c,d)         ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
+#endif
 
 #endif /* _FOURCC_H */