This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Prevent multiple definition of MIN/MAX
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: "libc-alpha\ at sourceware dot org" <libc-alpha at sourceware dot org>, Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>, Joseph Myers <joseph at codesourcery dot com>
- Cc:
- Date: Thu, 19 Nov 2015 17:35:14 -0200
- Subject: Re: [PATCH] Prevent multiple definition of MIN/MAX
- Authentication-results: sourceware.org; auth=none
- References: <564B61EA dot 7030200 at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 10 dot 1511171723360 dot 27820 at digraph dot polyomino dot org dot uk> <564B719B dot 6000105 at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 10 dot 1511172220260 dot 2302 at digraph dot polyomino dot org dot uk>
Joseph Myers <joseph@codesourcery.com> writes:
> On Tue, 17 Nov 2015, Paul E. Murphy wrote:
>
>> On 11/17/2015 11:25 AM, Joseph Myers wrote:
>> > On Tue, 17 Nov 2015, Paul E. Murphy wrote:
>> >
>> >> Some recent changes caused a redefinition and error when these
>> >> are unconditionally defined. Such was caused by gmp-impl.h being
>> >> included prior.
>> >>
>> >> 2015-11-17 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
>> >>
>> >> * misc/sys/param.h (MIN): Guard against an outside definition.
>> >> (MAX): Likewise.
>> >
>> > This is an installed header, and such guards against the user defining a
>> > macro aren't usual in installed headers; the expectation is that if you
>> > include a system header, you don't define any of its macros first. See
>> > the options I suggested in
>> > <https://sourceware.org/ml/libc-alpha/2015-11/msg00289.html>.
>> >
>>
>> Point taken. Lets try the more conservative option B:
>> shuffling the includes. Second spin attached.
>
> OK.
Pushed as 79adcb58.
Thanks!
--
Tulio Magno