postgres.git / summary / log / commit / refs
commit 9feeef92fb9b73371e3f299ba444f86b4ef7e26f
Author: Peter Eisentraut <peter_e@gmx.net>
Date: Tue Jul 23 01:02:56 2013 +0000
First released in: 9.4.0
ecpg: Move function prototype into header file
PGTYPEStimestamp_defmt_scan() was declared twice inside different .c
files, with slightly different prototypes. Move it into a header file
and correct the prototype.
src/interfaces/ecpg/pgtypeslib/dt.h | 4 ++++
src/interfaces/ecpg/pgtypeslib/dt_common.c | 3 ---
src/interfaces/ecpg/pgtypeslib/timestamp.c | 3 ---
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/interfaces/ecpg/pgtypeslib/dt.h b/src/interfaces/ecpg/pgtypeslib/dt.h
index dfe6f9e6872..d7a1935516b 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt.h
+++ b/src/interfaces/ecpg/pgtypeslib/dt.h
@@ -348,6 +348,10 @@ void GetCurrentDateTime(struct tm *);
int date2j(int, int, int);
void TrimTrailingZeros(char *);
void dt2time(double, int *, int *, int *, fsec_t *);
+int PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d,
+ int *year, int *month, int *day,
+ int *hour, int *minute, int *second,
+ int *tz);
extern char *pgtypes_date_weekdays_short[];
extern char *pgtypes_date_months[];
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
index 6b89e4a67eb..112538ed506 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -2595,9 +2595,6 @@ pgtypes_defmt_scan(union un_fmt_comb * scan_val, int scan_type, char **pstr, cha
}
/* XXX range checking */
-int PGTYPEStimestamp_defmt_scan(char **, char *, timestamp *, int *, int *, int *,
- int *, int *, int *, int *);
-
int
PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d,
int *year, int *month, int *day,
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 3770bd2925b..a560af3c386 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -18,9 +18,6 @@
#include "pgtypes_date.h"
-int PGTYPEStimestamp_defmt_scan(char **, const char *, timestamp *, int *, int *, int *,
- int *, int *, int *, int *);
-
#ifdef HAVE_INT64_TIMESTAMP
static int64
time2t(const int hour, const int min, const int sec, const fsec_t fsec)
[parent: 2f1fa75a0c93]