Skip to content

Commit 9feeef9

Browse files
committed
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.
1 parent 2f1fa75 commit 9feeef9

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/interfaces/ecpg/pgtypeslib/dt.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ void GetCurrentDateTime(struct tm *);
348348
int date2j(int, int, int);
349349
void TrimTrailingZeros(char *);
350350
void dt2time(double, int *, int *, int *, fsec_t *);
351+
int PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d,
352+
int *year, int *month, int *day,
353+
int *hour, int *minute, int *second,
354+
int *tz);
351355

352356
extern char *pgtypes_date_weekdays_short[];
353357
extern char *pgtypes_date_months[];

src/interfaces/ecpg/pgtypeslib/dt_common.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2595,9 +2595,6 @@ pgtypes_defmt_scan(union un_fmt_comb * scan_val, int scan_type, char **pstr, cha
25952595
}
25962596

25972597
/* XXX range checking */
2598-
int PGTYPEStimestamp_defmt_scan(char **, char *, timestamp *, int *, int *, int *,
2599-
int *, int *, int *, int *);
2600-
26012598
int
26022599
PGTYPEStimestamp_defmt_scan(char **str, char *fmt, timestamp * d,
26032600
int *year, int *month, int *day,

src/interfaces/ecpg/pgtypeslib/timestamp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
#include "pgtypes_date.h"
1919

2020

21-
int PGTYPEStimestamp_defmt_scan(char **, const char *, timestamp *, int *, int *, int *,
22-
int *, int *, int *, int *);
23-
2421
#ifdef HAVE_INT64_TIMESTAMP
2522
static int64
2623
time2t(const int hour, const int min, const int sec, const fsec_t fsec)

0 commit comments

Comments
 (0)