Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 1996 22:27:41 +0100 (MET)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-hackers@freebsd.org (FreeBSD hackers)
Subject:   Regexp ambiguity (Was: cvs commit:  src/gnu/lib/libregex ...)
Message-ID:  <199611212127.WAA22717@uriah.heep.sax.de>
In-Reply-To: <199611210724.IAA16339@ghpc6.ihf.rwth-aachen.de> from Thomas Gellekum at "Nov 21, 96 08:24:25 am"

next in thread | previous in thread | raw e-mail | index | archive | help
As Thomas Gellekum wrote:

> >   Merge from HEAD: don't duplicate the Posix regex stuff in libregex,
> >   it's already in libc (and both implementations clash when linking both
> >   libs simultaneously).
> 
> While you're at it: when testing a new port I found that there are
> multiple definitions of regerror in libcompat:

> Which one of those do we really need there?

If you look into the source, you'll notice that there are two
different regexp packages in libcompat.  One is sitting in `4.3',
consisting of re_comp(), re_exec(), and the undocumented regerror().
All functions are in a single file, so once you reference re_comp()
and re_exec(), you'll automatically get the correct regerror().

The other implementation is Henry Spencer's regexp(3), consisting of
functions identically named to the Posix regex stuff (regcomp(),
regexec(), regsub() [which is not in Posix]), and regerror().  All
functions live in different source files.  Further, regerror() is
supposed to be overloadable by user programs, hence it's not that easy
to squeeze it along into one of the other files, even though the
default regerror() is a do-nothing.  I'm not sure, maybe now that our
assembler and linker understand weak symbols, we could go this route,
so it will be tightly bound to its respective regexp functions, but
can still be overloaded by the user?

Are there opinions to this?

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611212127.WAA22717>