]> granicus.if.org Git - postgresql/commitdiff
Suppress compile warnings on machines where the INT64CONST() decoration
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Jun 2004 17:17:49 +0000 (17:17 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Jun 2004 17:17:49 +0000 (17:17 +0000)
is actually needed.  Backport of Oliver Elphick's recent patch.

src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/interfaces/ecpg/pgtypeslib/dt_common.c

index a0d00e73dc2af0a68487ba1b2da90ca54cc4844e..f1ef9412c860ed7ed931fb64d2bf5fd53f2b0365 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.93 2003/09/26 15:27:36 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.93.2.1 2004/06/13 17:17:48 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1111,7 +1111,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
index 52b212f602f34c54da4875e57c8c7da9148244b0..aa369cc59b2259fb27c94d75df15743c311e5585 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.118.2.2 2003/12/17 21:45:51 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.118.2.3 2004/06/13 17:17:48 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1208,7 +1208,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),
@@ -1948,7 +1948,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),
index 04aaa70ccfcfbc46be72bbc192923cf64784a527..d11b32739164bfc7d525be2cd0c5fd8a10bf7198 100644 (file)
@@ -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