Today's cvs doesn't compile. I think it is due to
cvs diff -r1.7 -r1.8 src/interfaces/ecpg/include/datetime.h
I have dtime_t defined in my sys/types.h. The old version of datetime.h used
#define dtime_t timestamp, the new one uses a typedef. Is there actually
a reason to keep dtime_t, or would just performing the #define, i.e.,
the following patch be sufficient? It allows me to compile and install
postgres.. (I don't use ecpg, so I really can't say..)

Cheers,

Patrick
Index: src/interfaces/ecpg/compatlib/informix.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/compatlib/informix.c,v
retrieving revision 1.27
diff -u -r1.27 informix.c
--- src/interfaces/ecpg/compatlib/informix.c    22 Sep 2003 13:19:39 -0000      1.27
+++ src/interfaces/ecpg/compatlib/informix.c    29 Sep 2003 17:15:34 -0000
@@ -886,7 +886,7 @@
 }
 
 int
-dtcvfmtasc(char *inbuf, char *fmtstr, dtime_t * dtvalue)
+dtcvfmtasc(char *inbuf, char *fmtstr, timestamp * dtvalue)
 {
        return PGTYPEStimestamp_defmt_asc(inbuf, fmtstr, dtvalue);
 }
Index: src/interfaces/ecpg/include/datetime.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/include/datetime.h,v
retrieving revision 1.8
diff -u -r1.8 datetime.h
--- src/interfaces/ecpg/include/datetime.h      20 Sep 2003 09:10:09 -0000      1.8
+++ src/interfaces/ecpg/include/datetime.h      29 Sep 2003 17:15:34 -0000
@@ -4,15 +4,12 @@
 #include <pgtypes_timestamp.h>
 #include <pgtypes_interval.h>
 
-typedef timestamp dtime_t;
-typedef interval intrvl_t;
-
-extern void dtcurrent(dtime_t *);
-extern int     dtcvasc(char *, dtime_t *);
-extern int     dtsub(dtime_t *, dtime_t *, intrvl_t *);
-extern int     dttoasc(dtime_t *, char *);
-extern int     dttofmtasc(dtime_t *, char *, int, char *);
-extern int     intoasc(intrvl_t *, char *);
-extern int     dtcvfmtasc(char *, char *, dtime_t *);
+extern void dtcurrent(timestamp *);
+extern int     dtcvasc(char *, timestamp *);
+extern int     dtsub(timestamp *, timestamp *, interval *);
+extern int     dttoasc(timestamp *, char *);
+extern int     dttofmtasc(timestamp *, char *, int, char *);
+extern int     intoasc(interval *, char *);
+extern int     dtcvfmtasc(char *, char *, timestamp *);
 
 #endif /* ndef _ECPG_DATETIME_H */
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to