]> granicus.if.org Git - postgresql/commitdiff
Replace self written 'long long int' configure test by standard 'AC_TYPE_LONG_LONG_IN...
authorMichael Meskes <meskes@postgresql.org>
Tue, 25 May 2010 17:28:20 +0000 (17:28 +0000)
committerMichael Meskes <meskes@postgresql.org>
Tue, 25 May 2010 17:28:20 +0000 (17:28 +0000)
config/c-compiler.m4
configure
configure.in
src/include/pg_config.h.in
src/interfaces/ecpg/ecpglib/data.c
src/interfaces/ecpg/ecpglib/descriptor.c
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/include/ecpg_config.h.in
src/interfaces/ecpg/preproc/ecpg.trailer

index fb1c0c9f0ae3f9f4be6f858839bc92ea0ffa56f0..a8df61b649ed065824d4c70693d30492a51d300f 100644 (file)
@@ -1,5 +1,5 @@
 # Macros to detect C compiler features
-# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.21 2010/05/25 14:32:55 meskes Exp $
+# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.22 2010/05/25 17:28:20 meskes Exp $
 
 
 # PGAC_C_SIGNED
@@ -156,18 +156,3 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([extern void $2 (); void (*fptr) () = $2;],[])],
                AC_MSG_RESULT(assuming no)])
 ])# PGAC_PROG_CC_LDFLAGS_OPT
 
-
-
-# PGAC_C_LONG_LONG
-# ----------------
-# Check if the C compiler understands long long type.
-AC_DEFUN([PGAC_C_LONG_LONG],
-[AC_CACHE_CHECK(for long long type, pgac_cv_c_long_long,
-[AC_TRY_COMPILE([],
-[long long l;],
-[pgac_cv_c_long_long=yes],
-[pgac_cv_c_long_long=no])])
-if test x"$pgac_cv_c_long_long" = xyes ; then
-  AC_DEFINE(HAVE_LONG_LONG, 1, [Define to 1 if the C compiler does understand long long type.])
-fi])# PGAC_C_LONG_LONG
-
index 5f4af8345b0a7b0064ff00e89b24ce1bc78af998..638a1bbff1455500b4634e6b1957a9ae99cc394d 100755 (executable)
--- a/configure
+++ b/configure
@@ -2008,6 +2008,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
 ac_aux_dir=
 for ac_dir in config "$srcdir"/config; do
   if test -f "$ac_dir/install-sh"; then
@@ -14693,63 +14694,6 @@ cat >>confdefs.h <<\_ACEOF
 #define signed /**/
 _ACEOF
 
-fi
-{ $as_echo "$as_me:$LINENO: checking for long long type" >&5
-$as_echo_n "checking for long long type... " >&6; }
-if test "${pgac_cv_c_long_long+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-long long l;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  pgac_cv_c_long_long=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       pgac_cv_c_long_long=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_c_long_long" >&5
-$as_echo "$pgac_cv_c_long_long" >&6; }
-if test x"$pgac_cv_c_long_long" = xyes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LONG_LONG 1
-_ACEOF
-
 fi
 { $as_echo "$as_me:$LINENO: checking for working volatile" >&5
 $as_echo_n "checking for working volatile... " >&6; }
 
 
 
+  { $as_echo "$as_me:$LINENO: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+  /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* For now, do not test the preprocessor; as of 2007 there are too many
+        implementations with broken preprocessors.  Perhaps this can
+        be revisited in 2012.  In the meantime, code should not expect
+        #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                    ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                    ? 1 : -1)];
+      int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+             | (llmax / ll) | (llmax % ll)
+             | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+             | (ullmax / ull) | (ullmax % ull));
+  ;
+  return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+                       if test "$cross_compiling" = yes; then
+  ac_cv_type_long_long_int=yes
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <limits.h>
+              #ifndef LLONG_MAX
+              # define HALF \
+                       (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+              # define LLONG_MAX (HALF - 1 + HALF)
+              #endif
+int
+main ()
+{
+long long int n = 1;
+              int i;
+              for (i = 0; ; i++)
+                {
+                  long long int m = n << i;
+                  if (m >> i != n)
+                    return 1;
+                  if (LLONG_MAX / 2 < m)
+                    break;
+                }
+              return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_long_long_int=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_type_long_long_int=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_type_long_long_int=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_LONG_INT 1
+_ACEOF
+
+  fi
+
+
 { $as_echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
 $as_echo_n "checking for struct cmsgcred... " >&6; }
 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
index 645030b89004e67ebbc7db6cb3fcaad44eb38501..0a19f92bb0290c879386b72af41389c747eec6c8 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.628 2010/05/25 14:32:54 meskes Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.629 2010/05/25 17:28:20 meskes Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -1090,7 +1090,6 @@ AC_C_CONST
 PGAC_C_INLINE
 AC_C_STRINGIZE
 PGAC_C_SIGNED
-PGAC_C_LONG_LONG
 AC_C_VOLATILE
 PGAC_C_FUNCNAME_SUPPORT
 PGAC_STRUCT_TIMEZONE
@@ -1101,6 +1100,7 @@ PGAC_STRUCT_SOCKADDR_STORAGE_MEMBERS
 PGAC_STRUCT_ADDRINFO
 AC_TYPE_INTPTR_T
 AC_TYPE_UINTPTR_T
+AC_TYPE_LONG_LONG_INT
 
 AC_CHECK_TYPES([struct cmsgcred, struct fcred, struct sockcred], [], [],
 [#include <sys/param.h>
index 0d564b87de77b9dd477fe2a6787475e18bf3391a..fd169b682fbff4f9e20208893df6aeeea54a9cd4 100644 (file)
 /* Define to 1 if `long int' works and is 64 bits. */
 #undef HAVE_LONG_INT_64
 
-/* Define to 1 if the C compiler does understand long long type. */
-#undef HAVE_LONG_LONG
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
 
 /* Define to 1 if `long long int' works and is 64 bits. */
 #undef HAVE_LONG_LONG_INT_64
index 6088c66aa522f32ca59b8079ba13f76052815262..79af7b1ebb0cc8477f4a9f4f7fbb77b6f3f4ea98 100644 (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;
                                                                }
index b2edc2850b30238d89cdbfa92ed19062d558b797..cebc8b67fa0c972b6f059359e30f73ab7d089822 100644 (file)
@@ -1,6 +1,6 @@
 /* dynamic SQL support routines
  *
- * $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.37 2010/05/20 22:10:45 meskes Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.38 2010/05/25 17:28:20 meskes Exp $
  */
 
 #define POSTGRES_ECPG_INTERNAL
@@ -127,14 +127,14 @@ get_int_item(int lineno, void *var, enum ECPGttype vartype, int value)
                case ECPGt_unsigned_long:
                        *(unsigned long *) var = (unsigned long) value;
                        break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
                case ECPGt_long_long:
                        *(long long int *) var = (long long int) value;
                        break;
                case ECPGt_unsigned_long_long:
                        *(unsigned long long int *) var = (unsigned long long int) value;
                        break;
-#endif   /* HAVE_LONG_LONG */
+#endif   /* HAVE_LONG_LONG_INT */
                case ECPGt_float:
                        *(float *) var = (float) value;
                        break;
@@ -172,14 +172,14 @@ set_int_item(int lineno, int *target, const void *var, enum ECPGttype vartype)
                case ECPGt_unsigned_long:
                        *target = *(unsigned long *) var;
                        break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
                case ECPGt_long_long:
                        *target = *(long long int *) var;
                        break;
                case ECPGt_unsigned_long_long:
                        *target = *(unsigned long long int *) var;
                        break;
-#endif   /* HAVE_LONG_LONG */
+#endif   /* HAVE_LONG_LONG_INT */
                case ECPGt_float:
                        *target = *(float *) var;
                        break;
index 60b7c75f0ec37b7123b93cb8dea53e71760e488e..868bc699b0bdadc30b5c54932bb78f1827d303b0 100644 (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;
index 92cbad9a188396ea61f7a8696cd6de3d0a722ea3..6095c04b627af00e6645674f2b86ec7176ce35d6 100644 (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"
 #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;
index 5ee42c8ab7d5aaa197eceb11f215a4d2f42c7a65..72a34f4be0e515bb0372dd867808f243de3deee6 100644 (file)
@@ -4,6 +4,9 @@
 /* Define to 1 if `long int' works and is 64 bits. */
 #undef HAVE_LONG_INT_64
 
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
+
 /* Define to 1 if `long long int' works and is 64 bits. */
 #undef HAVE_LONG_LONG_INT_64
 
@@ -15,6 +18,3 @@
  *    (--enable-thread-safety) */
 #undef ENABLE_THREAD_SAFETY
 
-/* Define to 1 if the C compiler does understand long long type. */
-#undef HAVE_LONG_LONG
-
index 1d854d4bbc06b713f0c96b9d5673c6c71d80dc7e..59fc26c0ddc40f6e3d6a4f0cbfabb282b9ad3b3b 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.25 2010/05/20 22:10:46 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.26 2010/05/25 17:28:20 meskes Exp $ */
 
 statements: /*EMPTY*/
                 | statements statement
@@ -781,7 +781,7 @@ unsigned_type: SQL_UNSIGNED SQL_SHORT               { $$ = ECPGt_unsigned_short; }
                | SQL_UNSIGNED SQL_LONG INT_P           { $$ = ECPGt_unsigned_long; }
                | SQL_UNSIGNED SQL_LONG SQL_LONG
                {
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
                        $$ = ECPGt_unsigned_long_long;
 #else
                        $$ = ECPGt_unsigned_long;
@@ -789,7 +789,7 @@ unsigned_type: SQL_UNSIGNED SQL_SHORT               { $$ = ECPGt_unsigned_short; }
                }
                | SQL_UNSIGNED SQL_LONG SQL_LONG INT_P
                {
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
                        $$ = ECPGt_unsigned_long_long;
 #else
                        $$ = ECPGt_unsigned_long;
@@ -805,7 +805,7 @@ signed_type: SQL_SHORT                              { $$ = ECPGt_short; }
                | SQL_LONG INT_P                        { $$ = ECPGt_long; }
                | SQL_LONG SQL_LONG
                {
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
                        $$ = ECPGt_long_long;
 #else
                        $$ = ECPGt_long;
@@ -813,7 +813,7 @@ signed_type: SQL_SHORT                              { $$ = ECPGt_short; }
                }
                | SQL_LONG SQL_LONG INT_P
                {
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
                        $$ = ECPGt_long_long;
 #else
                        $$ = ECPGt_long;