From owner-freebsd-hackers@freebsd.org Wed Dec 27 03:19:23 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 B3050E9DE2C for ; Wed, 27 Dec 2017 03:19:23 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22b.google.com (mail-yb0-x22b.google.com [IPv6:2607:f8b0:4002:c09::22b]) (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 6ED8D744A8 for ; Wed, 27 Dec 2017 03:19:23 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22b.google.com with SMTP id q3so9434761ybg.9 for ; Tue, 26 Dec 2017 19:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to; bh=su4SL6mkfLil2oOqn9k5Ld9TyAHT0FHgJihwQ9n8gPk=; b=astq74AqQIioubR1v5Sj2GIadmi6dtPkAxHQk5EuCuITT77WXZQ3cqcOd+vvd8rPFF aDNQab7nucQb1mV5mRrieYPx7dJ/2zSrD31z1kCn4e7w1a9GV75hrRLiOTwNbPEfRKq5 8h/VdVgLmIbvJegZVzuW86l3ERZiuyguL+doQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=su4SL6mkfLil2oOqn9k5Ld9TyAHT0FHgJihwQ9n8gPk=; b=MUkSUZkx/iNS51/YI94+sDO7SPXjk4P7kk99tGW5hpwWdjrYTtykwWs8g00h/wOrFa bH52tLCBnTELyA7hHC8V60wDqmVMgU1CLtyn4GaCE5bWrYlGaVpxQWjBGBs8Idq8enxI NNAqN4u+9qpTZKj7677U3G/HMbWVN4Nawnobxa9ZXAkFv+SKxDbX5Q8QrTtiY1jupTmX 4GAx7G3ac+9jNsSooTuj3Q9OmAWXpykSKuCS4CZTLaa3Mj1QHv1ARUCfXq2gB92DGULE jdbHerk6vr+FJKqL8PQTiezJ3zprZz/RsAUE64hQCYyZLIdaR2LnXEq8xh76L09ew3F3 bx3g== X-Gm-Message-State: AKGB3mL7Xqgq4xtkSYhS/1PhFHyrtciyfnRbZt11bFcvaCPsqpXKJW6z 0iMoBeekFln/C0TCImPx0HXCt6h2iPfb6FQivgzzZ4J4 X-Google-Smtp-Source: ACJfBounr592b+kpc8mx+rXV5IBzTF8nrRheDrqqRzHiHwvsxlmgV7d72LLW0S+sw2ZXX3OaoemCK67prLNVfWaCMo8= X-Received: by 10.37.73.194 with SMTP id w185mr2235957yba.170.1514344762233; Tue, 26 Dec 2017 19:19:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.217.21 with HTTP; Tue, 26 Dec 2017 19:18:51 -0800 (PST) From: Eitan Adler Date: Tue, 26 Dec 2017 19:18:51 -0800 Message-ID: Subject: Parsing a comment in stdlib.h To: FreeBSD Hackers , benno@freebsd.org, gwollman@freebsd.org Content-Type: text/plain; charset="UTF-8" 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 03:19:23 -0000 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