From owner-freebsd-questions Tue Oct 6 19:16:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA03152 for freebsd-questions-outgoing; Tue, 6 Oct 1998 19:16:45 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA03104 for ; Tue, 6 Oct 1998 19:16:29 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.1/8.9.1) id VAA03625; Tue, 6 Oct 1998 21:16:10 -0500 (CDT) Date: Tue, 6 Oct 1998 21:16:10 -0500 From: Dan Nelson To: Justin Murdock , questions@FreeBSD.ORG Subject: Re: Help! FreeBSD 2.2.7 error?; fstat/stat Message-ID: <19981006211610.A3506@emsphone.com> References: <199810061837.TAA24511@mascarpone.coventry.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.94.3i In-Reply-To: <199810061837.TAA24511@mascarpone.coventry.ac.uk>; from "Justin Murdock" on Tue Oct 6 19:37:00 GMT 1998 X-OS: FreeBSD 2.2.7-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Oct 06), Justin Murdock said: > Perhaps I'm missing something, but on my (reasonably) freshly installed 2.2.7 > (CD set) box > > printf("%s: %d, %d\n", argv[1], mysb.st_size, myfdsb.st_size); > > produces a binary that does this: > > % ./a.out /usr/home/jlocal/a.out > /usr/home/jlocal/a.out: 8808, 0 > > My expectaton would be for both numbers to be 8808 Problem is, st_size is a 64-bit integer. You need to print them with "%qd". -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message