Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 14 Dec 2001 11:36:19 +0100 From: Corinna Vinschen To: cygwin Subject: Re: duplicate regexec/regcomp functions detected Message-ID: <20011214113619.J740@cygbert.vinschen.de> Mail-Followup-To: cygwin References: <015501c18413$5a3d81f0$9a5f07d5 AT BRAMSCHE> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <015501c18413$5a3d81f0$9a5f07d5@BRAMSCHE>; from Ralf.Habacker@freenet.de on Thu, Dec 13, 2001 at 09:18:39PM +0100 On Thu, Dec 13, 2001 at 09:18:39PM +0100, Ralf Habacker wrote: > Hi all, > > kde needs the regexp functions regexec and regcomp. > > The cygwin lib contains the System V8 function call style, while the pcre package (pcreposix) > provides another style (the system V style I guess). The problem is now, that both libs > supports the same names for regexec and regcomp but with different parameter/return types. > This results sometimes in execution failures if the libs are not in the right order like > shown in the following example. > > pcre regexp wanted > > $ gcc ... -lpcreposix -lcygwin -> okay > > $ gcc ... -lpthreads|-lm|-lc -lpcreposix -lcygwin -> failure: the functions in cygwin lib > are used But that order should never happen EXCEPT you're making the big mistake to give `-lm' or `-lc' on the command line explicitly. Since -lcygwin is appended automagically and libc.a and libm.a are the same library anyway, the answer is simply, "Don't do that." > Especially in libtool related environment with many dependency libs like kde this causes much > trouble. > > Should it not be better, to remove the regexp support from cygwin into a seperate lib, so > that users has an easier possibility to choose which regexp style they want ? We didn't want that for compatibility reasons. We often already discussed to trash the V8 implementation in favor of a POSIX implementation but that would break older applications which we're trying to avoid. Btw., we have another POSIX regex library besides pcreposix: -lregex. It's somewhat smaller and it's also DLLized. OpenSSH's configure.ac file has a special check to see if a regex lib exists and if the base regexp implementation in the std C lib is POSIX compliant. We added that to the OpenSSH configury a few weeks ago to make Cygwin happy. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/