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

Commit7d32551

Browse files
author
Michael Meskes
committed
Fixed some bugs in Informix compat functions.
1 parent764f72d commit7d32551

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,12 @@ rtoday (Date *d)
443443
int
444444
rjulmdy (Dated,shortmdy[3])
445445
{
446-
PGTYPESdate_julmdy(d, (int*)mdy);
446+
intmdy_int[3];
447+
448+
PGTYPESdate_julmdy(d,mdy_int);
449+
mdy[0]= (short)mdy_int[0];
450+
mdy[1]= (short)mdy_int[1];
451+
mdy[2]= (short)mdy_int[2];
447452
return0;
448453
}
449454

@@ -482,7 +487,12 @@ rfmtdate (Date d, char *fmt, char *str)
482487
int
483488
rmdyjul (shortmdy[3],Date*d)
484489
{
485-
PGTYPESdate_mdyjul((int*)mdy,d);
490+
intmdy_int[3];
491+
492+
mdy_int[0]=mdy[0];
493+
mdy_int[1]=mdy[1];
494+
mdy_int[2]=mdy[2];
495+
PGTYPESdate_mdyjul(mdy_int,d);
486496
return0;
487497
}
488498

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.9 2003/07/01 12:40:51 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.10 2003/07/17 07:54:29 meskes Exp $ */
22

33
#definePOSTGRES_ECPG_INTERNAL
44
#include"postgres_fe.h"
@@ -308,7 +308,7 @@ ECPGset_informix_null(enum ECPGttype type, void *ptr)
308308

309309
staticbool_check(unsignedchar*ptr,intlength)
310310
{
311-
for (;ptr[length]==0xff&&length >=0;length--);
311+
for (;ptr[--length]==0xff&&length >=0;length--);
312312
if (length<0)return true;
313313
return false;
314314
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ PGTYPESdate_julmdy(Date jd, int* mdy)
101101
inty,m,d;
102102

103103
j2date((int)jd,&y,&m,&d);
104-
mdy[0]=(shortint)m;
105-
mdy[1]=(shortint)d;
106-
mdy[2]=(shortint)y;
104+
mdy[0]=m;
105+
mdy[1]=d;
106+
mdy[2]=y;
107107
}
108108

109109
void

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp