Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2015 00:16:53 -0500
From:      Brandon Allbery <allbery.b@gmail.com>
To:        kpneal@pobox.com
Cc:        Erich Dollansky <erichsfreebsdlist@alogt.com>, freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: top, fixed buffer length in utils.c
Message-ID:  <CAKFCL4VX4DWxtVV_6SdG2ERiVwA=V%2BaXgaKvEg69z76R=f4Xag@mail.gmail.com>
In-Reply-To: <20150213035002.GA68549@neutralgood.org>
References:  <20150201175159.7fa88d16@B85M-HD3-0.alogt.com> <20150203003307.GG27103@funkthat.com> <20150210231440.GB471@rancor.immure.com> <20150212091323.245485ba@B85M-HD3-0.alogt.com> <20150212043321.GD840@rancor.immure.com> <20150212052058.GB77578@neutralgood.org> <20150212180231.737ea2ba@B85M-HD3-0.alogt.com> <20150213035002.GA68549@neutralgood.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 12, 2015 at 10:50 PM, <kpneal@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@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKFCL4VX4DWxtVV_6SdG2ERiVwA=V%2BaXgaKvEg69z76R=f4Xag>