Re: That amd64 segfault again

Scott Kitterman <[email protected]>
Newsgroups gmane.mail.spam.spf.devel
Organization Kitterman Technical Services
Message-ID <[email protected]>
On Monday 26 March 2007 05:24, Thomas Jacob wrote:

> On Sat, 2007-03-24 at 10:38 +0100, Magnus Holmgren wrote:
> > I thought I should attach the patch I'm about to apply to libspf2 in
> > Debian. I started with the patch posted by Thomas Jacob to the Debian bug
> > report (http://bugs.debian.org/392793) and merged with the one from
> > Herbert Straub. Then I moved the changes that just cast the arguments to
> > SPF_Infof() and SPF_Debugf() into a separate patch and instead changed
> > the format strings. But how portable is the z flag to printf()? (From the
> > manpage: "A following integer conversion corresponds to a size_t or
> > ssize_t argument.").
>
> As long as you are only adding this patch
> to the Debian package, I shouldn't think that there
> is a portability problem, Debian uses the same
> glibc version on all its support platforms, or don't they?

There are packages that have specific versions for specific architectures, so 
I don't think this is a safe assumption.

> But generally I think that I would be more portable
> if you just used %d and a type cast, the numbers
> involved should always be less than MAX_INT, and explicit
> type casting like that shouldn't break code anywhere...

I think the more portable the better.  It would also make the patches more 
useful upstream once they (he) restarts maintaining libspf2.

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
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.