Skip to contentSkip to conversation

libext2fs: fix endian checking bits

PATCH Applied Darrick J. Wong 3 participants 3 messages Nov 4, 2014 – Nov 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libext2fs: fix endian checking bits

Commit 3e683eef936e6d ("define bitwise types and annotate conversion routines") broke the build on various platforms. Turns out that crossing our fingers wasn't such a good idea, so just define it separately.

---
 lib/blkid/blkid_types.h.in |   15 ---------------
 lib/ext2fs/ext2_types.h.in |    8 +++++++-
 2 files changed, 7 insertions(+), 16 deletions(-)
lib/blkid/blkid_types.h.in +0 -15
index 2bb3d85..d4c81d0 100644
@@ -164,19 +164,4 @@ typedef long		__s64;
 #undef __S64_TYPEDEF
 #undef __U64_TYPEDEF
 
-#ifdef __CHECKER__
-#define __bitwise		__attribute__((bitwise))
-#define __force			__attribute__((force))
-#else
-#define __bitwise
-#define __force
-#endif
-
-typedef __u16	__bitwise	__le16;
-typedef __u32	__bitwise	__le32;
-typedef __u64	__bitwise	__le64;
-typedef __u16	__bitwise	__be16;
-typedef __u32	__bitwise	__be32;
-typedef __u64	__bitwise	__be64;
-
 #endif /* _*_TYPES_H */
lib/ext2fs/ext2_types.h.in +7 -1
index a00ed7f..fd57231 100644
@@ -164,6 +164,12 @@ typedef long		__s64;
 #undef __S64_TYPEDEF
 #undef __U64_TYPEDEF
 
+#endif /* _*_TYPES_H */
+
+/* endian checking stuff */
+#ifndef EXT2_ENDIAN_H_
+#define EXT2_ENDIAN_H_
+
 #ifdef __CHECKER__
 #define __bitwise		__attribute__((bitwise))
 #define __force			__attribute__((force))
@@ -179,6 +185,6 @@ typedef __u16	__bitwise	__be16;
 typedef __u32	__bitwise	__be32;
 typedef __u64	__bitwise	__be64;
 
-#endif /* _*_TYPES_H */
+#endif /* EXT2_ENDIAN_H_ */
 
 @PUBLIC_CONFIG_HEADER@
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Darrick J. Wong

Commit 3e683eef936e6d ("define bitwise types and annotate conversion routines") broke the build on various platforms. Turns out that crossing our fingers wasn't such a good idea, so just define it separately.

sooorrry!

Seems fine, thanks.

Quoted 56 lines
---
 lib/blkid/blkid_types.h.in |   15 ---------------
 lib/ext2fs/ext2_types.h.in |    8 +++++++-
 2 files changed, 7 insertions(+), 16 deletions(-)
lib/blkid/blkid_types.h.in +0 -15
index 2bb3d85..d4c81d0 100644
@@ -164,19 +164,4 @@ typedef long		__s64;
 #undef __S64_TYPEDEF
 #undef __U64_TYPEDEF
 
-#ifdef __CHECKER__
-#define __bitwise		__attribute__((bitwise))
-#define __force			__attribute__((force))
-#else
-#define __bitwise
-#define __force
-#endif
-
-typedef __u16	__bitwise	__le16;
-typedef __u32	__bitwise	__le32;
-typedef __u64	__bitwise	__le64;
-typedef __u16	__bitwise	__be16;
-typedef __u32	__bitwise	__be32;
-typedef __u64	__bitwise	__be64;
-
 #endif /* _*_TYPES_H */
lib/ext2fs/ext2_types.h.in +7 -1
index a00ed7f..fd57231 100644
@@ -164,6 +164,12 @@ typedef long		__s64;
 #undef __S64_TYPEDEF
 #undef __U64_TYPEDEF
 
+#endif /* _*_TYPES_H */
+
+/* endian checking stuff */
+#ifndef EXT2_ENDIAN_H_
+#define EXT2_ENDIAN_H_
+
 #ifdef __CHECKER__
 #define __bitwise		__attribute__((bitwise))
 #define __force			__attribute__((force))
@@ -179,6 +185,6 @@ typedef __u16	__bitwise	__be16;
 typedef __u32	__bitwise	__be32;
 typedef __u64	__bitwise	__be64;
 
-#endif /* _*_TYPES_H */
+#endif /* EXT2_ENDIAN_H_ */
 
 @PUBLIC_CONFIG_HEADER@
#2 lore raw
Quoted 11 lines · Eric Sandeen
Quoted 4 lines · Darrick J. Wong

Commit 3e683eef936e6d ("define bitwise types and annotate conversion routines") broke the build on various platforms. Turns out that crossing our fingers wasn't such a good idea, so just define it separately.

sooorrry!

Seems fine, thanks.

Applied, thanks.

- Ted