Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit491dc12

Browse files
author
Michael Meskes
committed
- Argh, just another bug in adjust_informix.
- Added "extern C" flags for C++ compiler. Hopefully I got that one right.
1 parentb071a40 commit491dc12

File tree

7 files changed

+52
-3
lines changed

7 files changed

+52
-3
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,6 +1790,11 @@ Fri May 7 15:34:05 CEST 2004
17901790
- Added portability file to pgtypeslib.
17911791
- Fixed bug that reversed string length in typedefs.
17921792
- Added additional test case.
1793+
1794+
Mon May 10 15:38:58 CEST 2004
1795+
1796+
- Argh, just another bug in adjust_informix.
1797+
- Added "extern C" flags for C++ compiler.
17931798
- Set pgtypes library version to 1.2.
17941799
- Set ecpg version to 3.2.0.
17951800
- Set compat library version to 1.2.

‎src/interfaces/ecpg/include/ecpg_informix.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file contains stuff needed to be as compatible to Informix as possible.
33
*
4-
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.14 2003/12/18 18:55:09 petere Exp $
4+
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.15 2004/05/10 13:46:06 meskes Exp $
55
*/
66
#ifndef_ECPG_INFORMIX_H
77
#define_ECPG_INFORMIX_H
@@ -29,6 +29,11 @@
2929
#defineECPG_INFORMIX_BAD_DATE-1218
3030
#defineECPG_INFORMIX_EXTRA_CHARS-1264
3131

32+
#ifdef__cplusplus
33+
extern"C"
34+
{
35+
#endif
36+
3237
externintrdatestr(date,char*);
3338
externvoidrtoday(date*);
3439
externintrjulmdy(date,short*);
@@ -78,4 +83,8 @@ extern intdttofmtasc(timestamp *, char *, int, char *);
7883
externintintoasc(interval*,char*);
7984
externintdtcvfmtasc(char*,char*,timestamp*);
8085

86+
#ifdef__cplusplus
87+
}
88+
#endif
89+
8190
#endif/* ndef _ECPG_INFORMIX_H */

‎src/interfaces/ecpg/include/pgtypes_date.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#include<pgtypes_timestamp.h>
55

66
typedeflongdate;
7+
#ifdef__cplusplus
8+
extern"C"
9+
{
10+
#endif
711

812
externdatePGTYPESdate_from_asc(char*,char**);
913
externchar*PGTYPESdate_to_asc(date);
@@ -15,4 +19,8 @@ extern void PGTYPESdate_today(date *);
1519
externintPGTYPESdate_defmt_asc(date*,char*,char*);
1620
externintPGTYPESdate_fmt_asc(date,char*,char*);
1721

22+
#ifdef__cplusplus
23+
}
24+
#endif
25+
1826
#endif/* PGTYPES_DATETIME */

‎src/interfaces/ecpg/include/pgtypes_interval.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@ typedef struct
1414
* alignment */
1515
}interval;
1616

17+
#ifdef__cplusplus
18+
extern"C"
19+
{
20+
#endif
21+
1722
externinterval*PGTYPESinterval_from_asc(char*,char**);
1823
externchar*PGTYPESinterval_to_asc(interval*);
1924
externintPGTYPESinterval_copy(interval*,interval*);
2025

26+
#ifdef__cplusplus
27+
}
28+
#endif
29+
2130
#endif/* PGTYPES_INTERVAL */

‎src/interfaces/ecpg/include/pgtypes_numeric.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ typedef struct
3737
NumericDigitdigits[DECSIZE];/* decimal digits */
3838
}decimal;
3939

40+
#ifdef__cplusplus
41+
extern"C"
42+
{
43+
#endif
44+
4045
numeric*PGTYPESnumeric_new(void);
4146
voidPGTYPESnumeric_free(numeric*);
4247
numeric*PGTYPESnumeric_from_asc(char*,char**);
@@ -56,4 +61,8 @@ intPGTYPESnumeric_to_long(numeric *, long *);
5661
intPGTYPESnumeric_to_decimal(numeric*,decimal*);
5762
intPGTYPESnumeric_from_decimal(decimal*,numeric*);
5863

64+
#ifdef__cplusplus
65+
}
66+
#endif
67+
5968
#endif/* PGTYPES_NUMERIC */

‎src/interfaces/ecpg/include/pgtypes_timestamp.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@ typedef double timestamp;
1212
typedefdoubleTimestampTz;
1313
#endif
1414

15+
#ifdef__cplusplus
16+
extern"C"
17+
{
18+
#endif
19+
1520
externtimestampPGTYPEStimestamp_from_asc(char*,char**);
1621
externchar*PGTYPEStimestamp_to_asc(timestamp);
1722
externintPGTYPEStimestamp_sub(timestamp*,timestamp*,interval*);
1823
externintPGTYPEStimestamp_fmt_asc(timestamp*,char*,int,char*);
1924
externvoidPGTYPEStimestamp_current(timestamp*);
2025
externintPGTYPEStimestamp_defmt_asc(char*,char*,timestamp*);
2126

27+
#ifdef__cplusplus
28+
}
29+
#endif
30+
2231
#endif/* PGTYPES_TIMESTAMP */

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.281 2004/05/07 13:42:49 meskes Exp $*/
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.282 2004/05/10 13:46:06 meskes Exp $*/
22

33
/* Copyright comment*/
44
%{
@@ -209,7 +209,7 @@ adjust_informix(struct arguments *list)
209209
original_var = ptr->variable->name;
210210
sprintf(temp,"%d))", ecpg_informix_var);
211211

212-
if (atoi(ptr->variable->type->size) >1)
212+
if ((ptr->variable->type->type != ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) &&atoi(ptr->variable->type->size) >1)
213213
{
214214
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);
215215
sprintf(temp,"%d, (", ecpg_informix_var++);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp