Re: Use of feature test macros

2024-11-08 Thread David Holland
On Sat, Nov 02, 2024 at 10:36:10PM +0100, Roland Illig wrote: > In the system headers, we use this pattern a lot: > > #if (_POSIX_C_SOURCE - 0 >= 200809L) || defined(_NETBSD_SOURCE) > > Are the parentheses around the first condition really necessary? If so, > for which cases? > > Is the "-

Re: Use of feature test macros

2024-11-03 Thread Valery Ushakov
On Sun, Nov 03, 2024 at 02:02:59 +0100, Roland Illig wrote: > Am 03.11.2024 um 00:52 schrieb Robert Elz: > > Date:Sat, 2 Nov 2024 22:36:10 +0100 > > From:Roland Illig > > > > | Is the "- 0" in the first expression really necessary? If so, for which > > | cases? > > > >

Re: Use of feature test macros

2024-11-02 Thread Roland Illig
Am 03.11.2024 um 00:52 schrieb Robert Elz: > Date:Sat, 2 Nov 2024 22:36:10 +0100 > From:Roland Illig > > | Is the "- 0" in the first expression really necessary? If so, for which > | cases? > > When _POSIX_C_SOURCE is undefined (or defined to nothing). > That is the sta

Re: Use of feature test macros

2024-11-02 Thread Robert Elz
Date:Sat, 2 Nov 2024 19:57:04 -0400 (EDT) From:Mouse Message-ID: <202411022357.taa06...@stone.rodents-montreal.org> | The case where _POSIX_C_SOURCE is not defined at all. (Whether that | case is worth bothering with, that's arguable. But I think that's | pro

Re: Use of feature test macros

2024-11-02 Thread Mouse
> In the system headers, we use this pattern a lot: >> #if (_POSIX_C_SOURCE - 0 >= 200809L) || defined(_NETBSD_SOURCE) > Are the parentheses around the first condition really necessary? If > so, for which cases? Probably not...I *think*. > Is the "- 0" in the first expression really necessary?

Re: Use of feature test macros

2024-11-02 Thread Robert Elz
Date:Sat, 2 Nov 2024 22:36:10 +0100 From:Roland Illig Message-ID: <852461a5-c852-40d0-a810-d377306b8...@gmx.de> | In the system headers, we use this pattern a lot: | > #if (_POSIX_C_SOURCE - 0 >= 200809L) || defined(_NETBSD_SOURCE) | | Are the parentheses arou

Use of feature test macros

2024-11-02 Thread Roland Illig
In the system headers, we use this pattern a lot: > #if (_POSIX_C_SOURCE - 0 >= 200809L) || defined(_NETBSD_SOURCE) Are the parentheses around the first condition really necessary? If so, for which cases? Is the "- 0" in the first expression really necessary? If so, for which cases? If they aren