From owner-freebsd-current Thu May 14 20:03:17 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA18346 for freebsd-current-outgoing; Thu, 14 May 1998 20:03:17 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA18336 for ; Thu, 14 May 1998 20:03:13 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.8.8/8.8.7) id NAA16946; Fri, 15 May 1998 13:06:01 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199805150306.NAA16946@cimlogic.com.au> Subject: Re: Undefined symbol "___error" In-Reply-To: <199805150251.TAA18202@usr01.primenet.com> from Terry Lambert at "May 15, 98 02:51:40 am" To: tlambert@primenet.com (Terry Lambert) Date: Fri, 15 May 1998 13:06:01 +1000 (EST) Cc: jb@cimlogic.com.au, tlambert@primenet.com, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry Lambert wrote: > Was the libc version actually bumped? For 3.0 I think yes, but not specifically for this change. > Are we talking code that doesn't get rebuilt when the system is > rebuilt? Ie: the system is *NOT* rebuilt, only *PART* of the system > is rebuilt? We are talking about programs that are not distributed by FreeBSD. > If *PART* of the system *WASN'T* rebuilt, I now see the problem. The > user is too lazy to be running -current. ;-). I'll let you tell Bruce he's lazy. 8-) 8-). I think it has more to do with POLA. > #ifdef __GCC__ > #pragma weak __error = ___error > static ___inline int *___error( void) { extern int errno; return &errno; } > #endif /* __GCC__*/ > > #define errno (* __error) > -------------------------------------------------------------------------- > > This would give each library a weak accessor that would be overridden > by the real accessor if the thing got linked to the right libc, right? Provided that weak symbols are handled properly when there is more than one weak symbol for the same name, yes. Remember that libpthread needs to have a non-weak __error symbol that can override the one in libc *and the errno.h header in you example) for kernel threads. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message