From owner-freebsd-questions@FreeBSD.ORG Fri Apr 28 08:22:12 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 3846416A401 for ; Fri, 28 Apr 2006 08:22:12 +0000 (UTC) (envelope-from jon7808@gmail.com) Received: from pproxy.gmail.com (pproxy.gmail.com [64.233.166.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA83B43D45 for ; Fri, 28 Apr 2006 08:22:11 +0000 (GMT) (envelope-from jon7808@gmail.com) Received: by pproxy.gmail.com with SMTP id t32so2152994pyc for ; Fri, 28 Apr 2006 01:22:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=tQ96puZ4nFdjnwjHzSdg9rEyiIXyqdNXoZCB/XK04EjDrQecd1DpUYjPUasNP0VZS4jAxfBUzp6EzDQLVlfZZOjsRyVKPnOGSgvmmmdbPQxGXyfWiyYoN12oVwcvjcy+LagHlc9bWfJjx3fJotWILdN9cFz0NzAVOqmOLNoDQqo= Received: by 10.35.105.18 with SMTP id h18mr1859960pym; Fri, 28 Apr 2006 01:22:10 -0700 (PDT) Received: by 10.35.57.5 with HTTP; Fri, 28 Apr 2006 01:22:10 -0700 (PDT) Message-ID: <40b94f630604280122v72c432dfx2f3c2e11a220a82e@mail.gmail.com> Date: Fri, 28 Apr 2006 16:22:10 +0800 From: "jiangyong jon7808" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3124_27311234.1146212530733" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: gcc problem, I can't get the 'ctime(&(statbuf.st_atime)' value in line20. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 08:22:12 -0000 ------=_Part_3124_27311234.1146212530733 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 1 #include 2 #include 3 char *filename =3D "/etc/passwd" ; 4 5 int main() 6 { 7 struct stat statbuf; 8 9 if(stat(filename,&statbuf)=3D=3D-1) 10 { 11 printf("Get stat on %s Error:%s\n", filename,strerror(errno)); 12 return(-1); 13 } 14 15 printf("Filename: %s\n", filename); 16 printf("Size: %ld\n", statbuf.st_size); 17 printf("Access Date: %s", ctime(&(statbuf.st_atime))); 18 19 printf("%s size: bytes\taccessed at %s", filename,ctime(&statbuf.st_atime)); 20 printf("%s size:%ld bytes\taccesed at %s", filename, statbuf.st_size,ctime(&(statbuf.st_atime))); 21 printf("\n**********************The end!*************************\n") ; 22 } OS :FreeBSD 6.1-RC #36 ------=_Part_3124_27311234.1146212530733--