From: Michael Meskes Date: Thu, 5 Feb 2009 08:28:47 +0000 (+0000) Subject: Mixing long and int entries of a union only works on some architectures. X-Git-Tag: REL8_4_BETA1~305 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78cbd498263122fe731a6dd1f31c906042fa2127;p=postgresql Mixing long and int entries of a union only works on some architectures. --- diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c index dc3ef05826..6850c22a20 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/dt_common.c,v 1.46 2009/02/04 08:51:09 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/dt_common.c,v 1.47 2009/02/05 08:28:47 meskes Exp $ */ #include "postgres_fe.h" @@ -2550,7 +2550,7 @@ pgtypes_defmt_scan(union un_fmt_comb * scan_val, int scan_type, char **pstr, cha while (**pstr == ' ') (*pstr)++; errno = 0; - scan_val->uint_val = (unsigned long int) strtol(*pstr, &strtol_end, 10); + scan_val->luint_val = (unsigned long int) strtol(*pstr, &strtol_end, 10); if (errno) err = 1; break;