Re: Small patch: fix warnings during compilation on FreeBSD - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Small patch: fix warnings during compilation on FreeBSD
Date
Msg-id 20160315152804.GA284530@alvherre.pgsql
Whole thread Raw
In response to Re: Small patch: fix warnings during compilation on FreeBSD  (Aleksander Alekseev <a.alekseev@postgrespro.ru>)
List pgsql-hackers
Aleksander Alekseev wrote:

> Please note that these changes:
> 
> ```
> -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
> +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 <<
> 31) << 31))
> ```
> 
> ... were generated but `autoreconf -iv`. I was not sure what to do
> about them. Eventually I decided to keep them. Still these changes could
> be safely discarded.

I have noticed these while messing with configure.in too.  These are
generated by an autoconf as patched by Debian; see
http://bugs.debian.org/742780
This is said to fix undefined behavior when off_t is 32 bits.

They are not present in stock GNU autoconf 2.69 nor are in autoconf's
git repo.  I think we should continue to use the output of stock,
unpatched autoconf.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Background Processes and reporting
Next
From: Corey Huinker
Date:
Subject: Soliciting Feedback on Improving Server-Side Programming Documentation