From: Peter Eisentraut Date: Tue, 23 Jul 2013 01:02:56 +0000 (-0400) Subject: ecpg: Move function prototype into header file X-Git-Tag: REL9_4_BETA1~1287 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9feeef92fb9b73371e3f299ba444f86b4ef7e26f;p=postgresql 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. --- 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)