- (tim) [configure.ac openbsd-compat/bsd-misc.h openbsd-compat/bsd-misc.c] Add

support for platforms missing isblank(). ok djm@
This commit is contained in:
Tim Rice 2010-11-08 14:26:23 -08:00
parent e426f5e932
commit c7a8af03a0
4 changed files with 27 additions and 3 deletions

View File

@ -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

View File

@ -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])

View File

@ -240,3 +240,10 @@ strdup(const char *str)
return NULL;
}
#endif
#ifndef HAVE_ISBLANK
int isblank(int c)
{
return (c == ' ' || c == '\t');
}
#endif

View File

@ -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 */