Hi Andres, On Fri, Apr 3, 2015 at 12:45 AM, Andres Freund <and...@anarazel.de> wrote:
> Define integer limits independently from the system definitions. > > In 83ff1618 we defined integer limits iff they're not provided by the > system. That turns out not to be the greatest idea because there's > different ways some datatypes can be represented. E.g. on OSX PG's 64bit > datatype will be a 'long int', but OSX unconditionally uses 'long > long'. That disparity then can lead to warnings, e.g. around printf > formats. > This commit has added PG_INT16_MIN/MAX, however we still rely on SHRT_MIN and SHRT_MAX in some code paths. On all the platforms I looked at (OpenBSD, FreeBSD, MinGW, MSVC, OSX, Linux, Solaris) SHRT_MIN and SHRT_MAX definitions are always the same. Still, shouldn't we replace SHRT_* by their equivalent PG_INT16_* to be completely independent? I am just wondering if you considered that. Regards, -- Michael