]> andersk Git - openssh.git/commitdiff
- (stevesk) configure and cpp __FUNCTION__ gymnastics to handle nielsisms
authorstevesk <stevesk>
Fri, 22 Mar 2002 18:19:53 +0000 (18:19 +0000)
committerstevesk <stevesk>
Fri, 22 Mar 2002 18:19:53 +0000 (18:19 +0000)
ChangeLog
acconfig.h
configure.ac
defines.h

index cddfbbf0a4128fa562466c5f435059f58d5ea6bd..c618a8a6007f9a39a12244ad22a421adc5682557 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 20020322
  - (stevesk) HAVE_ACCRIGHTS_IN_MSGHDR configure support
  - (stevesk) [monitor.c monitor_wrap.c] #ifdef HAVE_PW_CLASS_IN_PASSWD
+ - (stevesk) configure and cpp __FUNCTION__ gymnastics to handle nielsisms
 
 20020321
  - (bal) OpenBSD CVS Sync
index 3519c8c0ac76a1d334049c22ff637080dd7ee6a1..8673f741b83ef5e225d8769bc80d67f002514165 100644 (file)
 /* Define if libc defines __progname */
 #undef HAVE___PROGNAME
 
+/* Define if compiler implements __FUNCTION__ */
+#undef HAVE___FUNCTION__
+
+/* Define if compiler implements __func__ */
+#undef HAVE___func__
+
 /* Define if you want Kerberos 4 support */
 #undef KRB4
 
index b3af35fa214b1856030c4168b42d54fe059469a6..1cc56b73805419ad272023aa23a5c58d45919c7f 100644 (file)
@@ -1603,6 +1603,32 @@ if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
        AC_DEFINE(HAVE___PROGNAME)
 fi
 
+AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
+       AC_TRY_LINK([
+#include <stdio.h>
+], 
+               [ printf("%s", __FUNCTION__); ], 
+               [ ac_cv_cc_implements___FUNCTION__="yes" ],
+               [ ac_cv_cc_implements___FUNCTION__="no" ]
+       )
+])
+if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
+       AC_DEFINE(HAVE___FUNCTION__)
+fi
+
+AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
+       AC_TRY_LINK([
+#include <stdio.h>
+], 
+               [ printf("%s", __func__); ], 
+               [ ac_cv_cc_implements___func__="yes" ],
+               [ ac_cv_cc_implements___func__="no" ]
+       )
+])
+if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
+       AC_DEFINE(HAVE___func__)
+fi
+
 AC_CACHE_CHECK([whether getopt has optreset support],
                ac_cv_have_getopt_optreset, [
        AC_TRY_LINK(
index 8f73ac32cfa71b3234d9503f7fdb3a5a001abad8..a26e93044923884e5e9e184661da8838e1fa2ead 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -490,6 +490,12 @@ struct winsize {
 # define OPENSSL_free(x) Free(x)
 #endif
 
+#if defined(HAVE___func__)
+#  define __FUNCTION__ __func__
+#elif !defined(HAVE___FUNCTION__)
+#  define __FUNCTION__ ""
+#endif
+
 /*
  * Define this to use pipes instead of socketpairs for communicating with the
  * client program.  Socketpairs do not seem to work on all systems.
This page took 0.198492 seconds and 5 git commands to generate.