Re: [HACKERS] Missing SIZE_MAX

2017-09-01 Thread Tom Lane
I wrote: > Robert Haas writes: >> It might be worth the effort to clean all of this up, just because the >> next person who gets bitten by it may not be as smart as you are. > Yeah. I was just thinking that maybe the appropriate investment of > effort is to make [U]INT64CONST smarter, so that it

Re: [HACKERS] Missing SIZE_MAX

2017-09-01 Thread Tom Lane
Robert Haas writes: > On Fri, Sep 1, 2017 at 12:22 PM, Tom Lane wrote: >> [ warning: more than you really wanted to know ahead ] > It might be worth the effort to clean all of this up, just because the > next person who gets bitten by it may not be as smart as you are. Yeah. I was just thinkin

Re: [HACKERS] Missing SIZE_MAX

2017-09-01 Thread Robert Haas
On Fri, Sep 1, 2017 at 12:22 PM, Tom Lane wrote: > [ warning: more than you really wanted to know ahead ] It might be worth the effort to clean all of this up, just because the next person who gets bitten by it may not be as smart as you are. -- Robert Haas EnterpriseDB: http://www.enterprisedb

Re: [HACKERS] Missing SIZE_MAX

2017-09-01 Thread Tom Lane
[ warning: more than you really wanted to know ahead ] Alvaro Herrera writes: > Tom Lane wrote: >> We have a workaround for that symbol in timezone/private.h: >> #ifndef SIZE_MAX >> #define SIZE_MAX ((size_t) -1) >> #endif >> and a bit of grepping finds other places that are using the (size_t) -1

Re: [HACKERS] Missing SIZE_MAX

2017-09-01 Thread Alvaro Herrera
Tom Lane wrote: > We have a workaround for that symbol in timezone/private.h: > > #ifndef SIZE_MAX > #define SIZE_MAX ((size_t) -1) > #endif > > and a bit of grepping finds other places that are using the (size_t) -1 > trick explicitly. So what I'm tempted to do is move the above stanza > into

Re: [HACKERS] Missing SIZE_MAX

2017-09-01 Thread Robert Haas
On Fri, Sep 1, 2017 at 11:09 AM, Tom Lane wrote: > Commit 2e70d6b5e added a dependency on SIZE_MAX to libpq/fe_exec.c. > According to C99 and recent POSIX, that symbol should be provided > by , but SUS v2 (POSIX 2001) doesn't require > to exist at all ... and I now notice that gaur/pademelon does

[HACKERS] Missing SIZE_MAX

2017-09-01 Thread Tom Lane
Commit 2e70d6b5e added a dependency on SIZE_MAX to libpq/fe_exec.c. According to C99 and recent POSIX, that symbol should be provided by , but SUS v2 (POSIX 2001) doesn't require to exist at all ... and I now notice that gaur/pademelon doesn't have it, and unsurprisingly is failing to compile fe_e