From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95879 invoked by alias); 26 May 2017 15:35:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 95332 invoked by uid 89); 26 May 2017 15:35:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Fri, 26 May 2017 15:35:00 -0000 From: Joseph Myers To: "Gabriel F. T. Gomes" CC: Subject: Re: [PATCH 2/6] float128: Add conversion from float128 to mpn In-Reply-To: <1495803396-14558-3-git-send-email-gftg@linux.vnet.ibm.com> Message-ID: References: <1495803396-14558-1-git-send-email-gftg@linux.vnet.ibm.com> <1495803396-14558-3-git-send-email-gftg@linux.vnet.ibm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-SW-Source: 2017-05/txt/msg00806.txt.bz2 On Fri, 26 May 2017, Gabriel F. T. Gomes wrote: > diff --git a/misc/sys/param.h b/misc/sys/param.h > index 9721613..02d6b1c 100644 > --- a/misc/sys/param.h > +++ b/misc/sys/param.h > @@ -99,8 +99,12 @@ > #define powerof2(x) ((((x) - 1) & (x)) == 0) > > /* Macros for min/max. */ > -#define MIN(a,b) (((a)<(b))?(a):(b)) > -#define MAX(a,b) (((a)>(b))?(a):(b)) > +#ifndef MIN > +# define MIN(a,b) (((a)<(b))?(a):(b)) > +#endif > +#ifndef MAX > +# define MAX(a,b) (((a)>(b))?(a):(b)) > +#endif This seems to have nothing to do with the rest of the patch. If you have something that has its own conflicting definitions of MIN and MAX that ends up including sys/param.h as well, and those definitions of MIN and MAX are semantically the same as those in sys/param.h, make it include sys/param.h directly instead of having its own definitions. If you have something that defines MIN and MAX in ways that are semantically different from sys/param.h, rename the conflicting macros. > +#define __FLOAT128_OVERRIDE > + > +#include "../ldbl-128/ldbl2mpn.c" Is there a reason you need a sepcial __FLOAT128_OVERRIDE macro, instead of the approach used by the other float128 files of including , which defines all relevant macros (e.g. defining __mpn_extract_long_double to __mpn_extract_float128, and with the __mpn_extract_long_double definition using _Float128 as the type name and letting math_ldbl.h redefine that back to long double as needed)? -- Joseph S. Myers joseph@codesourcery.com