Subject: lib/1849: -lcompat breaks regcomp()
To: None <gnats-bugs@gnats.netbsd.org>
From: None <david@mono.org>
List: netbsd-bugs
Date: 12/18/1995 21:00:49
>Number:         1849
>Category:       lib
>Synopsis:       linking with -lcompat breaks regcomp()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 18 16:20:04 1995
>Last-Modified:
>Originator:     Monoadm
>Organization:
mono.org
>Release:        oct/95
>Environment:
System: NetBSD muon.mono.org 1.0A NetBSD 1.0A (_SUN4C+DDB_) #10: Tue Oct 10 13:12:41 BST 1995 root@tachyon.mono.org:/usr/src/sys/arch/sparc/compile/_SUN4C+DDB_ sparc


>Description:
	Linking with -lcompat breaks any use of the new regex functions.
	This really sucks if you need anything else in -lcompat :)

>How-To-Repeat:

	Compile & run the following with
	'gcc -o check check.c ; ./check' and you get 0. no problem there.

	Compile & run with
	'gcc -o check check.c -lcompat; ./check' and you get 32768. Ahh no,
	not what was expected.

#include <sys/types.h>
#include <regex.h>

main()
    {
    regex_t preg;
    int	val;

    val=regcomp(&preg,"city",REG_EXTENDED|REG_ICASE|REG_NOSUB);
    printf("%d\n",val);
    }
	
>Fix:
	Probably someone needs to rename some things inside libcompat...
>Audit-Trail:
>Unformatted: