build issue on Solaris

Description

On Solaris 11/i386 the build of ICU 65.1 fails with the below message

g++ -m32 -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_STRTOD_L=0 -DU_DISABLE_RENAMING=1 -I/builds/pheimlic/icu642/components/icu/icu4c-65_1/icu/source/common "-DDEFAULT_ICU_PLUGINS=\"/usr/lib/icu\" " -DU_ATTRIBUTE_DEPRECATED= -DU_COMMON_IMPLEMENTATION -O2 -m32 -O3 -mincoming-stack-boundary=2 -D_EXTENSIONS_ -DDECCHECK -D_XOPEN_SOURCE=600 -std=c++11 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -c -DPIC -fPIC -o unames.o /builds/pheimlic/icu642/components/icu/icu4c-65_1/icu/source/common/unames.cpp
In file included from /usr/include/sys/ucontext.h:14:0,
from /usr/include/sys/signal.h:197,
from /usr/include/sys/procset.h:17,
from /usr/include/sys/wait.h:22,
from /usr/include/stdlib.h:16,
from /usr/gcc/7/include/c++/7.3.0/cstdlib:75,
from /usr/gcc/7/include/c++/7.3.0/ext/string_conversions.h:41,
from /usr/gcc/7/include/c++/7.3.0/bits/basic_string.h:6349,
from /usr/gcc/7/include/c++/7.3.0/string:52,
from /usr/gcc/7/include/c++/7.3.0/stdexcept:39,
from /usr/gcc/7/include/c++/7.3.0/array:39,
from /usr/gcc/7/include/c++/7.3.0/tuple:39,
from /usr/gcc/7/include/c++/7.3.0/bits/unique_ptr.h:37,
from /usr/gcc/7/include/c++/7.3.0/memory:80,
from /builds/pheimlic/icu642/components/icu/icu4c-65_1/icu/source/common/unicode/localpointer.h:45,
from /builds/pheimlic/icu642/components/icu/icu4c-65_1/icu/source/common/cmemory.h:33,
from /builds/pheimlic/icu642/components/icu/icu4c-65_1/icu/source/common/ubidi.cpp:20:
/builds/pheimlic/icu642/components/icu/icu4c-65_1/icu/source/common/ubidiimp.h:40:5: error: expected identifier before numeric constant
ES= U_EUROPEAN_NUMBER_SEPARATOR, /* 3 */
^

This is because on intel, /usr/include/sys/regset.h contains
...
#define SS 18 /* only stored on a privilege transition / #define UESP 17 / only stored on a privilege transition */ #define EFL 16 #define CS 15 #define EIP 14 #define ERR 13 #define TRAPNO 12 #define EAX 11 #define ECX 10 #define EDX 9 #define EBX 8 #define ESP 7 #define EBP 6 #define ESI 5 #define EDI 4 #define DS 3 #define ES 2 #define FS 1 #define GS 0
...

I could workaround it with the below patch (why can't I attach a file to jira?)
{{--- a/icu/source/common/ubidiimp.h Tue Sep 10 23:15:21 2019 +0200
+++ b/icu/source/common/ubidiimp.h Tue Sep 10 23:17:56 2019 +0200
@@ -24,6 +24,14 @@
#include "unicode/uchar.h"
#include "ubidi_props.h"

+/* Solaris defines CS and ES in sys/regset.h */
+#ifdef ES
+#undef ES
+#endif
+#ifdef CS
+#undef CS
+#endif
+
/* miscellaneous definitions ---------------------------------------------- */

typedef uint8_t DirProp;}}

Status

Assignee

Unassigned

Reporter

Pavel Heimlich

Labels

None

Reviewer

None

Time Needed

None

Start date

None

Components

Priority

TBD
Configure