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

Commitf604b39

Browse files
author
Michael Meskes
committed
- Applied some bug fixing patches by Dave Cramer <dave@fastcrypt.com>.
- Added protecting defines to include files.
1 parentf72a93b commitf604b39

File tree

10 files changed

+42
-8
lines changed

10 files changed

+42
-8
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,6 +1639,12 @@ Thu Sep 18 14:54:47 CEST 2003
16391639
Fri Sep 19 08:33:39 CEST 2003
16401640

16411641
- Some code cleanup
1642+
1643+
Sat Sep 20 11:06:13 CEST 2003
1644+
1645+
- Applied some bug fixing patches by Dave Cramer <dave@fastcrypt.com>.
1646+
- Added protecting defines to include files.
1647+
- Renamed my own strndup() function because of a name clash.
16421648
- Set ecpg version to 3.0.0
16431649
- Set ecpg library to 4.0.0
16441650
- Set pgtypes library to 1.0.0

‎src/interfaces/ecpg/ecpglib/data.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.19 2003/09/19 14:06:21 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.20 2003/09/20 09:10:09 meskes Exp $ */
22

33
#definePOSTGRES_ECPG_INTERNAL
44
#include"postgres_fe.h"
@@ -393,10 +393,12 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
393393
/* did we get an error? */
394394
if (errno!=0)
395395
{
396+
ECPGlog("ECPGget_data line %d: RESULT: %s errno %d\n",lineno,pval ?pval :"",errno);
397+
396398
if (INFORMIX_MODE(compat))
397399
{
398400
/* Informix wants its own NULL value here instead of an error */
399-
ECPGset_informix_null(ECPGt_numeric,&nres);
401+
ECPGset_informix_null(ECPGt_numeric,nres);
400402
}
401403
else
402404
{
@@ -440,7 +442,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
440442
if (INFORMIX_MODE(compat))
441443
{
442444
/* Informix wants its own NULL value here instead of an error */
443-
ECPGset_informix_null(ECPGt_interval,&ires);
445+
ECPGset_informix_null(ECPGt_interval,ires);
444446
}
445447
else
446448
{

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef_ECPG_DATETIME_H
2+
#define_ECPG_DATETIME_H
3+
14
#include<pgtypes_timestamp.h>
25
#include<pgtypes_interval.h>
36

@@ -11,3 +14,5 @@ extern intdttoasc(dtime_t *, char *);
1114
externintdttofmtasc(dtime_t*,char*,int,char*);
1215
externintintoasc(intrvl_t*,char*);
1316
externintdtcvfmtasc(char*,char*,dtime_t*);
17+
18+
#endif/* ndef _ECPG_DATETIME_H */

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef_ECPG_DECIMAL_H
2+
#define_ECPG_DECIMAL_H
3+
14
#include<pgtypes_numeric.h>
25

36
typedefdecimaldec_t;
@@ -16,3 +19,5 @@ intdectoasc(dec_t *, char *, int, int);
1619
intdectodbl(dec_t*,double*);
1720
intdectoint(dec_t*,int*);
1821
intdectolong(dec_t*,long*);
22+
23+
#endif/* ndef _ECPG_DECIMAL_H */

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifndef_ECPG_INFORMIX_H
2+
#define_ECPG_INFORMIX_H
13
/*
24
* This file contains stuff needed to be as compatible to Informix as possible.
35
*/
@@ -32,3 +34,5 @@ extern void ldchar(char *, int, char *);
3234

3335
externvoidECPG_informix_set_var(int,void*,int);
3436
externvoid*ECPG_informix_get_var(int);
37+
38+
#endif/* ndef _ECPG_INFORMIX_H */

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef_ECPG_ERROR_H
2-
#define_ECPG_ERROR_H
1+
#ifndef_ECPG_ERRNO_H
2+
#define_ECPG_ERRNO_H
33

44
#include<errno.h>
55

@@ -74,4 +74,4 @@
7474
/* WARNING: BlankPortalAssignName: portal * already exists */
7575
#defineECPG_WARNING_PORTAL_EXISTS -605
7676

77-
#endif/* !_ECPG_ERROR_H */
77+
#endif/* !_ECPG_ERRNO_H */

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
#ifndef_ECPG_SQL3TYPES_H
2+
#define_ECPG_SQL3TYPES_H
3+
14
/* SQL3 dynamic type codes
25
*
36
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
47
*
5-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.7 2001/10/28 06:26:11 momjian Exp $
8+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.8 2003/09/20 09:10:09 meskes Exp $
69
*/
710

811
/* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */
@@ -41,3 +44,5 @@ enum
4144
SQL3_DDT_ILLEGAL/* not a datetime data type (not part of
4245
* standard) */
4346
};
47+
48+
#endif/* !_ECPG_SQL3TYPES_H */

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndefECPG_SQLTYPES_H
2+
#defineECPG_SQLTYPES_H
3+
14
#defineCCHARTYPEECPGt_char
25
#defineCSHORTTYPEECPGt_short
36
#defineCINTTYPEECPGt_int
@@ -23,3 +26,5 @@
2326
#defineCROWTYPE123
2427
#defineCLVCHARPTRTYPE124
2528
#defineCTYPEMAX25
29+
30+
#endif/* ndef ECPG_SQLTYPES_H */

‎src/interfaces/ecpg/pgtypeslib/numeric.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ set_var_from_str(char *str, char **ptr, numeric *dest)
146146
boolhave_dp= FALSE;
147147
inti=0;
148148

149+
errno=0;
149150
*ptr=str;
150151
while (*(*ptr))
151152
{
@@ -1386,6 +1387,7 @@ PGTYPESnumeric_copy(numeric *src, numeric *dst)
13861387
{
13871388
inti;
13881389

1390+
if (dst==NULL )return-1;
13891391
zero_var(dst);
13901392

13911393
dst->weight=src->weight;

‎src/interfaces/ecpg/pgtypeslib/timestamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ dttofmtasc_replace(timestamp *ts, date dDate, int dow, struct tm * tm,
573573
break;
574574
case'S':
575575
replace_val.uint_val=tm->tm_sec;
576-
replace_type=PGTYPES_TYPE_UINT;
576+
replace_type=PGTYPES_TYPE_UINT_2_LZ;
577577
break;
578578
case't':
579579
replace_val.char_val='\t';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp