- Added "extern C" flags for C++ compiler. Hopefully I got that one right.
- Added portability file to pgtypeslib.
- Fixed bug that reversed string length in typedefs.
- Added additional test case.
+
+Mon May 10 15:38:58 CEST 2004
+
+ - Argh, just another bug in adjust_informix.
+ - Added "extern C" flags for C++ compiler.
- Set pgtypes library version to 1.2.
- Set ecpg version to 3.2.0.
- Set compat library version to 1.2.
/*
* This file contains stuff needed to be as compatible to Informix as possible.
*
- * $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.14 2003/12/18 18:55:09 petere Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.15 2004/05/10 13:46:06 meskes Exp $
*/
#ifndef _ECPG_INFORMIX_H
#define _ECPG_INFORMIX_H
#define ECPG_INFORMIX_BAD_DATE -1218
#define ECPG_INFORMIX_EXTRA_CHARS -1264
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
extern int rdatestr(date, char *);
extern void rtoday(date *);
extern int rjulmdy(date, short *);
extern int intoasc(interval *, char *);
extern int dtcvfmtasc(char *, char *, timestamp *);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ndef _ECPG_INFORMIX_H */
#include <pgtypes_timestamp.h>
typedef long date;
+#ifdef __cplusplus
+extern "C"
+{
+#endif
extern date PGTYPESdate_from_asc(char *, char **);
extern char *PGTYPESdate_to_asc(date);
extern int PGTYPESdate_defmt_asc(date *, char *, char *);
extern int PGTYPESdate_fmt_asc(date, char *, char *);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PGTYPES_DATETIME */
* alignment */
} interval;
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
extern interval *PGTYPESinterval_from_asc(char *, char **);
extern char *PGTYPESinterval_to_asc(interval *);
extern int PGTYPESinterval_copy(interval *, interval *);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PGTYPES_INTERVAL */
NumericDigit digits[DECSIZE]; /* decimal digits */
} decimal;
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
numeric *PGTYPESnumeric_new(void);
void PGTYPESnumeric_free(numeric *);
numeric *PGTYPESnumeric_from_asc(char *, char **);
int PGTYPESnumeric_to_decimal(numeric *, decimal *);
int PGTYPESnumeric_from_decimal(decimal *, numeric *);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PGTYPES_NUMERIC */
typedef double TimestampTz;
#endif
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
extern char *PGTYPEStimestamp_to_asc(timestamp);
extern int PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
extern void PGTYPEStimestamp_current(timestamp *);
extern int PGTYPEStimestamp_defmt_asc(char *, char *, timestamp *);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PGTYPES_TIMESTAMP */
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.281 2004/05/07 13:42:49 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.282 2004/05/10 13:46:06 meskes Exp $ */
/* Copyright comment */
%{
original_var = ptr->variable->name;
sprintf(temp, "%d))", ecpg_informix_var);
- if (atoi(ptr->variable->type->size) > 1)
+ if ((ptr->variable->type->type != ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1)
{
ptr->variable = new_variable(cat_str(4, make_str("("), mm_strdup(ECPGtype_name(ptr->variable->type->u.element->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type, make_str("1")), ptr->variable->type->size), 0);
sprintf(temp, "%d, (", ecpg_informix_var++);