From owner-freebsd-hackers Thu Jun 29 09:51:49 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id JAA00636 for hackers-outgoing; Thu, 29 Jun 1995 09:51:49 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id JAA00630 for ; Thu, 29 Jun 1995 09:51:45 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP (5.67b+/DEC-Ultrix/4.3) id AA16469; Thu, 29 Jun 1995 18:51:41 +0200 Received: by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id SAA22393; Thu, 29 Jun 1995 18:51:40 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.6.11/8.6.9) id RAA06569; Thu, 29 Jun 1995 17:39:41 +0200 From: J Wunsch Message-Id: <199506291539.RAA06569@uriah.heep.sax.de> Subject: Re: gcc 2.7.0 and FreeBSD 2.0.5 To: witr@rwwa.com (Robert Withrow) Date: Thu, 29 Jun 1995 17:39:39 +0200 (MET DST) Cc: freebsd-hackers@freebsd.org (FreeBSD hackers) In-Reply-To: <199506291444.KAA03119@spooky.rwwa.com> from "Robert Withrow" at Jun 29, 95 10:44:26 am Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 881 Sender: hackers-owner@freebsd.org Precedence: bulk As Robert Withrow wrote: > > Out of curiosity, how do you get correct (i.e. posix) behavior > from shared libraries without weak symbols? > > If I define my own ``read()'' routine, other posix routines > which ``act as if they internally call read'' won't call > *my* read() will they? (In FBSD2.0.5 I mean). If they do, > this is broken (non-posix) behavior. Do you mean something like this? j@uriah 441% cat > foo.c #include int read(int fd, char *buf, unsigned long l) { printf("read() called\n"); return 0; } int main(void) { char b[100]; printf("main()\n"); fgets(b, 100, stdin); return 0; } ^D j@uriah 442% cc -o foo foo.c j@uriah 443% ./foo main() read() called -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)