1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +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/misc.c,v 1.57 2010/05/20 22:10:46 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.58 2010/05/25 17:28:20 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@ -17,15 +17,15 @@
#include "pgtypes_interval.h"
#include "pg_config_paths.h"
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
#ifndef LONG_LONG_MIN
#ifdef LLONG_MIN
#define LONG_LONG_MIN LLONG_MIN
#else
#define LONG_LONG_MIN LONGLONG_MIN
#endif
#endif
#endif
#endif /* LLONG_MIN */
#endif /* LONG_LONG_MIN */
#endif /* HAVE_LONG_LONG_INT */
bool ecpg_internal_regression_mode = false;
@ -327,12 +327,12 @@ ECPGset_noind_null(enum ECPGttype type, void *ptr)
case ECPGt_date:
*((long *) ptr) = LONG_MIN;
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
case ECPGt_long_long:
case ECPGt_unsigned_long_long:
*((long long *) ptr) = LONG_LONG_MIN;
break;
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
case ECPGt_float:
memset((char *) ptr, 0xff, sizeof(float));
break;
@ -399,13 +399,13 @@ ECPGis_noind_null(enum ECPGttype type, void *ptr)
if (*((long *) ptr) == LONG_MIN)
return true;
break;
#ifdef HAVE_LONG_LONG
#ifdef HAVE_LONG_LONG_INT
case ECPGt_long_long:
case ECPGt_unsigned_long_long:
if (*((long long *) ptr) == LONG_LONG_MIN)
return true;
break;
#endif /* HAVE_LONG_LONG */
#endif /* HAVE_LONG_LONG_INT */
case ECPGt_float:
return (_check(ptr, sizeof(float)));
break;