pgsql: Fix unportable coding in DetermineSleepTime(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix unportable coding in DetermineSleepTime().
Date
Msg-id E1WEnQy-0000oR-A3@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix unportable coding in DetermineSleepTime().

We should not assume that struct timeval.tv_sec is a long, because
it ain't necessarily.  (POSIX says that it's a time_t, which might
well be 64 bits now or in the future; or for that matter might be
32 bits on machines with 64-bit longs.)  Per buildfarm member panther.

Back-patch to 9.3 where the dubious coding was introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f0ee42d59b797603d645df8876ae3abf6d016f1e

Modified Files
--------------
src/backend/postmaster/postmaster.c |    4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Centralize getopt-related declarations in a new header file pg_g
Next
From: Tom Lane
Date:
Subject: pgsql: Fix unportable coding in DetermineSleepTime().