Hello,
From: "David O'Brien" <[EMAIL PROTECTED]>
Subject: Re: time_t definition is worng
Date: Sat, 2 Jun 2001 09:16:43 -0700
Message-ID: <[EMAIL PROTECTED]>
> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message