summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/README4
-rw-r--r--source4/lib/replace/config.m48
-rw-r--r--source4/lib/replace/replace.h4
3 files changed, 15 insertions, 1 deletions
diff --git a/source4/lib/replace/README b/source4/lib/replace/README
index a789f66b81..841bcf4b8d 100644
--- a/source4/lib/replace/README
+++ b/source4/lib/replace/README
@@ -65,6 +65,10 @@ UINT16_MAX
UINT32_MAX
UINT64_MAX
+Macros:
+va_copy
+__FUNCTION__
+
Prerequisites:
memset (for bzero)
syslog (for vsyslog)
diff --git a/source4/lib/replace/config.m4 b/source4/lib/replace/config.m4
index 99cecc630e..fb6e791353 100644
--- a/source4/lib/replace/config.m4
+++ b/source4/lib/replace/config.m4
@@ -152,4 +152,10 @@ if test x"$samba_cv_HAVE___VA_COPY" = x"yes"; then
fi
fi
-
+dnl __FUNCTION__ macro
+AC_CACHE_CHECK([for __FUNCTION__ macro],samba_cv_HAVE_FUNCTION_MACRO,[
+AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __FUNCTION__);],
+samba_cv_HAVE_FUNCTION_MACRO=yes,samba_cv_HAVE_FUNCTION_MACRO=no)])
+if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
+ AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro])
+fi
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h
index f68c5b23a9..814936c49f 100644
--- a/source4/lib/replace/replace.h
+++ b/source4/lib/replace/replace.h
@@ -209,4 +209,8 @@ typedef bool int;
#define true (1)
#endif
+#ifndef HAVE_FUNCTION_MACRO
+#define __FUNCTION__ ("")
+#endif
+
#endif