From owner-freebsd-questions Tue Jan 28 10:42:39 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 275CE37B401 for ; Tue, 28 Jan 2003 10:42:38 -0800 (PST) Received: from petasus.ch.intel.com (petasus.ch.intel.com [143.182.124.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12CFE43F75 for ; Tue, 28 Jan 2003 10:42:37 -0800 (PST) (envelope-from jreynold@sedona.ch.intel.com) Received: from sedona.intel.com (sedona.ch.intel.com [143.182.202.83]) by petasus.ch.intel.com (8.11.6/8.11.6/d: solo.mc,v 1.49 2003/01/13 19:45:39 dmccart Exp $) with ESMTP id h0SIh9A09879; Tue, 28 Jan 2003 18:43:09 GMT Received: from chlx255.ch.intel.com (chlx255.ch.intel.com [143.182.223.69]) by sedona.intel.com (8.11.6/8.11.6/d:) with ESMTP id h0SIgZ725430; Tue, 28 Jan 2003 11:42:35 -0700 (MST) X-Envelope-From: jreynold@sedona.ch.intel.com Received: (from jreynold@localhost) by chlx255.ch.intel.com (8.11.6/8.9.1/d: client.m4,v 1.3 1998/09/29 16:36:11 sedayao Exp sedayao $) id h0SIgYZ27900; Tue, 28 Jan 2003 11:42:34 -0700 X-Authentication-Warning: chlx255.ch.intel.com: jreynold set sender to jreynold@sedona.ch.intel.com using -f From: John Reynolds~ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15926.53018.149389.480465@chlx255.ch.intel.com> Date: Tue, 28 Jan 2003 11:42:34 -0700 To: Conrad Sabatier Cc: questions@FreeBSD.ORG Subject: Re: is our printf(1) behavior correct w.r.t \0 escapes? In-Reply-To: References: <15926.50047.494451.473350@chlx255.ch.intel.com> X-Mailer: VM 7.07 under Emacs 20.7.1 Cc: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [ On Tuesday, January 28, Conrad Sabatier wrote: ] > > Works fine under -current: > > $ printf "foo\0bar\0" | od -c > 0000000 f o o \0 b a r \0 > > This also works under -current: > > $ printf "foo\0000" | od -c > 0000000 f o o \0 > 0000004 > > This also works under -current: > > $ printf "foo\0%d" 4 | od -c > 0000000 f o o \0 4 > 0000005 That's good that all of those work under -current. > It may very well be that printf (or libc?) has a bug under -stable. Are you > using any unusual optimization settings in /etc/make.conf, by the way? When > did you last upgrade? nope, nothing unusual. CFLAGS= -O -pipe The last time I updated and installed world/kernel was Dec 26th of 2002 (4.7-STABLE). Maybe if it's not a libc problem but just a printf(1) src problem we could get an MFC done ... Thanks for the info. At least we know that -current acts like other OS's. -Jr -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |John Reynolds Sr. Component Design Engineer - ICG/EID/Si Engineering | |Intel Corporation MS: CH6-302 Phone: 480-554-9092 pgr: 602-868-6512 | |jreynold@sedona.ch.intel.com http://www-aec.ch.intel.com/~jreynold/ | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message