Re: [HACKERS] [COMMITTERS] pgsql: Fix bool/int type confusion

2017-09-22 Thread Tom Lane
Peter Eisentraut writes: > On 9/21/17 14:58, Tom Lane wrote: >> I've just been going through their git commit log to see what else has >> changed since tzcode2017b, and I note that there are half a dozen other >> portability-ish fixes. I think that some of them affect only code we >> don't use, b

Re: [HACKERS] [COMMITTERS] pgsql: Fix bool/int type confusion

2017-09-22 Thread Peter Eisentraut
On 9/21/17 14:58, Tom Lane wrote: > I've just been going through their git commit log to see what else has > changed since tzcode2017b, and I note that there are half a dozen other > portability-ish fixes. I think that some of them affect only code we > don't use, but I'm not sure that that's the

Re: [HACKERS] [COMMITTERS] pgsql: Fix bool/int type confusion

2017-09-21 Thread Tom Lane
Peter Eisentraut writes: > On 9/21/17 11:46, Tom Lane wrote: >> This also means that the portability problem is purely hypothetical; >> given valid tz reference data the code wouldn't ever try to increment >> "hit" to 2 anyway. It's even more hypothetical for us, because we don't >> use leap-seco

Re: [HACKERS] [COMMITTERS] pgsql: Fix bool/int type confusion

2017-09-21 Thread Peter Eisentraut
On 9/21/17 11:46, Tom Lane wrote: > So the code in their git repo still has the variable as bool, but > there's no ++ operator on it anymore. > > This also means that the portability problem is purely hypothetical; > given valid tz reference data the code wouldn't ever try to increment > "hit" to

Re: [HACKERS] [COMMITTERS] pgsql: Fix bool/int type confusion

2017-09-21 Thread Tom Lane
Peter Eisentraut writes: > Fix bool/int type confusion > Using ++ on a bool variable doesn't work well when stdbool.h is in use. > The original BSD code appears to use int here, so use that instead. I'm fairly unhappy with this approach to fixing this problem, because localtime.c is not Postgres-