Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160706035414.10083-2-koorogi@koorogi.info>
Date: Tue,  5 Jul 2016 22:54:11 -0500
From: Bobby Bingham <koorogi@...rogi.info>
To: musl@...ts.openwall.com
Subject: [PATCH 2/5] create big/little endian generic bits overlays

---
 arch/{or1k => generic-be}/bits/endian.h   |  0
 arch/{i386 => generic-le}/bits/endian.h   |  0
 arch/{powerpc64 => generic}/bits/endian.h |  0
 arch/i386/arch.mak                        |  1 +
 arch/or1k/arch.mak                        |  1 +
 arch/powerpc/bits/endian.h                | 15 ---------------
 arch/sh/bits/endian.h                     |  5 -----
 arch/x32/arch.mak                         |  1 +
 arch/x32/bits/endian.h                    |  1 -
 arch/x86_64/arch.mak                      |  1 +
 arch/x86_64/bits/endian.h                 |  1 -
 11 files changed, 4 insertions(+), 22 deletions(-)
 rename arch/{or1k => generic-be}/bits/endian.h (100%)
 rename arch/{i386 => generic-le}/bits/endian.h (100%)
 rename arch/{powerpc64 => generic}/bits/endian.h (100%)
 create mode 100644 arch/i386/arch.mak
 create mode 100644 arch/or1k/arch.mak
 delete mode 100644 arch/powerpc/bits/endian.h
 delete mode 100644 arch/sh/bits/endian.h
 create mode 100644 arch/x32/arch.mak
 delete mode 100644 arch/x32/bits/endian.h
 create mode 100644 arch/x86_64/arch.mak
 delete mode 100644 arch/x86_64/bits/endian.h

diff --git a/arch/or1k/bits/endian.h b/arch/generic-be/bits/endian.h
similarity index 100%
rename from arch/or1k/bits/endian.h
rename to arch/generic-be/bits/endian.h
diff --git a/arch/i386/bits/endian.h b/arch/generic-le/bits/endian.h
similarity index 100%
rename from arch/i386/bits/endian.h
rename to arch/generic-le/bits/endian.h
diff --git a/arch/powerpc64/bits/endian.h b/arch/generic/bits/endian.h
similarity index 100%
rename from arch/powerpc64/bits/endian.h
rename to arch/generic/bits/endian.h
diff --git a/arch/i386/arch.mak b/arch/i386/arch.mak
new file mode 100644
index 0000000..9ed39c4
--- /dev/null
+++ b/arch/i386/arch.mak
@@ -0,0 +1 @@
+ARCH_FALLBACKS = i386 generic-le generic
diff --git a/arch/or1k/arch.mak b/arch/or1k/arch.mak
new file mode 100644
index 0000000..a44f82f
--- /dev/null
+++ b/arch/or1k/arch.mak
@@ -0,0 +1 @@
+ARCH_FALLBACKS = or1k generic-be generic
diff --git a/arch/powerpc/bits/endian.h b/arch/powerpc/bits/endian.h
deleted file mode 100644
index 4442abf..0000000
--- a/arch/powerpc/bits/endian.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifdef __BIG_ENDIAN__
-  #if __BIG_ENDIAN__
-    #define __BYTE_ORDER __BIG_ENDIAN
-  #endif
-#endif /* __BIG_ENDIAN__ */
-
-#ifdef __LITTLE_ENDIAN__
-  #if __LITTLE_ENDIAN__
-    #define __BYTE_ORDER __LITTLE_ENDIAN
-  #endif
-#endif /* __LITTLE_ENDIAN__ */
-
-#ifndef __BYTE_ORDER
-  #define __BYTE_ORDER __BIG_ENDIAN
-#endif
diff --git a/arch/sh/bits/endian.h b/arch/sh/bits/endian.h
deleted file mode 100644
index 2016cb2..0000000
--- a/arch/sh/bits/endian.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if __BIG_ENDIAN__
-#define __BYTE_ORDER __BIG_ENDIAN
-#else
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
diff --git a/arch/x32/arch.mak b/arch/x32/arch.mak
new file mode 100644
index 0000000..f1c9ec5
--- /dev/null
+++ b/arch/x32/arch.mak
@@ -0,0 +1 @@
+ARCH_FALLBACKS = x32 generic-le generic
diff --git a/arch/x32/bits/endian.h b/arch/x32/bits/endian.h
deleted file mode 100644
index 172c338..0000000
--- a/arch/x32/bits/endian.h
+++ /dev/null
@@ -1 +0,0 @@
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/arch/x86_64/arch.mak b/arch/x86_64/arch.mak
new file mode 100644
index 0000000..a9dace7
--- /dev/null
+++ b/arch/x86_64/arch.mak
@@ -0,0 +1 @@
+ARCH_FALLBACKS = x86_64 generic-le generic
diff --git a/arch/x86_64/bits/endian.h b/arch/x86_64/bits/endian.h
deleted file mode 100644
index 172c338..0000000
--- a/arch/x86_64/bits/endian.h
+++ /dev/null
@@ -1 +0,0 @@
-#define __BYTE_ORDER __LITTLE_ENDIAN
-- 
2.9.0

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.