summaryrefslogtreecommitdiff
path: root/config/c-compiler.m4
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-04-24 21:16:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-04-24 21:16:45 +0000
commitf690920a752fa8e59dc9536dd14194b2141163d2 (patch)
tree0fdd5e79110455c7857783e04f2d716c2a6a0c52 /config/c-compiler.m4
parenta91c5be6a47349d87068680c80839aae76304285 (diff)
downloadpostgresql-f690920a752fa8e59dc9536dd14194b2141163d2.tar.gz
Infrastructure for upgraded error reporting mechanism. elog.c is
rewritten and the protocol is changed, but most elog calls are still elog calls. Also, we need to contemplate mechanisms for controlling all this functionality --- eg, how much stuff should appear in the postmaster log? And what API should libpq expose for it?
Diffstat (limited to 'config/c-compiler.m4')
-rw-r--r--config/c-compiler.m428
1 files changed, 27 insertions, 1 deletions
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4
index 52cb7c0915..5d72e1377b 100644
--- a/config/c-compiler.m4
+++ b/config/c-compiler.m4
@@ -1,5 +1,5 @@
# Macros to detect C compiler features
-# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.7 2003/04/06 22:45:22 petere Exp $
+# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.8 2003/04/24 21:16:42 tgl Exp $
# PGAC_C_SIGNED
@@ -94,3 +94,29 @@ AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$1),
[$AS_TR_SH([pgac_cv_alignof_$1])],
[The alignment requirement of a `$1'.])
])# PGAC_CHECK_ALIGNOF
+
+
+# PGAC_C_FUNCNAME_SUPPORT
+# -------------
+# Check if the C compiler understands __func__ (C99) or __FUNCTION__ (gcc).
+# Define HAVE_FUNCNAME__FUNC or HAVE_FUNCNAME__FUNCTION accordingly.
+AC_DEFUN([PGAC_C_FUNCNAME_SUPPORT],
+[AC_CACHE_CHECK(for __func__, pgac_cv_funcname_func_support,
+[AC_TRY_COMPILE([#include <stdio.h>],
+[printf("%s\n", __func__);],
+[pgac_cv_funcname_func_support=yes],
+[pgac_cv_funcname_func_support=no])])
+if test x"$pgac_cv_funcname_func_support" = xyes ; then
+AC_DEFINE(HAVE_FUNCNAME__FUNC, 1,
+ [Define to 1 if your compiler understands __func__.])
+else
+AC_CACHE_CHECK(for __FUNCTION__, pgac_cv_funcname_function_support,
+[AC_TRY_COMPILE([#include <stdio.h>],
+[printf("%s\n", __FUNCTION__);],
+[pgac_cv_funcname_function_support=yes],
+[pgac_cv_funcname_function_support=no])])
+if test x"$pgac_cv_funcname_function_support" = xyes ; then
+AC_DEFINE(HAVE_FUNCNAME__FUNCTION, 1,
+ [Define to 1 if your compiler understands __FUNCTION__.])
+fi
+fi])# PGAC_C_FUNCNAME_SUPPORT