Skip to content

Commit fc73264

Browse files
committed
I don't care whether it's informix-compatible or not: #defining a word
like 'date' in a public header file is a damn fool idea.
1 parent b8f8896 commit fc73264

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/interfaces/ecpg/pgtypeslib/timestamp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ tm2timestamp(struct tm * tm, fsec_t fsec, int *tzp, timestamp *result)
6868
dDate = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1);
6969
time = time2t(tm->tm_hour, tm->tm_min, tm->tm_sec, fsec);
7070
#ifdef HAVE_INT64_TIMESTAMP
71-
*result = (date * INT64CONST(86400000000)) + time;
71+
*result = (dDate * INT64CONST(86400000000)) + time;
7272
/* check for major overflow */
73-
if ((*result - time) / INT64CONST(86400000000) != date)
73+
if ((*result - time) / INT64CONST(86400000000) != dDate)
7474
return -1;
7575
/* check for just-barely overflow (okay except time-of-day wraps) */
76-
if ((*result < 0) ? (date >= 0) : (date < 0))
76+
if ((*result < 0) ? (dDate >= 0) : (dDate < 0))
7777
return -1;
7878
#else
7979
*result = ((dDate * 86400) + time);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy