From 25b10fc1e6f3e53dab2cdb701dc444f4fe5f4e1e Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Fri, 1 Aug 2003 18:19:03 +0000 Subject: [PATCH] Missed two places to replace union member. --- src/interfaces/ecpg/pgtypeslib/common.c | 4 ++-- src/interfaces/ecpg/pgtypeslib/timestamp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interfaces/ecpg/pgtypeslib/common.c b/src/interfaces/ecpg/pgtypeslib/common.c index d1202eb59a..f9762c8ae3 100644 --- a/src/interfaces/ecpg/pgtypeslib/common.c +++ b/src/interfaces/ecpg/pgtypeslib/common.c @@ -80,10 +80,10 @@ pgtypes_fmt_replace(union un_fmt_comb replace_val, int replace_type, char** outp i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS, "%0.0g", replace_val.double_val); break; -#ifdef HAVE_INT6 +#ifdef HAVE_INT64 case PGTYPES_TYPE_INT64: i = snprintf(t, PGTYPES_FMT_NUM_MAX_DIGITS, - INT64_FORMAT, replace_val.replace_int64); + INT64_FORMAT, replace_val.int64_val); break; #endif case PGTYPES_TYPE_UINT: diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c index a0b4626bf0..4d1a13d9e5 100644 --- a/src/interfaces/ecpg/pgtypeslib/timestamp.c +++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c @@ -546,7 +546,7 @@ dttofmtasc_replace (Timestamp *ts, Date dDate, int dow, struct tm* tm, break; case 's': #ifdef HAVE_INT64_TIMESTAMP - replace_val.replace_int64 = ((*ts - SetEpochTimestamp()) / 1000000e0); + replace_val.int64_val = ((*ts - SetEpochTimestamp()) / 1000000e0); replace_type = PGTYPES_TYPE_INT64; #else replace_val.double_val = *ts - SetEpochTimestamp(); -- 2.40.0