From owner-freebsd-stable@FreeBSD.ORG Fri Feb 13 05:16:55 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC3CE730 for ; Fri, 13 Feb 2015 05:16:55 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497DA403 for ; Fri, 13 Feb 2015 05:16:55 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id b13so14490398wgh.0 for ; Thu, 12 Feb 2015 21:16:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=K0dW394ivxnrLlLoYqLA1GZakPozE4jGYETPpKkRKes=; b=gWupIGLS0bdxhp3LH+T9JVWv4fAsppg/PN0LrGadZm02jClir3NKJEWoUcHnb8rDaX Azh3uEmT2dBVeWcl3r5r6qDIguMTvZEYByKHe+cHsz51eM7z/R7Eq/BbE3bJJPpo5TTR f9iHpnlSCdmK2g0MvaX1vXmlo7OLlQ62v/NQ4EsDJyF1R1oU8xafVFXErloMG1DsMmWj poAFP7SKK/YnSL4k9US1fj2SqLChVrfyVlRa5kNpXcXQu8czNNRqKkpDdjkexvE2sRRj Uf8k/tdmL1qFof5kvz12ETEviucirgVVfVkBieSpqQI6MEdq715CqVhMBX+ORq0H/SB8 eYCQ== MIME-Version: 1.0 X-Received: by 10.194.61.51 with SMTP id m19mr14611583wjr.39.1423804613491; Thu, 12 Feb 2015 21:16:53 -0800 (PST) Received: by 10.216.234.74 with HTTP; Thu, 12 Feb 2015 21:16:53 -0800 (PST) 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> Date: Fri, 13 Feb 2015 00:16:53 -0500 Message-ID: Subject: Re: top, fixed buffer length in utils.c From: Brandon Allbery To: kpneal@pobox.com Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Erich Dollansky , freebsd-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 05:16:55 -0000 On Thu, Feb 12, 2015 at 10:50 PM, 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