With some efforts I have installed a decent
compiler on an oldish SPARC box running Solaris 2.9.
Pretty nice setup for portability testing.
I gave nmh git master a try and it fails
due to the following:
uip/whatnowsbr.o wants setenv(), not present
uip/mhparse.o wants isblank() and getline(), both not present
mhical.c warns about gmtime_r unknown,
which is fixed by adding -D_POSIX_C_SOURCE=200800L to CFLAGS.
This is turn makes it forget about strcpy(), so I'd thrown
-D_XPG4_2 additionally. This makes it unhappy about
snprintf() which gets fixed by adding -D_XPG5.
All three make mhical warning-free.
Adding all three defines to a whole build makes it stop at:
depbase=`echo etc/gen-ctype-checked.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -m64 -mcpu=ultrasparc3 -DHAVE_CONFIG_H -I. -I/home/admini/saper/src/nmh
-D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200800L -D_XPG4_2 -D_XPG5 -MT
etc/gen-ctype-checked.o -MD -MP -MF $depbase.Tpo -c -o etc/gen-ctype-checked.o
/home/admini/saper/src/nmh/etc/gen-ctype-checked.c &&\
mv -f $depbase.Tpo $depbase.Po
/home/admini/saper/src/nmh/etc/gen-ctype-checked.c:49:32: error: ʽisblankʼ
undeclared here (not in a function)
# define CTYPE_FUNCTIONS_C99 X(isblank)
^
/home/admini/saper/src/nmh/etc/gen-ctype-checked.c:56:34: note: in definition
of macro ʽXʼ
#define X(function) { #function, function },
^
/home/admini/saper/src/nmh/etc/gen-ctype-checked.c:58:46: note: in expansion of
macro ʽCTYPE_FUNCTIONS_C99ʼ
{ CTYPE_FUNCTIONS CTYPE_FUNCTION_ISASCII CTYPE_FUNCTIONS_C99 { NULL, 0} };
^
Makefile:2301: recipe for target 'etc/gen-ctype-checked.o' failed
make: *** [etc/gen-ctype-checked.o] Error 1
(which is a consequence of the isblank() missing).
Finally there is a problem with getting signals right,
fixed by the patch below.
~Marcin