Re: [RFC] Fix div/mul crash and more undefined behavior - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [RFC] Fix div/mul crash and more undefined behavior
Date
Msg-id 20121119171736.GB13889@awork2.anarazel.de
Whole thread Raw
In response to Re: [RFC] Fix div/mul crash and more undefined behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2012-11-19 11:04:31 -0500, Tom Lane wrote:
> Xi Wang <xi.wang@gmail.com> writes:
> > Since INTn_MIN and INTn_MAX are standard macros from the C library,
> > can we assume that every C compiler should provide them in stdint.h?
>
> Not every C compiler provides stdint.h, unfortunately --- otherwise
> I'd not be so resistant to depending on this.

We already have hardcoded values for INT64_MIN in numutils.c's
pg_lltoa(). Given that I think we could just bite the apple and provide
our own values if the platform doesn't provide them.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Materialized views WIP patch
Next
From: Jeff Davis
Date:
Subject: Re: Enabling Checksums