From owner-freebsd-current Fri Feb 16 8:39:23 2001 Delivered-To: freebsd-current@freebsd.org Received: from wint.itfs.nsk.su (wint.itfs.nsk.su [212.20.32.43]) by hub.freebsd.org (Postfix) with ESMTP id 5E2CA37B65D for ; Fri, 16 Feb 2001 08:39:19 -0800 (PST) Received: (from nnd@localhost) by wint.itfs.nsk.su (8.11.2/8.11.1) id f1GGdE780810; Fri, 16 Feb 2001 22:39:14 +0600 (NOVT) (envelope-from nnd) Date: Fri, 16 Feb 2001 22:39:14 +0600 (NOVT) Message-Id: <200102161639.f1GGdE780810@wint.itfs.nsk.su> From: nnd@mail.nsk.ru To: current@freebsd.org Subject: Re: HEADS UP: -current world broken since Feb 10 In-Reply-To: User-Agent: tin/1.5.8-20010204 ("Paradise Regained") (UNIX) (FreeBSD/5.0-CURRENT (i386)) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Eischen wrote: >Try this uncompiled and untested patch to lib/libc/stdio/findfp.c. >If it doesn't compile, you should be able to tweak it. After small tweak this patch comiles and works - i.e. I can now make /usr/ports/devel/gettext. N.Dudorov Index: findfp.c =================================================================== RCS file: /opt/b/CVS/src/lib/libc/stdio/findfp.c,v retrieving revision 1.14 diff -u -r1.14 findfp.c --- findfp.c 2001/02/16 06:11:22 1.14 +++ findfp.c 2001/02/16 15:25:20 @@ -66,6 +66,7 @@ /* _ub _extra */ /* the usual - (stdin + stdout + stderr) */ static FILE usual[FOPEN_MAX - 3]; +static struct __sFILEX usual_extra[FOPEN_MAX - 3]; static struct glue uglue = { NULL, FOPEN_MAX - 3, usual }; static struct __sFILEX __sFX[3]; @@ -215,7 +216,17 @@ void __sinit() { - /* Make sure we clean up on exit. */ - __cleanup = _cleanup; /* conservative */ - __sdidinit = 1; + int i; + + THREAD_LOCK(); + if (__sdidinit == 0) { + /* Set _extra for the usual suspects. */ + for (i = 0; i < FOPEN_MAX - 3; i++) + usual[i]._extra = &usual_extra[i]; + + /* Make sure we clean up on exit. */ + __cleanup = _cleanup; /* conservative */ + __sdidinit = 1; + } + THREAD_UNLOCK(); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message