According to Joe R. Jah:
> I did it like so:
> __________________
> extern "C"
> {
> #include <regex.h>
> }
> __________________
> 
> I got a compile error:
> __________________________________________________
> regex.c:210: syntax error before string constant
> regex.c:213: syntax error before `}'
> gmake[1]: *** [regex.o] Error 1
> gmake[1]: Leaving directory
> `/usr/home/jjah/tmp/htdig-3.1.2/htdig-3.1.2/htlib'
> gmake: *** [all] Error 1
> __________________________________________________

OK, upon closer examination, it appears I was mistaken about one point.
3.1.2 doesn't use the regex code in the C library, but rather it bundles
the GNU regex code in the package, and puts it in htlib/libht.a.
The extern "C" construct above doesn't work because htlib/regex.h
already includes this construct - that's why it was removed from
htfuzzy/Endings.cc.

So, perhaps this GNU regex.c code is causing a conflict with your C
or C++ library.  If you already have a regex.h in your /usr/include
directory, and regex functions in your C library, you might want to try
using these instead of the ones in htlib.  To do this, I think you'd need
to remove references to regex.o from htlib/Makefile, remove regex.o from
htlib/libht.a, and probably also remove htlib/regex.h.  If this works,
let us know, and hopefully tests for this can be patched into configure,
so that it gets done automatically on BSDI systems for future ht://Dig
releases.

If it doesn't work (and I admit it's a long shot if it does), then we'll
need to dig deeper to find the source of the conflict.  The segfault was
in bzero() - maybe BSD and GNU have different ideas about how bzero is
supposed to work, and you may need to fiddle with some of the definitions
for regex.c.


-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word unsubscribe in
the SUBJECT of the message.

Reply via email to