1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +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/execute.c,v 1.96 2010/05/20 22:10:45 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.97 2010/05/25 17:28:20 meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
@@ -541,13 +541,13 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
if (*(long *) var->ind_value < 0L)
*tobeinserted_p = NULL;
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
case ECPGt_long_long:
case ECPGt_unsigned_long_long:
if (*(long long int *) var->ind_value < (long long) 0)
*tobeinserted_p = NULL;
break;
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
case ECPGt_NO_INDICATOR:
if (force_indicator == false)
{
@@ -679,7 +679,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
*tobeinserted_p = mallocedval;
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
case ECPGt_long_long:
if (!(mallocedval = ecpg_alloc(asize * 30, lineno)))
return false;
@@ -689,12 +689,12 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
strcpy(mallocedval, "array [");
for (element = 0; element < asize; element++)
sprintf(mallocedval + strlen(mallocedval), "%lld,", ((long long *) var->value)[element]);
sprintf(mallocedval + strlen(mallocedval), "%lld,", ((long long int *) var->value)[element]);
strcpy(mallocedval + strlen(mallocedval) - 1, "]");
}
else
sprintf(mallocedval, "%lld", *((long long *) var->value));
sprintf(mallocedval, "%lld", *((long long int *) var->value));
*tobeinserted_p = mallocedval;
break;
@@ -708,16 +708,16 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
strcpy(mallocedval, "array [");
for (element = 0; element < asize; element++)
sprintf(mallocedval + strlen(mallocedval), "%llu,", ((unsigned long long *) var->value)[element]);
sprintf(mallocedval + strlen(mallocedval), "%llu,", ((unsigned long long int*) var->value)[element]);
strcpy(mallocedval + strlen(mallocedval) - 1, "]");
}
else
sprintf(mallocedval, "%llu", *((unsigned long long *) var->value));
sprintf(mallocedval, "%llu", *((unsigned long long int *) var->value));
*tobeinserted_p = mallocedval;
break;
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
case ECPGt_float:
if (!(mallocedval = ecpg_alloc(asize * 25, lineno)))
return false;