[Glibc-bsd-commits] r4970 - in trunk/kfreebsd-kernel-headers: debian debian/patches test
Robert Millan
rmh at alioth.debian.org
Sat Sep 28 14:38:23 UTC 2013
Author: rmh
Date: 2013-09-28 14:38:23 +0000 (Sat, 28 Sep 2013)
New Revision: 4970
Added:
trunk/kfreebsd-kernel-headers/test/endian_collision.c
Modified:
trunk/kfreebsd-kernel-headers/debian/changelog
trunk/kfreebsd-kernel-headers/debian/patches/endian_collision.diff
trunk/kfreebsd-kernel-headers/test/Makefile
Log:
endian_collision.diff: Fix collisions in endian.h. Verify using asserts (test/endian_collision.c).
Modified: trunk/kfreebsd-kernel-headers/debian/changelog
===================================================================
--- trunk/kfreebsd-kernel-headers/debian/changelog 2013-09-27 21:29:34 UTC (rev 4969)
+++ trunk/kfreebsd-kernel-headers/debian/changelog 2013-09-28 14:38:23 UTC (rev 4970)
@@ -7,6 +7,8 @@
* Add <sys/kglue/netinet/if_ether.h> using patch from original port.
* sys_user.c: Check <sys/user.h> buildability.
* Simplify asserts using COMPILE_TIME_ASSERT() macro.
+ * endian_collision.diff: Fix collisions in endian.h. Verify using
+ asserts (test/endian_collision.c).
-- Robert Millan <rmh at debian.org> Sat, 21 Sep 2013 17:07:34 +0200
Modified: trunk/kfreebsd-kernel-headers/debian/patches/endian_collision.diff
===================================================================
--- trunk/kfreebsd-kernel-headers/debian/patches/endian_collision.diff 2013-09-27 21:29:34 UTC (rev 4969)
+++ trunk/kfreebsd-kernel-headers/debian/patches/endian_collision.diff 2013-09-28 14:38:23 UTC (rev 4970)
@@ -23,3 +23,29 @@
/* Alignment-agnostic encode/decode bytestream to/from little/big endian. */
+--- a/sys/amd64/include/endian.h
++++ b/sys/amd64/include/endian.h
+@@ -60,7 +60,9 @@
+ * Deprecated variants that don't have enough underscores to be useful in more
+ * strict namespaces.
+ */
+-#if __BSD_VISIBLE
++#if 1
++#include <endian.h>
++#else
+ #define LITTLE_ENDIAN _LITTLE_ENDIAN
+ #define BIG_ENDIAN _BIG_ENDIAN
+ #define PDP_ENDIAN _PDP_ENDIAN
+--- a/sys/i386/include/endian.h
++++ b/sys/i386/include/endian.h
+@@ -60,7 +60,9 @@
+ * Deprecated variants that don't have enough underscores to be useful in more
+ * strict namespaces.
+ */
+-#if __BSD_VISIBLE
++#if 1
++#include <endian.h>
++#else
+ #define LITTLE_ENDIAN _LITTLE_ENDIAN
+ #define BIG_ENDIAN _BIG_ENDIAN
+ #define PDP_ENDIAN _PDP_ENDIAN
Modified: trunk/kfreebsd-kernel-headers/test/Makefile
===================================================================
--- trunk/kfreebsd-kernel-headers/test/Makefile 2013-09-27 21:29:34 UTC (rev 4969)
+++ trunk/kfreebsd-kernel-headers/test/Makefile 2013-09-28 14:38:23 UTC (rev 4970)
@@ -1,5 +1,6 @@
TESTS = \
assert_correct_bsize.o \
+ endian_collision.o \
termios_collision.o \
type_collision.o \
time_collision.o \
Added: trunk/kfreebsd-kernel-headers/test/endian_collision.c
===================================================================
--- trunk/kfreebsd-kernel-headers/test/endian_collision.c (rev 0)
+++ trunk/kfreebsd-kernel-headers/test/endian_collision.c 2013-09-28 14:38:23 UTC (rev 4970)
@@ -0,0 +1,10 @@
+#include <endian.h>
+#include <sys/endian.h>
+#include <machine/endian.h>
+
+#include "assert.h"
+
+COMPILE_TIME_ASSERT(LITTLE, __LITTLE_ENDIAN == _LITTLE_ENDIAN);
+COMPILE_TIME_ASSERT(BIG, __BIG_ENDIAN == _BIG_ENDIAN);
+COMPILE_TIME_ASSERT(PDP, __PDP_ENDIAN == _PDP_ENDIAN);
+COMPILE_TIME_ASSERT(BYTE, __BYTE_ORDER == _BYTE_ORDER);
More information about the Glibc-bsd-commits
mailing list