delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/11/13/16:08:30

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3A10582D.A96A9367@redhat.com>
Date: Mon, 13 Nov 2000 22:07:57 +0100
From: Corinna Vinschen <vinschen AT redhat DOT com>
Reply-To: cygwin AT sources DOT redhat DOT com
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.14-SMP i686)
X-Accept-Language: de, en
MIME-Version: 1.0
To: cygwin <cygwin AT sources DOT redhat DOT com>
Subject: Re: regex pb ?
References: <001101c04db4$2168eb30$e3dc9c81 AT ireland DOT sun DOT com>

Emmanuel Blot wrote:
> The code coming from the openldap project that checks the POSIX compatibilty runs well under Linux, but fails under cygwin:
> 
> #include <sys/types.h>
> #include <regex.h>
> static char *pattern, *string;
> main()
> {
>  int rc;
>  regex_t re;
> 
>  pattern = "^A";
> 
>  if(regcomp(&re, pattern, 0)) {
>    /* returns 167837896 !! */
>   return -1;
>  }
> 
>   /* ... */
> }
> 
> Any idea ?

Did you link with -lregex? Otherwise you will link to the Cygwin
builtin regcomp function which is the old V8 regexp functionality.
The corresponding header is regexp.h. If you want the POSIX
implementation you have to link with -lregex.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                        mailto:cygwin AT sources DOT redhat DOT com
Red Hat, Inc.
mailto:vinschen AT redhat DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019