Hi, Paul, On Mon, Feb 13, 2012 at 08:57:36AM -0800, Paul Eggert wrote: > On 02/13/2012 05:07 AM, Alan Mackenzie wrote: > My guess is that PTRDIFF_MAX is set incorrectly in your implementation. > Emacs's 'configure' script attempts to detect that, and replace it > with a correct PTRDIFF_MAX, but perhaps we need to improve 'configure' > so that it detects the problem with your implementation. > Can you send the compressed "gcc -E ..." output of the offending > compilation, and the contents of 'config.log' and 'src/config.h' and > (if present) 'lib/stdint.h'? That should help debug the situation. > Also, if you could determine which standard header is defining > ptrdiff_t and PTRDIFF_MAX, and what they're defined to, that might > help. I think i've tracked down PTRDIFF_MAX's value from looking at the after CPP version of xnmalloc: Together with my evaluation, it looks like this: (((1) ? ~ ((1) ? (- ((0l) + 1) << ((0) ? (0) - 1 : 0)) : (0l)) : ((((0l) + 1) << ((0) ? (0) - 1 - (1) : 0)) - 1) * 2 + 1)) ~ ((1) ? (- ((0l) + 1) << ((0) ? (0) - 1 : 0)) : (0l)) ~ (- ((0l) + 1) << ((0) ? (0) - 1 : 0)) ~ (- 2 << 0 ) ~ -2 1 Somehow I must have made a mistake, surely. PTRDIFF_MAX cannot be 1. This definition of PTRDIFF_MAX can only have come from emacs/lib/stdint.h, because it is here defined as a complex macro whereas the competing version in /usr/include/stdint.h just has 2147483647 and the 64-bit equivalent. I can't find the definition of ptrdiff_t. Anyhow, I've attached the "gcc -E ...", config.log, src/config.h and lib/stdint.h. -- Alan Mackenzie (Nuremberg, Germany).