From owner-freebsd-stable Sat Jun 2 9:29:53 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mgate10.so-net.ne.jp (mgate10.so-net.ne.jp [210.139.254.157]) by hub.freebsd.org (Postfix) with ESMTP id 3D2FA37B423; Sat, 2 Jun 2001 09:29:49 -0700 (PDT) (envelope-from ipfw@ya3.so-net.ne.jp) Received: from mail.ya3.so-net.ne.jp (mspool11.so-net.ne.jp [210.139.248.11]) by mgate10.so-net.ne.jp (8.9.3/3.7W01050922) with ESMTP id BAA24267; Sun, 3 Jun 2001 01:29:48 +0900 (JST) Received: from localhost (p78a307.kngwnt01.ap.so-net.ne.jp [61.120.163.7]) by mail.ya3.so-net.ne.jp with ESMTP id f52GTk121626; Sun, 3 Jun 2001 01:29:46 +0900 (JST) In-Reply-To: <20010602091643.C73968@dragon.nuxi.com> References: <20010602085237.A73968@dragon.nuxi.com> <20010603010518C.koya@pluto.math.yokohama-cu.ac.jp> <20010602091643.C73968@dragon.nuxi.com> Subject: Re: time_t definition is worng From: Yoshihiro Koya To: obrien@FreeBSD.ORG Cc: Yoshihiro.Koya@math.yokohama-cu.ac.jp, dillon@earth.backplane.com, david@catwhisker.org, stable@FreeBSD.ORG X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010603012933K.koya@pluto.math.yokohama-cu.ac.jp> Date: Sun, 03 Jun 2001 01:29:33 +0900 X-Dispatcher: imput version 990905(IM130) Lines: 33 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, From: "David O'Brien" Subject: Re: time_t definition is worng Date: Sat, 2 Jun 2001 09:16:43 -0700 Message-ID: <20010602091643.C73968@dragon.nuxi.com> > On Sun, Jun 03, 2001 at 01:05:18AM +0900, Yoshihiro Koya wrote: > > > Since on IA-32 int == long, the only issue is what ones uses in printf() > > > and scanf(). I have not seen anyone having a problem with this yet. > > > > Please see http://www.freebsd.org/cgi/query-pr.cgi?pr=27757 > > and the response to this PR. > > This PR seems to be a signed vs. unsigned issue. Maybe it is too early > in the morning, so please explain why int(32-bit) vs. long(32-bit) [on > x86] is an issue for this PR. Yes. You are right. The PR itself isn't one related to int vs. long issue. But the respose submitted by someone is closely related to this issue. if (snprintf(buf, sizeof(buf), - "%s:%s:%d:%d:%s:%ld:%ld:%s:%s:%s", + "%s:%s:%u:%u:%s:%ld:%ld:%s:%s:%s", pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_class, pw->pw_change, pw->pw_expire, pw->pw_gecos, pw->pw_dir, pw->pw_shell) >= sizeof(buf)) { The pw->pw_chage and pw->pw_passwd are of time_t. But, in the above, %ld is used for them. koya To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message