diff options
author | Tim Rice <tim@multitalents.net> | 2010-11-08 14:26:23 -0800 |
---|---|---|
committer | Tim Rice <tim@multitalents.net> | 2010-11-08 14:26:23 -0800 |
commit | c7a8af03a022e8ab52422b6ce26fdbcb729031fd (patch) | |
tree | fa4a41a93bb6293c740d52a9a1c9aa2ace0046db | |
parent | e426f5e932cedeb6938469ded340f272390f6a07 (diff) |
- (tim) [configure.ac openbsd-compat/bsd-misc.h openbsd-compat/bsd-misc.c] Add
support for platforms missing isblank(). ok djm@
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.c | 7 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.h | 6 |
4 files changed, 27 insertions, 3 deletions
@@ -1,6 +1,8 @@ | |||
1 | 20101109 | 1 | 20101109 |
2 | - (tim) [regress/kextype.sh] Not all platforms have time in /usr/bin. | 2 | - (tim) [regress/kextype.sh] Not all platforms have time in /usr/bin. |
3 | Feedback from dtucker@ | 3 | Feedback from dtucker@ |
4 | - (tim) [configure.ac openbsd-compat/bsd-misc.h openbsd-compat/bsd-misc.c] Add | ||
5 | support for platforms missing isblank(). ok djm@ | ||
4 | 6 | ||
5 | 20101108 | 7 | 20101108 |
6 | - (tim) [regress/Makefile] Fixes to allow building/testing outside source | 8 | - (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 @@ | |||
1 | # $Id: configure.ac,v 1.457 2010/11/05 07:23:38 dtucker Exp $ | 1 | # $Id: configure.ac,v 1.458 2010/11/08 22:26:23 tim Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -15,7 +15,7 @@ | |||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | ||
17 | AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) | 17 | AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) |
18 | AC_REVISION($Revision: 1.457 $) | 18 | AC_REVISION($Revision: 1.458 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | 20 | ||
21 | AC_CONFIG_HEADER(config.h) | 21 | AC_CONFIG_HEADER(config.h) |
@@ -1479,6 +1479,17 @@ AC_CHECK_FUNCS( \ | |||
1479 | waitpid \ | 1479 | waitpid \ |
1480 | ) | 1480 | ) |
1481 | 1481 | ||
1482 | AC_LINK_IFELSE( | ||
1483 | [ | ||
1484 | #include <ctype.h> | ||
1485 | int main(void) | ||
1486 | { | ||
1487 | return (isblank('a')); | ||
1488 | } | ||
1489 | ], | ||
1490 | [AC_DEFINE(HAVE_ISBLANK, 1, [Define if you have isblank(3C).]) | ||
1491 | ]) | ||
1492 | |||
1482 | # PKCS#11 support requires dlopen() and co | 1493 | # PKCS#11 support requires dlopen() and co |
1483 | AC_SEARCH_LIBS(dlopen, dl, | 1494 | AC_SEARCH_LIBS(dlopen, dl, |
1484 | AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support]) | 1495 | 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) | |||
240 | return NULL; | 240 | return NULL; |
241 | } | 241 | } |
242 | #endif | 242 | #endif |
243 | |||
244 | #ifndef HAVE_ISBLANK | ||
245 | int isblank(int c) | ||
246 | { | ||
247 | return (c == ' ' || c == '\t'); | ||
248 | } | ||
249 | #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 @@ | |||
1 | /* $Id: bsd-misc.h,v 1.18 2005/02/25 23:07:38 dtucker Exp $ */ | 1 | /* $Id: bsd-misc.h,v 1.19 2010/11/08 22:26:23 tim Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org> | 4 | * Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org> |
@@ -95,4 +95,8 @@ mysig_t mysignal(int sig, mysig_t act); | |||
95 | 95 | ||
96 | #define signal(a,b) mysignal(a,b) | 96 | #define signal(a,b) mysignal(a,b) |
97 | 97 | ||
98 | #ifndef HAVE_ISBLANK | ||
99 | int isblank(int); | ||
100 | #endif | ||
101 | |||
98 | #endif /* _BSD_MISC_H */ | 102 | #endif /* _BSD_MISC_H */ |