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

Commit7b1885b

Browse files
author
Michael Meskes
committed
Fixed initialization bug and added postgres_fe.h to pgtypeslib.
1 parentb837c99 commit7b1885b

File tree

7 files changed

+18
-37
lines changed

7 files changed

+18
-37
lines changed

‎src/interfaces/ecpg/compatlib/informix.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,10 @@ int
287287
dectoasc(Decimal*np,char*cp,intlen,intright)
288288
{
289289
char*str;
290-
Numeric*nres;
290+
Numeric*nres=PGTYPESnumeric_new();
291+
292+
if (nres==NULL)
293+
return-1211;
291294

292295
if (PGTYPESnumeric_from_decimal(np,nres)!=0)
293296
return-1211;

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
#include<stdio.h>
2-
#include<stdlib.h>
3-
#include<string.h>
4-
#include<errno.h>
1+
#include"postgres_fe.h"
52

63
#include"extern.h"
74

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
#include<ctype.h>
2-
#include<errno.h>
1+
#include"postgres_fe.h"
2+
33
#include<time.h>
4+
#include<ctype.h>
45
#include<float.h>
5-
#include<stdlib.h>
6-
#include<stdio.h>
7-
#include<string.h>
86

97
#include"extern.h"
108
#include"dt.h"

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
#include<ctype.h>
2-
#include<errno.h>
1+
#include"postgres_fe.h"
2+
33
#include<time.h>
4-
#include<float.h>
5-
#include<stdlib.h>
6-
#include<stdio.h>
7-
#include<string.h>
4+
#include<ctype.h>
85
#include<math.h>
96

107
#include"extern.h"
@@ -1057,8 +1054,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
10571054
*/
10581055
StrNCpy(*tzn,tm->tm_zone,MAXTZLEN+1);
10591056
if (strlen(tm->tm_zone)>MAXTZLEN)
1060-
elog(WARNING,"Invalid timezone \'%s\'",
1061-
tm->tm_zone);
1057+
tm->tm_isdst=-1;
10621058
}
10631059
}
10641060
else
@@ -1077,8 +1073,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
10771073
*/
10781074
StrNCpy(*tzn,tzname[tm->tm_isdst],MAXTZLEN+1);
10791075
if (strlen(tzname[tm->tm_isdst])>MAXTZLEN)
1080-
elog(WARNING,"Invalid timezone \'%s\'",
1081-
tzname[tm->tm_isdst]);
1076+
tm->tm_isdst=-1;
10821077
}
10831078
}
10841079
else

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
#include<math.h>
1+
#include"postgres_fe.h"
22
#include<time.h>
3-
#include<string.h>
4-
#include<errno.h>
5-
#include<float.h>
6-
#include<stdio.h>
7-
#include<stdlib.h>
3+
#include<math.h>
84

95
#ifdef__FAST_MATH__
106
#error -ffast-math is known to break this code

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1+
#include"postgres_fe.h"
12
#include<ctype.h>
2-
#include<float.h>
3-
#include<limits.h>
4-
#include<math.h>
5-
#include<errno.h>
6-
#include<stdlib.h>
7-
#include<string.h>
8-
#include<stdio.h>
93

104
#include"extern.h"
115
#include"pgtypes_error.h"

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#include<math.h>
1+
#include"postgres_fe.h"
22
#include<time.h>
3-
#include<string.h>
4-
#include<errno.h>
53
#include<float.h>
6-
#include<stdio.h>
4+
#include<math.h>
75

86
#ifdef__FAST_MATH__
97
#error -ffast-math is known to break this code

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp