pgsql: Fix unportable coding in DetermineSleepTime().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix unportable coding in DetermineSleepTime().
Date: 2014-02-15 22:10:04
Message-ID: E1WEnQy-0000oT-Ba@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
------
REL9_3_STABLE

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

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

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-02-15 22:15:09 pgsql: Fix unportable coding in BackgroundWorkerStateChange().
Previous Message Tom Lane 2014-02-15 19:31:41 pgsql: Centralize getopt-related declarations in a new header file pg_g