This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/7] Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warning
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>, <libc-alpha at sourceware dot org>
- Date: Thu, 20 Mar 2014 10:52:28 -0700 (PDT)
- Subject: Re: [PATCH 1/7] Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warning
- Authentication-results: sourceware.org; auth=none
- References: <1395059004-20960-1-git-send-email-will dot newton at linaro dot org> <20140317182818 dot 5EAD474457 at topped-with-meat dot com> <20140317183732 dot C5A2374458 at topped-with-meat dot com> <532749D3 dot 3080008 at linux dot vnet dot ibm dot com> <20140317195304 dot 3AA2174461 at topped-with-meat dot com> <53283BD1 dot 1020000 at linux dot vnet dot ibm dot com> <20140318224608 dot 0B68B7447C at topped-with-meat dot com> <Pine dot LNX dot 4 dot 64 dot 1403182321420 dot 27957 at digraph dot polyomino dot org dot uk>
> On Tue, 18 Mar 2014, Roland McGrath wrote:
>
> > I haven't examined that particular set of macros, so I don't have something
> > specific in mind. It's just the general rule that we should organize our
> > macros (including wholesale reshuffling of what we have today, if need be)
> > so that every use under our control if typo-proof.
>
> Typo-proofing also provides another case for replacing the __need_*
> scheme, as I suggested in
> <https://sourceware.org/ml/libc-alpha/2012-08/msg00510.html> and
> <https://sourceware.org/ml/libc-alpha/2012-11/msg00045.html>, so that we
> do
>
> #include <bits/time_t.h>
>
> instead of
>
> #define __need_time_t
> #include <time.h>
>
> (the former being typo-proof, the latter not).
I didn't recall you suggesting that, but it's been on my list for some
time. (I think we should use a convention other than plain bits/, but
that's just trivia.)