This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 27/27] Fix PTRDIFF_MIN/PTRDIFF_MIN and PTRDIFF_MIN for ILP32.
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: <libc-alpha at sourceware dot org>, <linux-kernel at vger dot kernel dot org>, <arnd at arndb dot de>, <catalin dot marinas at arm dot com>, <marcus dot shawcroft at arm dot com>, <philb at gnu dot org>, <davem at davemloft dot net>, <szabolcs dot nagy at arm dot com>, <maxim dot kuvyrkov at linaro dot org>, <pinskia at gmail dot com>, Andrew Pinski <apinski at cavium dot com>
- Date: Tue, 21 Jun 2016 10:32:42 +0000
- Subject: Re: [PATCH 27/27] Fix PTRDIFF_MIN/PTRDIFF_MIN and PTRDIFF_MIN for ILP32.
- Authentication-results: sourceware.org; auth=none
- References: <1466485631-3532-1-git-send-email-ynorov at caviumnetworks dot com> <1466485631-3532-29-git-send-email-ynorov at caviumnetworks dot com>
On Tue, 21 Jun 2016, Yury Norov wrote:
> +# ifdef __WORDSIZE32_PTRDIFF_LONG
> +# define PTRDIFF_MIN (-2147483647L-1)
> +# define PTRDIFF_MAX (2147483647L)
> +# else
> +# define PTRDIFF_MIN (-2147483647-1)
> +# define PTRDIFF_MAX (2147483647)
We now use typo-proof conventions, preferring #if to #ifdef. That is,
make other bits/wordsize.h files define the macro to 0, so you can use #if
here.
--
Joseph S. Myers
joseph@codesourcery.com