On 28 Sep, Ralph Corderoy wrote:
I realise it's probably just the first one that came to hand, but it
whiffs a bit, and
If you've got a good nose for it, could you perhaps try to sniff out a
better one. As you surmise, it was the first that came to hand. I just
did 'ag getline' in the opencsw subversion repository. The one other
implementation in there besides the GPL gnulib one is this:
https://sf.net/p/gar/code/HEAD/tree/csw/mgar/pkg/reprepro/trunk/files/0004-implement-missing-getline-function.patch
Any good?
For the autoconf/automake stuff to replace getline, the following
patch seems to work. Should AC_REPLACE_FUNCS perhaps be earlier or
later in configure.ac?
The final change on configure.ac is to cope with cc -V output having
slightly changed in the most recent version of the compiler.
A number of tests are failing on Solaris. This seems to mostly consist
of:
id: illegal option -- u
Usage: id [-ap] [user]
FAIL: test/mhmail/test-mhmail
/usr/xpg4/bin/id -u would work but I'm not sure how to select that.
I thought command -p might help but not with /bin/sh. Would comparing
$LOGNAME to root do the job? Any other ideas?
Another issue is that tests using require_locale look for locales
in lowercase, e.g. en_US.utf8. On Solaris plus various *BSD systems,
these are output in uppercase form, e.g. en_US.UTF-8.
Oliver
diff --git a/Makefile.am b/Makefile.am
index 33c7e2c..1ba68ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -504,7 +504,7 @@ test_fakesmtp_SOURCES = test/fakesmtp.c test/server.c
test_fakesmtp_LDADD = $(POSTLINK)
test_fakehttp_SOURCES = test/fakehttp.c test/server.c
-test_fakehttp_LDADD = $(POSTLINK)
+test_fakehttp_LDADD = $(LDADD) $(POSTLINK)
test_getcwidth_SOURCES = test/getcwidth.c
test_getcwidth_LDADD = $(POSTLINK)
@@ -632,6 +632,8 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c
sbr/atooi.c sbr/arglist.c \
config/config.c config/version.c \
thirdparty/jsmn/jsmn.c
+sbr_libmh_a_LIBADD = $(LIBOBJS)
+
##
## Because these files use the definitions in the libmh rule below,
## they need to be rebuilt if the Makefile changes.
diff --git a/configure.ac b/configure.ac
index d3fa76e..72b4c66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,9 @@ dnl CHECK FUNCTIONS
dnl ---------------
AC_CHECK_FUNCS([wcwidth mbtowc getutxent arc4random mkstemps])
+AC_CONFIG_LIBOBJ_DIR([sbr])
+AC_REPLACE_FUNCS([getline])
+
dnl -----------------------
dnl CHECK MULTIBYTE SUPPORT
dnl -----------------------
@@ -134,7 +137,7 @@ if test "$GCC" != yes; then
dnl better to use an autoconf test, except -v will probably succeed
dnl with many other compilers but have different meaning.
AS_CASE([`${CC} -V 2>&1`],
- [cc:\ Sun\ C*], [AM_CFLAGS=\
+ [cc:*\ Sun\ C*], [AM_CFLAGS=\
"${AM_CFLAGS:+$AM_CFLAGS }-v -errtags=yes -erroff=E_STATEMENT_NOT_REACHED"])
fi
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers