From owner-freebsd-arch@FreeBSD.ORG Thu May 15 21:25:11 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF5DD37B401; Thu, 15 May 2003 21:25:11 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13C7143FA3; Thu, 15 May 2003 21:25:11 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h4G4P8Is046946; Thu, 15 May 2003 23:25:08 -0500 (CDT) (envelope-from dan) Date: Thu, 15 May 2003 23:25:08 -0500 From: Dan Nelson To: Don Sullivan Message-ID: <20030516042508.GC23782@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.1-BETA X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: arch@freebsd.org cc: imp@freebsd.org Subject: Re: Pardon the ignorance X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 04:25:12 -0000 In the last episode (May 15), Don Sullivan said: > > In the change to stdio.h in FreeBSD 4.8, you say: > "std{in,out,err} are no longer compile time constants." > > Please pardon my incredible ignorance, but what does that mean ? > Can you please point me to a reference ? > > FILE *def_thing = stdout; > > no longer works. > apparently, it shouldn't. why ? I think it was changed because the size of "struct file" aka FILE needed to change, and the only way to be sure that stdin/out/err got initialized to the right locations was to have libc do it instead of the program. Linux made this same change back in 6.0 ( see http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3137 ) -- Dan Nelson dnelson@allantgroup.com