summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--configure.ac15
-rw-r--r--openbsd-compat/bsd-misc.c7
-rw-r--r--openbsd-compat/bsd-misc.h6
4 files changed, 27 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 13f077228..21ab0c309 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
20101109
- (tim) [regress/kextype.sh] Not all platforms have time in /usr/bin.
Feedback from dtucker@
+ - (tim) [configure.ac openbsd-compat/bsd-misc.h openbsd-compat/bsd-misc.c] Add
+ support for platforms missing isblank(). ok djm@
20101108
- (tim) [regress/Makefile] Fixes to allow building/testing outside source
diff --git a/configure.ac b/configure.ac
index 97d4e6bdb..c3700d8dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.457 2010/11/05 07:23:38 dtucker Exp $
+# $Id: configure.ac,v 1.458 2010/11/08 22:26:23 tim Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
-AC_REVISION($Revision: 1.457 $)
+AC_REVISION($Revision: 1.458 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_CONFIG_HEADER(config.h)
@@ -1479,6 +1479,17 @@ AC_CHECK_FUNCS( \
waitpid \
)
+AC_LINK_IFELSE(
+[
+#include <ctype.h>
+int main(void)
+{
+ return (isblank('a'));
+}
+],
+ [AC_DEFINE(HAVE_ISBLANK, 1, [Define if you have isblank(3C).])
+])
+
# PKCS#11 support requires dlopen() and co
AC_SEARCH_LIBS(dlopen, dl,
AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support])
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index 55f100ac0..3ef373f56 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -240,3 +240,10 @@ strdup(const char *str)
return NULL;
}
#endif
+
+#ifndef HAVE_ISBLANK
+int isblank(int c)
+{
+ return (c == ' ' || c == '\t');
+}
+#endif
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index b61ec4244..e70c3f9e9 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -1,4 +1,4 @@
-/* $Id: bsd-misc.h,v 1.18 2005/02/25 23:07:38 dtucker Exp $ */
+/* $Id: bsd-misc.h,v 1.19 2010/11/08 22:26:23 tim Exp $ */
/*
* Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org>
@@ -95,4 +95,8 @@ mysig_t mysignal(int sig, mysig_t act);
#define signal(a,b) mysignal(a,b)
+#ifndef HAVE_ISBLANK
+int isblank(int);
+#endif
+
#endif /* _BSD_MISC_H */