From 0abfb559e3f79d1f217773510d7626c3722aa3c1 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 10 May 2013 18:08:49 +1000 Subject: - (dtucker) [openbsd-compat/getopt.h openbsd-compat/getopt_long.c openbsd-compat/openbsd-compat.h] pull in getopt.h from openbsd and plumb in to use it when we're using our own getopt. --- openbsd-compat/openbsd-compat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openbsd-compat/openbsd-compat.h') diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index a8c579f49..94d172aaa 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -1,4 +1,4 @@ -/* $Id: openbsd-compat.h,v 1.55 2013/02/15 01:20:42 dtucker Exp $ */ +/* $Id: openbsd-compat.h,v 1.56 2013/05/10 08:08:49 dtucker Exp $ */ /* * Copyright (c) 1999-2003 Damien Miller. All rights reserved. @@ -139,6 +139,7 @@ int getgrouplist(const char *, gid_t, gid_t *, int *); #if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) int BSDgetopt(int argc, char * const *argv, const char *opts); +#include "openbsd-compat/getopt.h" #endif #if defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0 -- cgit v1.2.3 From e194ba4111ffd47cd1f4c8be1ddc8a4cb673d005 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 16 May 2013 20:47:31 +1000 Subject: - (dtucker) [configure.ac readconf.c servconf.c openbsd-compat/openbsd-compat.h] Add compat bits for scan_scaled. --- ChangeLog | 2 ++ configure.ac | 7 ++++--- openbsd-compat/openbsd-compat.h | 6 +++++- readconf.c | 2 ++ servconf.c | 2 ++ 5 files changed, 15 insertions(+), 4 deletions(-) (limited to 'openbsd-compat/openbsd-compat.h') diff --git a/ChangeLog b/ChangeLog index 845a6a28d..1779aa748 100644 --- a/ChangeLog +++ b/ChangeLog @@ -50,6 +50,8 @@ - dtucker@cvs.openbsd.org 2013/05/16 09:12:31 [readconf.c servconf.c] switch RekeyLimit traffic volume parsing to scan_scaled. ok djm@ + - (dtucker) [configure.ac readconf.c servconf.c + openbsd-compat/openbsd-compat.h] Add compat bits for scan_scaled. 20130510 - (dtucker) [configure.ac] Enable -Wsizeof-pointer-memaccess if the compiler diff --git a/configure.ac b/configure.ac index 6bcbef638..7d8adfcbc 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.523 2013/05/10 08:53:14 dtucker Exp $ +# $Id: configure.ac,v 1.524 2013/05/16 10:47:32 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.523 $) +AC_REVISION($Revision: 1.524 $) AC_CONFIG_SRCDIR([ssh.c]) AC_LANG([C]) @@ -1175,12 +1175,13 @@ AC_CHECK_FUNCS([utimes], dnl Checks for libutil functions AC_CHECK_HEADERS([bsd/libutil.h libutil.h]) AC_SEARCH_LIBS([fmt_scaled], [util bsd]) +AC_SEARCH_LIBS([scan_scaled], [util bsd]) AC_SEARCH_LIBS([login], [util bsd]) AC_SEARCH_LIBS([logout], [util bsd]) AC_SEARCH_LIBS([logwtmp], [util bsd]) AC_SEARCH_LIBS([openpty], [util bsd]) AC_SEARCH_LIBS([updwtmp], [util bsd]) -AC_CHECK_FUNCS([fmt_scaled login logout openpty updwtmp logwtmp]) +AC_CHECK_FUNCS([fmt_scaled scan_scaled login logout openpty updwtmp logwtmp]) AC_FUNC_STRFTIME diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index 94d172aaa..3dbf1f244 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -1,4 +1,4 @@ -/* $Id: openbsd-compat.h,v 1.56 2013/05/10 08:08:49 dtucker Exp $ */ +/* $Id: openbsd-compat.h,v 1.57 2013/05/16 10:47:32 dtucker Exp $ */ /* * Copyright (c) 1999-2003 Damien Miller. All rights reserved. @@ -111,6 +111,10 @@ char *dirname(const char *path); int fmt_scaled(long long number, char *result); #endif +#ifndef HAVE_SCAN_SCALED +int scan_scaled(char *, long long *); +#endif + #if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA) char *inet_ntoa(struct in_addr in); #endif diff --git a/readconf.c b/readconf.c index dccf3ba16..cbc1981ab 100644 --- a/readconf.c +++ b/readconf.c @@ -30,7 +30,9 @@ #include #include #include +#ifdef HAVE_UTIL_H #include +#endif #include "xmalloc.h" #include "ssh.h" diff --git a/servconf.c b/servconf.c index 145239342..b2123c6c7 100644 --- a/servconf.c +++ b/servconf.c @@ -30,7 +30,9 @@ #include #include #include +#ifdef HAVE_UTIL_H #include +#endif #include "openbsd-compat/sys-queue.h" #include "xmalloc.h" -- cgit v1.2.3 From ae133d4b31af05bb232d797419f498f3ae7e9f2d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 6 Jun 2013 08:30:20 +1000 Subject: - (dtucker) [configure.ac sftp.c openbsd-compat/openbsd-compat.h] Cater for platforms that don't have multibyte character support (specifically, mblen). --- ChangeLog | 3 +++ configure.ac | 6 ++++-- openbsd-compat/openbsd-compat.h | 7 ++++++- sftp.c | 4 +++- 4 files changed, 16 insertions(+), 4 deletions(-) (limited to 'openbsd-compat/openbsd-compat.h') diff --git a/ChangeLog b/ChangeLog index 90ce8610f..66e07fc63 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 2cd910cf9..bce5d7b17 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 3dbf1f244..392fa38dc 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 #endif diff --git a/sftp.c b/sftp.c index 0c90fd1e4..f50a4bb6a 100644 --- a/sftp.c +++ b/sftp.c @@ -38,7 +38,9 @@ #ifdef HAVE_LIBGEN_H #include #endif -#include +#ifdef HAVE_LOCALE_H +# include +#endif #ifdef USE_LIBEDIT #include #else -- cgit v1.2.3