From owner-freebsd-hackers@freebsd.org Wed May 24 05:56:04 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 9DB80D79E4A for ; Wed, 24 May 2017 05:56:04 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A08916B8 for ; Wed, 24 May 2017 05:56:03 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from [88.198.220.132] (helo=sslproxy03.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1dDPH6-0007LD-Sl for freebsd-hackers@freebsd.org; Wed, 24 May 2017 07:56:00 +0200 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy03.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dDPH6-0000Qj-10 for freebsd-hackers@freebsd.org; Wed, 24 May 2017 07:56:00 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 15F0D2A0929 for ; Wed, 24 May 2017 07:56:42 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vrTu4OzuHPrK for ; Wed, 24 May 2017 07:56:39 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id CC47B2A092A for ; Wed, 24 May 2017 07:56:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rOruI1905HNH for ; Wed, 24 May 2017 07:56:39 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id A5BDB2A0929 for ; Wed, 24 May 2017 07:56:39 +0200 (CEST) Subject: Re: Why is _POSIX_SOURCE used instead of __BSD_VISIBLE in ? From: Sebastian Huber To: FreeBSD References: <742294fc-99db-3f9c-17a6-9aee7f42b066@embedded-brains.de> Message-ID: <2517757f-0c8c-c500-a6ce-aec2f08e2aeb@embedded-brains.de> Date: Wed, 24 May 2017 07:55:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <742294fc-99db-3f9c-17a6-9aee7f42b066@embedded-brains.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.99.2/23412/Wed May 24 02:55:55 2017) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 05:56:04 -0000 On 23/05/17 09:33, Sebastian Huber wrote: > Hello, > > the Termios header , , etc. use sometimes=20 > _POSIX_SOURCE directly to determine if a thing should be exposed to=20 > the user, e.g. > > #ifndef _POSIX_SOURCE > #define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */ > #define TABDLY 0x00000004 /* tab delay mask */ > #define TAB0 0x00000000 /* no tab delay and=20 > expansion */ > #define TAB3 0x00000004 /* expand tabs to spaces *= / > #define ONOEOT 0x00000008 /* discard EOT's (^D) on=20 > output) */ > #define OCRNL 0x00000010 /* map CR to NL on output */ > #define ONOCR 0x00000020 /* no CR output at column 0 */ > #define ONLRET 0x00000040 /* NL performs CR function */ > #endif /*_POSIX_SOURCE */ > > This circumvents the feature mechanisms of . Why is=20 > __BSD_VISIBLE not used for this? > This was already changed in one spot: https://github.com/freebsd/freebsd/commit/e63fa4cfabc535a5f9ec7ea2b383692= 931c13465 There are not many places left using _POSIX_SOURCE directly. To me this=20 looks like someone forgot to update the Termios headers to use the=20 visibility defines. --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG= .