# Macros to detect C compiler features
-# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.20 2010/02/13 02:34:08 tgl Exp $
+# $PostgreSQL: pgsql/config/c-compiler.m4,v 1.21 2010/05/25 14:32:55 meskes Exp $
# PGAC_C_SIGNED
[LDFLAGS="$pgac_save_LDFLAGS"
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
+
-
ac_aux_dir=
for ac_dir in config "$srcdir"/config; do
if test -f "$ac_dir/install-sh"; then
#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; }
dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.627 2010/05/13 22:07:42 tgl Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.628 2010/05/25 14:32:54 meskes Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
PGAC_C_INLINE
AC_C_STRINGIZE
PGAC_C_SIGNED
+PGAC_C_LONG_LONG
AC_C_VOLATILE
PGAC_C_FUNCNAME_SUPPORT
PGAC_STRUCT_TIMEZONE
/* 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 `long long int' works and is 64 bits. */
#undef HAVE_LONG_LONG_INT_64
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.40 2010/05/20 22:10:45 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.41 2010/05/25 14:32:55 meskes Exp $ */
#ifndef _ECPG_LIB_EXTERN_H
#define _ECPG_LIB_EXTERN_H
#include <limits.h>
#endif
-/* Do we know the C99 data type "long long"? */
-#if defined(LLONG_MIN) || defined(LONGLONG_MIN) || defined(HAVE_LONG_LONG_INT_64)
-#define HAVE_LONG_LONG 1
-#endif
-
enum COMPAT_MODE
{
ECPG_COMPAT_PGSQL = 0, ECPG_COMPAT_INFORMIX, ECPG_COMPAT_INFORMIX_SE
* (--enable-thread-safety) */
#undef ENABLE_THREAD_SAFETY
+/* Define to 1 if the C compiler does understand long long type. */
+#undef HAVE_LONG_LONG
+
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.15 2010/05/20 22:10:46 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.16 2010/05/25 14:32:55 meskes Exp $ */
/* Copyright comment */
%{
#include "postgres_fe.h"
#include "extern.h"
+#include "ecpg_config.h"
#include <unistd.h>
-/* Do we know the C99 datatype "long long"? */
-#if defined(LLONG_MIN) || defined(LONGLONG_MIN) || defined(HAVE_LONG_LONG_INT_64)
-#define HAVE_LONG_LONG 1
-#endif
-
/* Location tracking support --- simpler than bison's default */
#define YYLLOC_DEFAULT(Current, Rhs, N) \
do { \