Re: Centralize use of PG_INTXX_MIN/MAX for integer limits

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Centralize use of PG_INTXX_MIN/MAX for integer limits
Date: 2018-11-25 18:13:57
Message-ID: 10577.1543169637@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> On 24/11/2018 13:15, Michael Paquier wrote:
>> A couple of years ago, 62e2a8dc has introduced in c.h a set of limits
>> (to fix some portability issues from 83ff1618) to make the code more
>> system-independent. Those are for example PG_INT32_MIN, etc. The core
>> code now mixes the internal PG_ limits with the system ones. Would we
>> want to unify a bit the whole thing and replace all the SHRT_MIN/MAX,
>> LONG_MIN/MAX and such with the internal limit definitions?

> Since we now require C99, we could also just use the system-provided
> definitions in <stdint.h>.

We require a C99 *compiler*. That's a different thing from assuming
that the contents of /usr/include are C99-compliant.

Admittedly, the days of user-installed copies of gcc being used with
crufty vendor-supplied system headers might be over for most people.
But my animal gaur still has such a configuration, and it hasn't
got stdint.h at all, never mind any particular contents thereof.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-11-25 18:23:55 Re: FETCH FIRST clause PERCENT option
Previous Message Laurenz Albe 2018-11-25 18:13:50 Re: Updated backup APIs for non-exclusive backups