summaryrefslogtreecommitdiff
path: root/config/c-compiler.m4
diff options
context:
space:
mode:
authorMichael Meskes2010-05-25 14:32:55 +0000
committerMichael Meskes2010-05-25 14:32:55 +0000
commit555a02f910490b94c48c1c479e9da2e4759ad25f (patch)
tree1f5c981af6226bfcf9f373a4a18a74654fbeeba9 /config/c-compiler.m4
parentf4e9436026455f7118de094696ca33e86555979e (diff)
Added a configure test for "long long" datatypes. So far this is only used in ecpg and replaces the old test that was kind of hackish.
Diffstat (limited to 'config/c-compiler.m4')
-rw-r--r--config/c-compiler.m418
1 files changed, 17 insertions, 1 deletions
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4
index 550f831a583..fb1c0c9f0ae 100644
--- a/config/c-compiler.m4
+++ b/config/c-compiler.m4
@@ -1,5 +1,5 @@
# 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
@@ -155,3 +155,19 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([extern void $2 (); void (*fptr) () = $2;],[])],
[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
+