From owner-freebsd-hackers Fri Sep 12 09:37:26 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA15851 for hackers-outgoing; Fri, 12 Sep 1997 09:37:26 -0700 (PDT) Received: from ns2.harborcom.net (root@ns2.harborcom.net [206.158.4.4]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA15840 for ; Fri, 12 Sep 1997 09:37:22 -0700 (PDT) Received: from localhost (bradley@localhost) by ns2.harborcom.net (8.8.7/8.8.5) with SMTP id MAA08180; Fri, 12 Sep 1997 12:37:16 -0400 (EDT) Date: Fri, 12 Sep 1997 12:37:16 -0400 (EDT) From: Bradley Dunn X-Sender: bradley@ns2.harborcom.net To: "Ron G. Minnich" cc: hackers@FreeBSD.ORG Subject: Re: amusing problem with varargs In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 12 Sep 1997, Ron G. Minnich wrote: > will it fail on other freebsd's, esp. 3.x? > > The problem is in the following assertion (from stdarg.h) > #define va_arg(ap, type) \ > ((type *)(ap += sizeof(type) < sizeof(int) ? \ > (abort(), 0) : sizeof(type)))[-1] > > It fails because mode_t is 16 bits. This is fixed in 2.2-STABLE and 3.0-CURRENT. See http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/include/stdarg.h pbd -- "Seems she thought of me as some mystic, fatalistic, mystical guru Me, I haven't got a clue." -- Tears for Fears, "Cold"