Date: Sun, 03 Jun 2001 01:29:33 +0900 From: Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp> To: obrien@FreeBSD.ORG Cc: Yoshihiro.Koya@math.yokohama-cu.ac.jp, dillon@earth.backplane.com, david@catwhisker.org, stable@FreeBSD.ORG Subject: Re: time_t definition is worng Message-ID: <20010603012933K.koya@pluto.math.yokohama-cu.ac.jp> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, From: "David O'Brien" <obrien@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010603012933K.koya>