Date: Wed, 15 Dec 2021 20:07:29 GMT From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: c66a851d1378 - main - x11/cde: fix build on powerpc64le Message-ID: <202112152007.1BFK7TOT094154@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=c66a851d13783558a8fa17ffcf64759a0c1b5bab commit c66a851d13783558a8fa17ffcf64759a0c1b5bab Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2021-12-15 20:01:53 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2021-12-15 20:01:53 +0000 x11/cde: fix build on powerpc64le 1. Merge patches from shells/ast-ksh fixing ksh93 build. 2. Change endianness detection to what __BYTE_ORDER__ points to. The way CDE detects endianness is not correct and I got errors about running neither BE or LE. This still fails to build on powerpc64, so BROKEN_powerpc64 is not removed. --- ...programs_dtinfo_DtMmdb_btree__berkeley_compat.h | 16 ++++++++++++ ...tch-programs_dtinfo_DtMmdb_schema_store__desc.C | 30 ++++++++++++++++++++++ ...patch-programs_dtinfo_DtMmdb_storage_spointer.h | 11 ++++++++ ...-programs_dtinfo_DtMmdb_utility_atoi__pearson.C | 19 ++++++++++++++ ...ams_dtksh_ksh93_src_lib_libast_hash_hashalloc.c | 20 +++++++++++++++ ...ams_dtksh_ksh93_src_lib_libast_string_tokscan.c | 20 +++++++++++++++ 6 files changed, 116 insertions(+) diff --git a/x11/cde/files/patch-programs_dtinfo_DtMmdb_btree__berkeley_compat.h b/x11/cde/files/patch-programs_dtinfo_DtMmdb_btree__berkeley_compat.h new file mode 100644 index 000000000000..b04314918f6e --- /dev/null +++ b/x11/cde/files/patch-programs_dtinfo_DtMmdb_btree__berkeley_compat.h @@ -0,0 +1,16 @@ +--- programs/dtinfo/DtMmdb/btree_berkeley/compat.h.orig 2021-12-14 13:35:18 UTC ++++ programs/dtinfo/DtMmdb/btree_berkeley/compat.h +@@ -147,11 +147,11 @@ void * __fix_realloc __P((void*, size_t)); + #define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ + #define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ + +-#ifdef MMDB_LITTLE_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + #define BYTE_ORDER LITTLE_ENDIAN /* Set for your system. */ + #endif + +-#ifdef MMDB_BIG_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + #define BYTE_ORDER BIG_ENDIAN /* Set for your system. */ + #endif + diff --git a/x11/cde/files/patch-programs_dtinfo_DtMmdb_schema_store__desc.C b/x11/cde/files/patch-programs_dtinfo_DtMmdb_schema_store__desc.C new file mode 100644 index 000000000000..175de96d7e6f --- /dev/null +++ b/x11/cde/files/patch-programs_dtinfo_DtMmdb_schema_store__desc.C @@ -0,0 +1,30 @@ +--- programs/dtinfo/DtMmdb/schema/store_desc.C.orig 2021-12-14 19:59:51 UTC ++++ programs/dtinfo/DtMmdb/schema/store_desc.C +@@ -66,11 +66,11 @@ store_desc::store_desc(const char* name) : desc(name) + mode_str = strdup(""); + order_str = 0; + +-#ifdef MMDB_BIG_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + order_str = strdup("big_endian"); + #endif + +-#ifdef MMDB_LITTLE_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + order_str = strdup("little_endian"); + #endif + +@@ -87,11 +87,11 @@ store_desc::store_desc(int tp, const char* comment): + + order_str = 0; + +-#ifdef MMDB_BIG_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + order_str = strdup("big_endian"); + #endif + +-#ifdef MMDB_LITTLE_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + order_str = strdup("little_endian"); + #endif + diff --git a/x11/cde/files/patch-programs_dtinfo_DtMmdb_storage_spointer.h b/x11/cde/files/patch-programs_dtinfo_DtMmdb_storage_spointer.h new file mode 100644 index 000000000000..6b9a5a8c3be3 --- /dev/null +++ b/x11/cde/files/patch-programs_dtinfo_DtMmdb_storage_spointer.h @@ -0,0 +1,11 @@ +--- programs/dtinfo/DtMmdb/storage/spointer.h.orig 2021-12-14 10:42:39 UTC ++++ programs/dtinfo/DtMmdb/storage/spointer.h +@@ -52,7 +52,7 @@ + + struct header_t + { +-#ifdef MMDB_BIG_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + unsigned spointer : 14; + unsigned length : 14; + unsigned is_object : 1; diff --git a/x11/cde/files/patch-programs_dtinfo_DtMmdb_utility_atoi__pearson.C b/x11/cde/files/patch-programs_dtinfo_DtMmdb_utility_atoi__pearson.C new file mode 100644 index 000000000000..8f86f16517cb --- /dev/null +++ b/x11/cde/files/patch-programs_dtinfo_DtMmdb_utility_atoi__pearson.C @@ -0,0 +1,19 @@ +--- programs/dtinfo/DtMmdb/utility/atoi_pearson.C.orig 2021-12-14 01:08:51 UTC ++++ programs/dtinfo/DtMmdb/utility/atoi_pearson.C +@@ -107,14 +107,14 @@ atoi_pearson::~atoi_pearson() + } + + struct reg_t { +-#ifdef MMDB_BIG_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + unsigned b4: 8; + unsigned b3: 8; + unsigned b2: 8; + unsigned b1: 8; + #endif + +-#ifdef MMDB_LITTLE_ENDIAN ++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + unsigned b1: 8; + unsigned b2: 8; + unsigned b3: 8; diff --git a/x11/cde/files/patch-programs_dtksh_ksh93_src_lib_libast_hash_hashalloc.c b/x11/cde/files/patch-programs_dtksh_ksh93_src_lib_libast_hash_hashalloc.c new file mode 100644 index 000000000000..f050420f5e21 --- /dev/null +++ b/x11/cde/files/patch-programs_dtksh_ksh93_src_lib_libast_hash_hashalloc.c @@ -0,0 +1,20 @@ +--- programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c.orig 2021-12-13 19:03:46 UTC ++++ programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c +@@ -49,6 +49,7 @@ hashalloc(Hash_table_t* ref, ...) + va_list* vp = va; + Hash_region_f region = 0; + void* handle; ++ va_listarg tmpval; + + va_start(ap, ref); + +@@ -151,7 +152,8 @@ hashalloc(Hash_table_t* ref, ...) + va_copy(*vp, ap); + vp++; + } +- va_copy(ap, va_listval(va_arg(ap, va_listarg))); ++ tmpval = va_listval(va_arg(ap, va_listarg)); ++ va_copy(ap, tmpval); + break; + case 0: + if (vp > va) diff --git a/x11/cde/files/patch-programs_dtksh_ksh93_src_lib_libast_string_tokscan.c b/x11/cde/files/patch-programs_dtksh_ksh93_src_lib_libast_string_tokscan.c new file mode 100644 index 000000000000..5dcf7b11dafe --- /dev/null +++ b/x11/cde/files/patch-programs_dtksh_ksh93_src_lib_libast_string_tokscan.c @@ -0,0 +1,20 @@ +--- programs/dtksh/ksh93/src/lib/libast/string/tokscan.c.orig 2021-12-13 22:46:02 UTC ++++ programs/dtksh/ksh93/src/lib/libast/string/tokscan.c +@@ -188,6 +188,7 @@ tokscan(register char* s, char** nxt, const char* fmt, + char** p_string; + char* prv_f = 0; + va_list prv_ap; ++ va_listarg tmpval; + + va_start(ap, fmt); + if (!*s || *s == '\n') +@@ -233,7 +234,8 @@ tokscan(register char* s, char** nxt, const char* fmt, + prv_f = f; + f = va_arg(ap, char*); + va_copy(prv_ap, ap); +- va_copy(ap, va_listval(va_arg(ap, va_listarg))); ++ tmpval = va_listval(va_arg(ap, va_listarg)); ++ va_copy(ap, tmpval); + continue; + case 'c': + p_char = va_arg(ap, char*);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112152007.1BFK7TOT094154>