From: Carlos O'Donell <carlos@redhat.com>
To: Paul Eggert <eggert@cs.ucla.edu>, Joseph Myers <joseph@codesourcery.com>
Cc: Zack Weinberg <zackw@panix.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH 06/13] Installed header hygiene (BZ#20366): Macros used in #if without checking whether they are defined.
Date: Wed, 21 Sep 2016 19:09:00 -0000 [thread overview]
Message-ID: <3caea07a-d3ff-c33b-3fcb-0e81f0629728@redhat.com> (raw)
In-Reply-To: <462e9837-ef26-3790-7e90-97fbf853a805@cs.ucla.edu>
On 09/21/2016 02:46 PM, Paul Eggert wrote:
> On 09/21/2016 11:40 AM, Carlos O'Donell wrote:
>> Isn't that just a normal coordination issue with gnulib?
>
> I think so. Gnulib could readily change to follow whatever _LIBC
> practice is thought to be convenient for libc itself.
Thanks for confirming.
Best practice for macro APIs, where possible, is to always define the
macro e.g. set it to 0 or 1, and then enable the use of -Wundef to catch
any mistakes.
This isn't always possible with defines coming from other projects or
the compiler itself (where behaviour is standardized), but in our own
GNU projects I think we could adopt the less error prone usages.
I'm not suggesting Zack tackle this now.
--
Cheers,
Carlos.
next prev parent reply other threads:[~2016-09-21 19:09 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 1:17 [PATCH 00/13] Installed-header hygiene (BZ#20366) Zack Weinberg
2016-08-30 1:17 ` [PATCH 01/13] Installed-header hygiene (BZ#20366): obsolete BSD u_* types Zack Weinberg
2016-08-30 1:17 ` [PATCH 02/13] Installed-header hygiene (BZ#20366): manual fixups after mechanical change Zack Weinberg
2016-08-30 1:17 ` [PATCH 03/13] Installed-header hygiene (BZ#20366): missing inclusions A Zack Weinberg
2016-08-30 1:16 ` [PATCH 04/13] Installed-header hygiene (BZ#20366): missing inclusions B Zack Weinberg
2016-08-30 1:16 ` [PATCH 05/13] Installed header hygiene (BZ#20366): BYTE_ORDER macros Zack Weinberg
2016-08-30 1:17 ` [PATCH 06/13] Installed header hygiene (BZ#20366): Macros used in #if without checking whether they are defined Zack Weinberg
2016-08-30 1:17 ` [PATCH 07/13] Installed-header hygiene (BZ#20366): stack_t Zack Weinberg
2016-08-30 1:36 ` [PATCH 08/13] Installed-header hygiene (BZ#20366): time.h types Zack Weinberg
2016-08-30 1:17 ` [PATCH 09/13] Installed-header hygiene (BZ#20366): struct ifreq Zack Weinberg
2016-08-30 1:17 ` [PATCH 10/13] Installed-header hygiene (BZ#20366): struct ether_addr Zack Weinberg
2016-08-30 1:36 ` [PATCH 11/13] Installed-header hygiene (BZ#20366): struct osockaddr Zack Weinberg
2016-08-30 1:17 ` [PATCH 12/13] Installed-header hygiene (BZ#20366): Miscellaneous Zack Weinberg
2016-08-30 1:17 ` [PATCH 13/13] Installed header hygiene (BZ#20366): Test of installed headers Zack Weinberg
2016-08-30 1:28 ` Joseph Myers
2016-08-30 3:12 ` Zack Weinberg
2016-09-22 12:20 ` Zack Weinberg
2016-09-21 20:12 ` Carlos O'Donell
2016-09-21 19:53 ` [PATCH 12/13] Installed-header hygiene (BZ#20366): Miscellaneous Carlos O'Donell
2016-09-21 19:27 ` [PATCH 11/13] Installed-header hygiene (BZ#20366): struct osockaddr Carlos O'Donell
2016-09-21 19:26 ` [PATCH 10/13] Installed-header hygiene (BZ#20366): struct ether_addr Carlos O'Donell
2016-09-21 19:51 ` Carlos O'Donell
2016-09-21 20:33 ` Zack Weinberg
2016-09-21 19:15 ` [PATCH 09/13] Installed-header hygiene (BZ#20366): struct ifreq Carlos O'Donell
2016-08-30 17:10 ` [PATCH 08/13] Installed-header hygiene (BZ#20366): time.h types Joseph Myers
2016-09-21 19:04 ` Carlos O'Donell
2016-09-21 19:12 ` Zack Weinberg
2016-09-21 19:50 ` Carlos O'Donell
2016-09-21 19:50 ` [PATCH 07/13] Installed-header hygiene (BZ#20366): stack_t Carlos O'Donell
2016-09-21 18:02 ` [PATCH 06/13] Installed header hygiene (BZ#20366): Macros used in #if without checking whether they are defined Carlos O'Donell
2016-09-21 18:05 ` Joseph Myers
2016-09-21 18:41 ` Carlos O'Donell
2016-09-21 18:47 ` Paul Eggert
2016-09-21 19:09 ` Carlos O'Donell [this message]
2016-09-21 19:59 ` Joseph Myers
2016-09-21 20:24 ` Carlos O'Donell
2016-09-21 18:09 ` Zack Weinberg
2016-09-21 17:56 ` [PATCH 05/13] Installed header hygiene (BZ#20366): BYTE_ORDER macros Carlos O'Donell
2016-09-21 17:52 ` [PATCH 04/13] Installed-header hygiene (BZ#20366): missing inclusions B Carlos O'Donell
2016-08-30 1:23 ` [PATCH 03/13] Installed-header hygiene (BZ#20366): missing inclusions A Joseph Myers
2016-08-30 3:12 ` Zack Weinberg
2016-09-21 17:54 ` Carlos O'Donell
2016-09-21 17:52 ` Carlos O'Donell
2016-09-21 17:58 ` Joseph Myers
2016-09-21 18:22 ` Zack Weinberg
2016-09-21 18:43 ` Carlos O'Donell
2016-09-21 17:43 ` [PATCH 02/13] Installed-header hygiene (BZ#20366): manual fixups after mechanical change Carlos O'Donell
2016-08-30 1:22 ` [PATCH 01/13] Installed-header hygiene (BZ#20366): obsolete BSD u_* types Joseph Myers
2016-08-30 3:12 ` Zack Weinberg
2016-08-30 17:10 ` Joseph Myers
2016-09-21 17:41 ` Carlos O'Donell
2016-08-30 1:26 ` [PATCH 00/13] Installed-header hygiene (BZ#20366) Joseph Myers
2016-08-30 3:12 ` Zack Weinberg
2016-08-30 7:51 ` Andreas Schwab
2016-09-06 17:10 ` Zack Weinberg
2016-09-21 14:22 ` Zack Weinberg
2016-09-21 17:34 ` Carlos O'Donell
2016-09-21 17:52 ` Carlos O'Donell
2016-09-21 18:05 ` Zack Weinberg
2016-09-21 18:08 ` Joseph Myers
2016-09-21 18:10 ` Zack Weinberg
2016-09-21 18:46 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3caea07a-d3ff-c33b-3fcb-0e81f0629728@redhat.com \
--to=carlos@redhat.com \
--cc=eggert@cs.ucla.edu \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=zackw@panix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).