summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-06-06 08:30:20 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-06-06 08:30:20 +1000
commitae133d4b31af05bb232d797419f498f3ae7e9f2d (patch)
tree5263ae5e32ed9ef71d839c7a2f3a005a636cab6a
parent408eaf3ab716096f8faf30f091bd54a2c7a17a09 (diff)
- (dtucker) [configure.ac sftp.c openbsd-compat/openbsd-compat.h] Cater for
platforms that don't have multibyte character support (specifically, mblen).
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac6
-rw-r--r--openbsd-compat/openbsd-compat.h7
-rw-r--r--sftp.c4
4 files changed, 16 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 90ce8610..66e07fc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,9 @@
- dtucker@cvs.openbsd.org 2013/06/05 22:00:28
[readconf.c]
plug another memleak. bz#1967, from Zhenbo Xu, detected by Melton, ok djm
+ - (dtucker) [configure.ac sftp.c openbsd-compat/openbsd-compat.h] Cater for
+ platforms that don't have multibyte character support (specifically,
+ mblen).
20130602
- (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy
diff --git a/configure.ac b/configure.ac
index 2cd910cf..bce5d7b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.533 2013/06/04 02:55:24 dtucker Exp $
+# $Id: configure.ac,v 1.534 2013/06/05 22:30:21 dtucker 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.533 $)
+AC_REVISION($Revision: 1.534 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_LANG([C])
@@ -310,6 +310,7 @@ AC_CHECK_HEADERS([ \
ia.h \
iaf.h \
limits.h \
+ locale.h \
login.h \
maillock.h \
ndir.h \
@@ -1563,6 +1564,7 @@ AC_CHECK_FUNCS([ \
inet_ntop \
innetgr \
login_getcapbool \
+ mblen \
md5_crypt \
memmove \
mkdtemp \
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 3dbf1f24..392fa38d 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -1,4 +1,4 @@
-/* $Id: openbsd-compat.h,v 1.57 2013/05/16 10:47:32 dtucker Exp $ */
+/* $Id: openbsd-compat.h,v 1.58 2013/06/05 22:30:21 dtucker Exp $ */
/*
* Copyright (c) 1999-2003 Damien Miller. All rights reserved.
@@ -207,6 +207,11 @@ unsigned long long strtoull(const char *, char **, int);
long long strtonum(const char *, long long, long long, const char **);
#endif
+/* multibyte character support */
+#ifndef HAVE_MBLEN
+# define mblen(x, y) 1
+#endif
+
#if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF)
# include <stdarg.h>
#endif
diff --git a/sftp.c b/sftp.c
index 0c90fd1e..f50a4bb6 100644
--- a/sftp.c
+++ b/sftp.c
@@ -38,7 +38,9 @@
#ifdef HAVE_LIBGEN_H
#include <libgen.h>
#endif
-#include <locale.h>
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
#ifdef USE_LIBEDIT
#include <histedit.h>
#else