From 9feeef92fb9b73371e3f299ba444f86b4ef7e26f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 22 Jul 2013 21:02:56 -0400 Subject: [PATCH] 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 dfe6f9e687..d7a1935516 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 6b89e4a67e..112538ed50 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 3770bd2925..a560af3c38 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) -- 2.40.0