DG/UX [was: Re: problem building 0.15.7]
David Relson
relson at osagesoftware.com
Thu Dec 11 23:05:08 CET 2003
On Thu, 11 Dec 2003 16:42:32 -0500 (EST)
Dave Lovelace <dave at firstcomp.biz> wrote:
> David Relson wrote:
> >
> >
> > So much for my idea :-( Now it's time for Matthias' porting
> > expertise...
> >
>
> In case it will help: I'll append a copy of a listing of the screen
> output of the make. Scanning for "warning" may give something that
> will help someone.
>
> For configuration information, see the message I sent David yesterday.
>
> I did look at the issue of strncasecmp() (which kept coming up, &
> which someone (Matthias?) identified as being declared in string.h.
> On this system, it (and strcasecmp()) are not declared in any header
> anywhere. If I write a miniprogram, declaring them, it compiles,
> links, & executes correctly. I tracked them down in the libraries.
> They're not in the standard libc.a (where, say, strcmp() is), but in
> libdgc.a (and libstaticdgc.a). I'm therefore hesitant to just add
> them to string.h; I don't know (at all!) how the dependencies on which
> libraries get used work. I'm more likely to try hacking the
> bogofilter code to declare them (if __DGUX__ is defined). I didn't
> get any further (& should have left an hour ago).
If we can get you up and going by modifying _your_ files, then we can
work on integrating the changes where they really belong :-)
File src/system.h does the include of string.h (or strings.h, as
appropriate). A workaround for declaring strcasecmp and strncasecmp
would be to #ifdef their declarations, i.e.
--- system.h 9 Dec 2003 00:07:50 -0000 1.21
+++ system.h 11 Dec 2003 21:57:21 -0000
@@ -53,6 +53,14 @@
#include <strings.h>
#endif
+#ifdef __DGUX__
+/* Compare S1 and S2, ignoring case. */
+extern int strcasecmp (__const char *__s1, __const char *__s2);
+
+/* Compare no more than N chars of S1 and S2, ignoring case. */
+extern int strncasecmp (__const char *__s1, __const char *__s2, size_t
__n);
+#endif
+
#if !STDC_HEADERS
# if !HAVE_STRCHR
# define strchr index
For libdgc.a and libstaticdgc.a try the following (or a variation):
--- Makefile~ 2003-12-10 18:49:41.000000000 -0500
+++ Makefile 2003-12-11 17:03:40.000000000 -0500
@@ -369,7 +369,7 @@
EXE_EXT =
GSL_CFLAGS = -I/usr/include
GSL_CONFIG = /usr/bin/gsl-config
-GSL_LIBS = -L/usr/lib -lgsl -lgslcblas -lm
+GSL_LIBS = -L/usr/lib -lgsl -lgslcblas -lm -ldgc
HAVE_EXTENDED_PRECISION_REGISTERS =
HAVE_INLINE =
INSTALL_DATA = ${INSTALL} -m 644
More information about the Bogofilter
mailing list