]> granicus.if.org Git - postgresql/commitdiff
ecpg: Move function prototype into header file
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 23 Jul 2013 01:02:56 +0000 (21:02 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 23 Jul 2013 01:02:56 +0000 (21:02 -0400)
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
src/interfaces/ecpg/pgtypeslib/dt_common.c
src/interfaces/ecpg/pgtypeslib/timestamp.c

index dfe6f9e687276fdacc6d70f68b2fc7d5c0eb4224..d7a1935516bba8e366d0d1bf50868d08debf0263 100644 (file)
@@ -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[];
index 6b89e4a67eb6b9611cba62c13e6d583ac178bbe2..112538ed5066d1f33e7c4954e1d4ff2ac1eaac7a 100644 (file)
@@ -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,
index 3770bd2925b2a8b6481787ade3254f7e33ffb8af..a560af3c386cf08e341ce0326fe0f7763d83f8a2 100644 (file)
@@ -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)