From owner-freebsd-hackers@freebsd.org Wed Dec 27 04:05:42 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12061EA06CA for ; Wed, 27 Dec 2017 04:05:42 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com [IPv6:2a00:1450:4010:c07::233]) (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 793D776219; Wed, 27 Dec 2017 04:05:41 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x233.google.com with SMTP id w196so23203497lff.5; Tue, 26 Dec 2017 20:05:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xfHCS5vRCOYX2qWbcWD/+Cc9eXbTe6qj2A5xAgF+9bk=; b=MkS40a0oA66gVsdK5LMQmgZNxIKmy9mHOEMFN41yIStxwPbqut8pMEsrODhiwZYRHT Jefxk6b9659TPcyT3/ZpTdiRnrveSk7A28tI+M3YZlFRGXcKUeQbFIH8qTkZXQ0Iw2KQ mGkQ/Y6cuJrXa9rQA/JgTrcenRx2Z6qle3qB8GDejx7RvruuUHvNma8UVhNOFqmWd9q+ KeYESsLukWWzMCo9dQmbG9GuQOn/M33eX2Dtbv3gFYctDwDXOwKEH3hQVWREVi40Z4QY tDe4zuVzJiv4gpxOGa4gvJPYPS34AHem4qX/YBymdTypWoQoA6ONsqkfsXguiNcMJ/6Q 7bEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=xfHCS5vRCOYX2qWbcWD/+Cc9eXbTe6qj2A5xAgF+9bk=; b=Ki+RhugxYKOG1Ot6SPUA28CRHKlvc3BFVj5RgIIokHX9YRJ6hwLTv8h+iXyMaCxUN1 T3rVRYq7JbKC2fsDWxpXFqx5EWF5CmWHaWfRvFr89QTGFCo5Yjdq1pM9RZMx9/WJ4ld0 oQM0t9ZLS1l3pwLgqNY8lrNg5r1JJ2dQjYJC5eI9ELjmFmWhWc1bLToydwlBll977Nbm YFcmS/PJ3PaAUVMzaONvZ9oSVa4kSzEoLRrW1XPPocSe71K74Chagx5oH6jK7i2FU3d5 2ag+yEpRM9kHRsP24uIR8klDYUezxgQ+DsS9NLXtt0fR7FJWd0ZTj9QRaj6OqFJch0d/ ecZA== X-Gm-Message-State: AKGB3mJqfwC714jKNr8Ijv4ejsrUeukObwoPbR2jNkA2xGSIGe2fLFvz gsQsjj6iNQCj/JtivpyEzjLsOBjeiN9V0/Nur2s= X-Google-Smtp-Source: ACJfBosSl4/6T2/TZvNaZmcvrpX+FUZrTYpLG7c/cEsggnwkm0VYjbaReHdz8WqGE/cEkB2i9+xebfx4F45aET0WAUk= X-Received: by 10.46.88.77 with SMTP id x13mr15471801ljd.80.1514347538766; Tue, 26 Dec 2017 20:05:38 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.76.19 with HTTP; Tue, 26 Dec 2017 20:05:38 -0800 (PST) In-Reply-To: References: From: Alan Somers Date: Tue, 26 Dec 2017 21:05:38 -0700 X-Google-Sender-Auth: D_1a_c86V3QrjsDWucJboy31tFs Message-ID: Subject: Re: Parsing a comment in stdlib.h To: Eitan Adler Cc: FreeBSD Hackers , Benno Rice , gwollman@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2017 04:05:42 -0000 I would say that your proposed change makes it less clear. For one thing, it's not clear whether those three bullet points are meant to be ANDed or ORed. For another, I'm not sure why you removed the part about "long long". Finally, s/its/it's/. Frankly, I think the comment can just be shortened to "C99 functions". GCC and Clang both support "long long". Are there any external compilers that don't? On Tue, Dec 26, 2017 at 8:18 PM, Eitan Adler wrote: > Hi all, > > I'm trying to understand a visibility comment in stdlib.h. Is the > following change technically correct? > Can it be made more clear? > > Index: include/stdlib.h > =================================================================== > --- include/stdlib.h (revision 327228) > +++ include/stdlib.h (working copy) > @@ -120,8 +120,10 @@ int wctomb(char *, wchar_t); > size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); > > /* > - * Functions added in C99 which we make conditionally available in the > - * BSD^C89 namespace if the compiler supports `long long'. > + * Functions added in C99 which we make available if > + * - its C99 > + * - BSD visible and not C89 > + * - its C++ > * The #if test is more complicated than it ought to be because > * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' > * is not supported in the compilation environment (which therefore means > > > -- > Eitan Adler > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >