nmh-workers
[Top] [All Lists]

Re: [nmh-workers] Problems compiling on SPARC Sun Solaris 10 compile with ANSI C SUN compiler.

2019-06-13 12:54:58
So, first off ... if HAVE_STDBOOL_H is being defined and we are including
stdbool.h, then I guess I am wondering what the contents of stdbool.h are.
Also, I don't know who is supposed to be adding the preprocessor symbol
_BOOL.  I think some time spent with the -E option (or whatever does the
similar thing on Solaris) and looking at stdbool.h could puzzle this out.

Undefined                       first referenced
symbol                             in file
memmem                              sbr/libmh.a(sbr_libmh_a-m_getfld.o)
stpcpy                              sbr/libmh.a(sbr_libmh_a-concat.o)
strnlen                             sbr/libmh.a(sbr_libmh_a-utils.o)

Solaris 10 doesn't have those three functions, says Gnulib.

   https://www.gnu.org/software/gnulib/manual/html_node/memmem.html
   https://www.gnu.org/software/gnulib/manual/html_node/stpcpy.html
   https://www.gnu.org/software/gnulib/manual/html_node/strnlen.html

http://austingroupbugs.net/view.php?id=1061 suggests POSIX are adding
memmem().  stpcpy() and strnlen() are in POSIX.1-2008.

We try to conform to POSIX; I did not realize memmem() was NOT POSIX,
but to be fair this is the first I've heard of it and I didn't realize
we used it.  Looking where it is used, I understand why we use it.

I forget what we do in this situation?

I guess our official answer is: ¯\_(ツ)_/¯

In a perfect world, we'd offer function replacements for at least the
non-POSIX functions we use via autoconf, and possibly for other functions.
And I don't want to actively make Solaris not work ... but I'm PERSONALLY
not interested in spending the time to make that work, especially since
I haven't had access to any Solaris systems in a long time and Solaris
has become a "challenging" system to develop for in recent years.

I guess the answers are: change the code to use other functions or install
Gnulib and use that (note: that might be a bit of a challenge since gnulib
is really designed to be used as source, not a library you link against),
or find some other library that has these functions and link against it.
Or, really, write some trivial replacements for those functions because
I think you could do them all as one-liners.  Maybe not memmem(), but that
one would only be a few lines.

--Ken

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>