Expand ifdefs to build on most if not all OpenBSD architectures.

The solution isn't very nice but is the least intrusive right now; and
you can only find portability bugs in programs that do build.  As
suggested by naddy@, something based on endian.h would probably be
nicer.

ok sthen@, Josh Grosse (maintainer)
This commit is contained in:
jca 2015-11-16 22:52:08 +00:00
parent 150b4f2461
commit 3df428f2a9
2 changed files with 33 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.25 2015/10/21 10:45:08 sthen Exp $
# $OpenBSD: Makefile,v 1.26 2015/11/16 22:52:08 jca Exp $
SHARED_ONLY= Yes
@ -6,6 +6,7 @@ COMMENT-main= file archiver with high compression ratio
COMMENT-rar= rar modules for p7zip
V= 15.09
REVISION= 0
DISTNAME= p7zip_${V}_src_all
PKGNAME= p7zip-${V}
PKGNAME-main= p7zip-${V}

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-C_CpuArch_h,v 1.1 2015/11/16 22:52:08 jca Exp $
Add support for more OpenBSD architectures.
--- C/CpuArch.h.orig Sun Sep 27 21:31:20 2015
+++ C/CpuArch.h Thu Nov 12 00:28:15 2015
@@ -65,7 +65,10 @@ If MY_CPU_LE_UNALIGN is not defined, we don't know abo
|| defined(__AARCH64EL__) \
|| defined(__MIPSEL__) \
|| defined(__MIPSEL) \
- || defined(_MIPSEL)
+ || defined(_MIPSEL) \
+ || defined(__alpha__) \
+ || defined(__sh__) \
+ || defined(__vax__)
#define MY_CPU_LE
#endif
@@ -77,7 +80,11 @@ If MY_CPU_LE_UNALIGN is not defined, we don't know abo
|| defined(__MIPSEB) \
|| defined(_MIPSEB) \
|| defined(__m68k__) \
- || defined(__s390x__)
+ || defined(__m88k__) \
+ || defined(__s390x__) \
+ || defined(__hppa__) \
+ || defined(__mips64__) \
+ || defined(__sparc__)
#define MY_CPU_BE
#endif