[PATCH] Prevent multiple definition of MIN/MAX

Paul E. Murphy murphyp@linux.vnet.ibm.com
Tue Nov 17 18:27:00 GMT 2015



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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Shuffle-includes-in-ldbl-128ibm-mpn2ldl.c.patch
Type: text/x-patch
Size: 1555 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151117/f7242fb4/attachment.bin>


More information about the Libc-alpha mailing list