Thread (3 messages) flat view 3 messages, 3 authors, 2017-06-27

Re: Compile Error v2.13.2 on Solaris SPARC

From: Junio C Hamano <hidden>
Date: 2017-06-27 17:38:45

"Liam R. Howlett" [off-list ref] writes:
quoted hunk
How about:

---- 8< ----
diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
index facea1bb5..ed8c63f2d 100644
--- a/sha1dc/sha1.c
+++ b/sha1dc/sha1.c
@@ -38,9 +38,18 @@
 
 #if (defined(_BYTE_ORDER) || defined(__BYTE_ORDER) || defined(__BYTE_ORDER__))
 
+#define EMPTY_VAL(x) x ## 1
+#define EMPTY(x) EMPTY_VAL(x)
+
+#if (defined(_BIG_ENDIAN) && (EMPTY(_BIG_ENDIAN) == 1))
+#undef _BIG_ENDIAN
+#define _BIG_ENDIAN 4321
+#endif
I'd say it is a bad idea to define a symbol that you _know_ a
platform header file defines.  Any header you may include from the
platform after these lines still expects the symbol to be defined in
a way it defines without getting molested and will misbehave.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help