From 4ab73d6045aacd354894fe5edf0c5cfc75784064 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Apr 2006 16:25:53 +0000 Subject: r15000: Move some more autoconf tests out of build/m4/rewrite.m4 Guarantee availability of __FUNCTION__ in libreplace (This used to be commit 76b1576541210f2bb306ae17e0876b254e8dcead) --- source4/lib/util/capability.c | 1 - source4/lib/util/capability.m4 | 17 +++++++++++++++++ source4/lib/util/debug.h | 10 +--------- 3 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 source4/lib/util/capability.m4 (limited to 'source4/lib/util') diff --git a/source4/lib/util/capability.c b/source4/lib/util/capability.c index 09af293087..683bc99723 100644 --- a/source4/lib/util/capability.c +++ b/source4/lib/util/capability.c @@ -114,4 +114,3 @@ _PUBLIC_ void oplock_set_capability(BOOL this_process, BOOL inherit) set_inherited_process_capability(KERNEL_OPLOCK_CAPABILITY,inherit); #endif } - diff --git a/source4/lib/util/capability.m4 b/source4/lib/util/capability.m4 new file mode 100644 index 0000000000..2a95a607d5 --- /dev/null +++ b/source4/lib/util/capability.m4 @@ -0,0 +1,17 @@ +AC_CACHE_CHECK([for irix specific capabilities],samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES,[ +AC_TRY_RUN([#include +#include +main() { + cap_t cap; + if ((cap = cap_get_proc()) == NULL) + exit(1); + cap->cap_effective |= CAP_NETWORK_MGT; + cap->cap_inheritable |= CAP_NETWORK_MGT; + cap_set_proc(cap); + exit(0); +} +], +samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes,samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no,samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross)]) +if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then + AC_DEFINE(HAVE_IRIX_SPECIFIC_CAPABILITIES,1,[Whether IRIX specific capabilities are available]) +fi diff --git a/source4/lib/util/debug.h b/source4/lib/util/debug.h index 10d7d0697c..80155cdccf 100644 --- a/source4/lib/util/debug.h +++ b/source4/lib/util/debug.h @@ -23,14 +23,6 @@ * @brief Debugging macros */ -/* If we have these macros, we can add additional info to the header. */ - -#ifdef HAVE_FUNCTION_MACRO -#define FUNCTION_MACRO (__FUNCTION__) -#else -#define FUNCTION_MACRO ("") -#endif - /* the debug operations structure - contains function pointers to various debug implementations of each operation */ struct debug_ops { @@ -54,7 +46,7 @@ extern int DEBUGLEVEL; #define _DEBUG(level, body, header) do { \ if (DEBUGLVL(level)) { \ if (header) { \ - do_debug_header(level, __location__, FUNCTION_MACRO); \ + do_debug_header(level, __location__, __FUNCTION__); \ } \ do_debug body; \ } \ -- cgit