Re: [PATCH] cwm: use PRId64 for numberstring formatting

Theo Buehler <[email protected]>
Newsgroups gmane.os.openbsd.misc
Message-ID <[email protected]>
On Mon, Aug 10, 2026 at 10:49:46AM -0400, Okan Demirmen wrote:
> On Mon 2026.08.10 at 16:42 +0200, Theo Buehler wrote:
> > On Thu, Aug 06, 2026 at 09:47:33PM -0300, Ricardson wrote:
> > >  Updated patch attached, using the explicit long long cast as suggested.
> > 
> > This is ok, but I think it's cleaner to change the type given the
> > uses of LLONG_MIN/MAX, %lld:
> > 
> > diff --git a/app/cwm/parse.y b/app/cwm/parse.y
> > index 7290dbad8c..095d3a2e54 100644
> > --- a/app/cwm/parse.y
> > +++ b/app/cwm/parse.y
> > @@ -60,7 +60,7 @@ static struct conf	*conf;
> >  
> >  typedef struct {
> >  	union {
> > -		int64_t			 number;
> > +		long long		 number;
> >  		char			*string;
> >  	} v;
> >  	int lineno;
> 
> We have this idiom in lots of the parse.y - I'm not opposed (ok) to this
> change, though should others go this direction as well - for example, smtpd
> decided a different path a while ago and I'm not sure the state of portable
> uses of others.

Ah. I only looked at this file in isolation. Land whichever version you
prefer, both are ok with me.

I'd really rather not touch any parse.y if I don't really have to...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.