diff options
author | Kevin Steves <stevesk@pobox.com> | 2002-03-22 18:19:53 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2002-03-22 18:19:53 +0000 |
commit | 4846f4ab6989c20db4375440948266b742fa7a1f (patch) | |
tree | b5f522491402189dece19db89a0c43878fe0fa0f | |
parent | 7e147607f56648e19a856fd1a1f905635e1f359e (diff) |
- (stevesk) configure and cpp __FUNCTION__ gymnastics to handle nielsisms
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | acconfig.h | 8 | ||||
-rw-r--r-- | configure.ac | 28 | ||||
-rw-r--r-- | defines.h | 8 |
4 files changed, 43 insertions, 4 deletions
@@ -1,6 +1,7 @@ | |||
1 | 20020322 | 1 | 20020322 |
2 | - (stevesk) HAVE_ACCRIGHTS_IN_MSGHDR configure support | 2 | - (stevesk) HAVE_ACCRIGHTS_IN_MSGHDR configure support |
3 | - (stevesk) [monitor.c monitor_wrap.c] #ifdef HAVE_PW_CLASS_IN_PASSWD | 3 | - (stevesk) [monitor.c monitor_wrap.c] #ifdef HAVE_PW_CLASS_IN_PASSWD |
4 | - (stevesk) configure and cpp __FUNCTION__ gymnastics to handle nielsisms | ||
4 | 5 | ||
5 | 20020321 | 6 | 20020321 |
6 | - (bal) OpenBSD CVS Sync | 7 | - (bal) OpenBSD CVS Sync |
@@ -7995,4 +7996,4 @@ | |||
7995 | - Wrote replacements for strlcpy and mkdtemp | 7996 | - Wrote replacements for strlcpy and mkdtemp |
7996 | - Released 1.0pre1 | 7997 | - Released 1.0pre1 |
7997 | 7998 | ||
7998 | $Id: ChangeLog,v 1.1968 2002/03/22 18:07:17 stevesk Exp $ | 7999 | $Id: ChangeLog,v 1.1969 2002/03/22 18:19:53 stevesk Exp $ |
diff --git a/acconfig.h b/acconfig.h index b2cf81ca7..cbdbde216 100644 --- a/acconfig.h +++ b/acconfig.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: acconfig.h,v 1.123 2002/03/22 17:23:26 stevesk Exp $ */ | 1 | /* $Id: acconfig.h,v 1.124 2002/03/22 18:19:54 stevesk Exp $ */ |
2 | 2 | ||
3 | #ifndef _CONFIG_H | 3 | #ifndef _CONFIG_H |
4 | #define _CONFIG_H | 4 | #define _CONFIG_H |
@@ -181,6 +181,12 @@ | |||
181 | /* Define if libc defines __progname */ | 181 | /* Define if libc defines __progname */ |
182 | #undef HAVE___PROGNAME | 182 | #undef HAVE___PROGNAME |
183 | 183 | ||
184 | /* Define if compiler implements __FUNCTION__ */ | ||
185 | #undef HAVE___FUNCTION__ | ||
186 | |||
187 | /* Define if compiler implements __func__ */ | ||
188 | #undef HAVE___func__ | ||
189 | |||
184 | /* Define if you want Kerberos 4 support */ | 190 | /* Define if you want Kerberos 4 support */ |
185 | #undef KRB4 | 191 | #undef KRB4 |
186 | 192 | ||
diff --git a/configure.ac b/configure.ac index 4a61c82f4..c704da3d3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.27 2002/03/22 17:23:26 stevesk Exp $ | 1 | # $Id: configure.ac,v 1.28 2002/03/22 18:19:54 stevesk Exp $ |
2 | 2 | ||
3 | AC_INIT | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 4 | AC_CONFIG_SRCDIR([ssh.c]) |
@@ -1603,6 +1603,32 @@ if test "x$ac_cv_libc_defines___progname" = "xyes" ; then | |||
1603 | AC_DEFINE(HAVE___PROGNAME) | 1603 | AC_DEFINE(HAVE___PROGNAME) |
1604 | fi | 1604 | fi |
1605 | 1605 | ||
1606 | AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [ | ||
1607 | AC_TRY_LINK([ | ||
1608 | #include <stdio.h> | ||
1609 | ], | ||
1610 | [ printf("%s", __FUNCTION__); ], | ||
1611 | [ ac_cv_cc_implements___FUNCTION__="yes" ], | ||
1612 | [ ac_cv_cc_implements___FUNCTION__="no" ] | ||
1613 | ) | ||
1614 | ]) | ||
1615 | if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then | ||
1616 | AC_DEFINE(HAVE___FUNCTION__) | ||
1617 | fi | ||
1618 | |||
1619 | AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [ | ||
1620 | AC_TRY_LINK([ | ||
1621 | #include <stdio.h> | ||
1622 | ], | ||
1623 | [ printf("%s", __func__); ], | ||
1624 | [ ac_cv_cc_implements___func__="yes" ], | ||
1625 | [ ac_cv_cc_implements___func__="no" ] | ||
1626 | ) | ||
1627 | ]) | ||
1628 | if test "x$ac_cv_cc_implements___func__" = "xyes" ; then | ||
1629 | AC_DEFINE(HAVE___func__) | ||
1630 | fi | ||
1631 | |||
1606 | AC_CACHE_CHECK([whether getopt has optreset support], | 1632 | AC_CACHE_CHECK([whether getopt has optreset support], |
1607 | ac_cv_have_getopt_optreset, [ | 1633 | ac_cv_have_getopt_optreset, [ |
1608 | AC_TRY_LINK( | 1634 | AC_TRY_LINK( |
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _DEFINES_H | 1 | #ifndef _DEFINES_H |
2 | #define _DEFINES_H | 2 | #define _DEFINES_H |
3 | 3 | ||
4 | /* $Id: defines.h,v 1.81 2002/03/08 03:11:08 mouring Exp $ */ | 4 | /* $Id: defines.h,v 1.82 2002/03/22 18:19:54 stevesk Exp $ */ |
5 | 5 | ||
6 | /* Necessary headers */ | 6 | /* Necessary headers */ |
7 | 7 | ||
@@ -490,6 +490,12 @@ struct winsize { | |||
490 | # define OPENSSL_free(x) Free(x) | 490 | # define OPENSSL_free(x) Free(x) |
491 | #endif | 491 | #endif |
492 | 492 | ||
493 | #if defined(HAVE___func__) | ||
494 | # define __FUNCTION__ __func__ | ||
495 | #elif !defined(HAVE___FUNCTION__) | ||
496 | # define __FUNCTION__ "" | ||
497 | #endif | ||
498 | |||
493 | /* | 499 | /* |
494 | * Define this to use pipes instead of socketpairs for communicating with the | 500 | * Define this to use pipes instead of socketpairs for communicating with the |
495 | * client program. Socketpairs do not seem to work on all systems. | 501 | * client program. Socketpairs do not seem to work on all systems. |