From a843053e2e596da640d2afc73eeaa1f9273fff38 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 31 May 2004 18:53:18 +0000 Subject: [PATCH] Suppress compile warnings on machines where the INT64CONST() decoration is actually needed. Per Oliver Elphick. --- src/backend/utils/adt/date.c | 4 ++-- src/backend/utils/adt/datetime.c | 6 +++--- src/interfaces/ecpg/pgtypeslib/dt_common.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index ab6e41d2e4..91ef127a94 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.97 2004/05/21 05:08:01 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.98 2004/05/31 18:53:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1461,7 +1461,7 @@ interval_time(PG_FUNCTION_ARGS) } else if (result < 0) { - days = (-result + INT64CONST(86400000000 - 1)) / INT64CONST(86400000000); + days = (-result + INT64CONST(86400000000) - 1) / INT64CONST(86400000000); result += days * INT64CONST(86400000000); } #else diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 8402d8cccb..4284e4c5e3 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.128 2004/05/21 05:08:01 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.129 2004/05/31 18:53:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1209,7 +1209,7 @@ DecodeDateTime(char **field, int *ftype, int nf, tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP - dt2time((time * 86400000000), + dt2time((time * INT64CONST(86400000000)), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), @@ -1960,7 +1960,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf, tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP - dt2time((time * 86400000000), + dt2time((time * INT64CONST(86400000000)), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c index eaa0538f55..f906b449b0 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c @@ -2255,7 +2255,7 @@ DecodeDateTime(char **field, int *ftype, int nf, tmask |= DTK_TIME_M; #ifdef HAVE_INT64_TIMESTAMP - dt2time((time * 86400000000), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); + dt2time((time * INT64CONST(86400000000)), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #else dt2time((time * 86400), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec); #endif -- 2.40.0