1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

Replace self written 'long long int' configure test by standard 'AC_TYPE_LONG_LONG_INT' macro call.

This commit is contained in:
Michael Meskes
2010-05-25 17:28:20 +00:00
parent 9b6dba1193
commit 29259531c7
10 changed files with 201 additions and 119 deletions

View File

@ -1,4 +1,4 @@
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.52 2010/05/20 22:10:45 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.53 2010/05/25 17:28:20 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@ -177,12 +177,12 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
case ECPGt_unsigned_long:
*((long *) (ind + ind_offset * act_tuple)) = value_for_indicator;
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
case ECPGt_long_long:
case ECPGt_unsigned_long_long:
*((long long int *) (ind + ind_offset * act_tuple)) = value_for_indicator;
break;
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
case ECPGt_NO_INDICATOR:
if (value_for_indicator == -1)
{
@ -265,12 +265,12 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
case ECPGt_unsigned_long:
*((long *) (ind + ind_offset * act_tuple)) = size;
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
case ECPGt_long_long:
case ECPGt_unsigned_long_long:
*((long long int *) (ind + ind_offset * act_tuple)) = size;
break;
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
default:
break;
}
@ -350,7 +350,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
}
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
#ifdef HAVE_STRTOLL
case ECPGt_long_long:
*((long long int *) (var + offset * act_tuple)) = strtoll(pval, &scan_length, 10);
@ -376,7 +376,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
break;
#endif /* HAVE_STRTOULL */
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
case ECPGt_float:
case ECPGt_double:
@ -489,12 +489,12 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
case ECPGt_unsigned_long:
*((long *) (ind + ind_offset * act_tuple)) = size;
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
case ECPGt_long_long:
case ECPGt_unsigned_long_long:
*((long long int *) (ind + ind_offset * act_tuple)) = size;
break;
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
default:
break;
}
@ -534,12 +534,12 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
case ECPGt_unsigned_long:
*((long *) (ind + offset * act_tuple)) = variable->len;
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
case ECPGt_long_long:
case ECPGt_unsigned_long_long:
*((long long int *) (ind + ind_offset * act_tuple)) = variable->len;
break;
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
default:
break;
}