mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Committed Informix compat bug fix to 7.4 as well.
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 1994, Regents of the University of California
|
# Copyright (c) 1994, Regents of the University of California
|
||||||
#
|
#
|
||||||
# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.11.2.2 2004/02/10 07:26:48 tgl Exp $
|
# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.11.2.3 2004/03/14 12:18:35 meskes Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
|
|||||||
|
|
||||||
NAME= ecpg_compat
|
NAME= ecpg_compat
|
||||||
SO_MAJOR_VERSION= 1
|
SO_MAJOR_VERSION= 1
|
||||||
SO_MINOR_VERSION= 1
|
SO_MINOR_VERSION= 2
|
||||||
|
|
||||||
override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS) $(THREAD_CPPFLAGS)
|
override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS) $(THREAD_CPPFLAGS)
|
||||||
SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \
|
SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \
|
||||||
|
@@ -60,8 +60,7 @@ deccall3(decimal * arg1, decimal * arg2, decimal * result, int (*ptr) (numeric *
|
|||||||
*nres;
|
*nres;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* set it to null in case it errors out later */
|
/* we must NOT set the result to NULL here because it may be the same variable as one of the arguments */
|
||||||
rsetnull(CDECIMALTYPE, (char *) result);
|
|
||||||
if (risnull(CDECIMALTYPE, (char *) arg1) || risnull(CDECIMALTYPE, (char *) arg2))
|
if (risnull(CDECIMALTYPE, (char *) arg1) || risnull(CDECIMALTYPE, (char *) arg2))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -100,7 +99,12 @@ deccall3(decimal * arg1, decimal * arg2, decimal * result, int (*ptr) (numeric *
|
|||||||
i = (*ptr) (a1, a2, nres);
|
i = (*ptr) (a1, a2, nres);
|
||||||
|
|
||||||
if (i == 0) /* No error */
|
if (i == 0) /* No error */
|
||||||
|
{
|
||||||
|
|
||||||
|
/* set the result to null in case it errors out later */
|
||||||
|
rsetnull(CDECIMALTYPE, (char *) result);
|
||||||
PGTYPESnumeric_to_decimal(nres, result);
|
PGTYPESnumeric_to_decimal(nres, result);
|
||||||
|
}
|
||||||
|
|
||||||
PGTYPESnumeric_free(nres);
|
PGTYPESnumeric_free(nres);
|
||||||
PGTYPESnumeric_free(a1);
|
PGTYPESnumeric_free(a1);
|
||||||
@@ -268,7 +272,6 @@ decdiv(decimal * n1, decimal * n2, decimal * result)
|
|||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
rsetnull(CDECIMALTYPE, (char *) result);
|
|
||||||
i = deccall3(n1, n2, result, PGTYPESnumeric_div);
|
i = deccall3(n1, n2, result, PGTYPESnumeric_div);
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
@@ -293,7 +296,6 @@ decmul(decimal * n1, decimal * n2, decimal * result)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
rsetnull(CDECIMALTYPE, (char *) result);
|
|
||||||
i = deccall3(n1, n2, result, PGTYPESnumeric_mul);
|
i = deccall3(n1, n2, result, PGTYPESnumeric_mul);
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
@@ -315,7 +317,6 @@ decsub(decimal * n1, decimal * n2, decimal * result)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
rsetnull(CDECIMALTYPE, (char *) result);
|
|
||||||
i = deccall3(n1, n2, result, PGTYPESnumeric_sub);
|
i = deccall3(n1, n2, result, PGTYPESnumeric_sub);
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
|
Reference in New Issue
Block a user