top, fixed buffer length in utils.c
Brandon Allbery
allbery.b at gmail.com
Fri Feb 13 05:16:55 UTC 2015
On Thu, Feb 12, 2015 at 10:50 PM, <kpneal at pobox.com> wrote:
> The case where int varies in size between platforms is distinct from the
> case where int varies in size between compilers on the same platform. If
> you reread what I wrote you'll see that I was addressing the latter case.
>
C++ at least defines platform ABIs starting with C++11. If ANSI C does not
now, I suspect it will --- interoperability issues have come up before (for
example, in the early x86 days there were differences between how C
compilers packed structs. And in the *very* early x86 days there were
differences between compilers in the exact details of (int) and (long) and
pointer types in different memory models) and the result is that these days
there is usually (but not always) a de facto ABI for a platform.
It's not quite as wild-west as you make it sound. People *do* occasionally
learn from past mistakes.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
More information about the freebsd-stable
mailing list