diff --git a/contrib/win32/openssh/config.h.vs b/contrib/win32/openssh/config.h.vs index edf2f55..81afa1b 100644 --- a/contrib/win32/openssh/config.h.vs +++ b/contrib/win32/openssh/config.h.vs @@ -1691,11 +1691,8 @@ typedef long ssize_t; #endif #endif -#ifndef _WIN32 -#define HAVE_POLL 1 -#endif #define HAVE_STRTOULL 1 -#undef HAVE_USLEEP +#define HAVE_USLEEP 1 #if defined ( WIN32 ) #define __func__ __FUNCTION__ @@ -1732,3 +1729,5 @@ typedef long ssize_t; // works remotely over SSH like they operate in a local machine //#define WIN32_PRAGMA_REMCON + +#define HAVE_MBLEN 1 diff --git a/contrib/win32/openssh/win32iocompat.vcxproj b/contrib/win32/openssh/win32iocompat.vcxproj index 909819e..570387f 100644 --- a/contrib/win32/openssh/win32iocompat.vcxproj +++ b/contrib/win32/openssh/win32iocompat.vcxproj @@ -146,6 +146,7 @@ + diff --git a/contrib/win32/openssh/win32iocompat.vcxproj.filters b/contrib/win32/openssh/win32iocompat.vcxproj.filters index 6ea3421..31b99aa 100644 --- a/contrib/win32/openssh/win32iocompat.vcxproj.filters +++ b/contrib/win32/openssh/win32iocompat.vcxproj.filters @@ -6,6 +6,7 @@ + @@ -36,7 +37,7 @@ inc - + inc diff --git a/contrib/win32/win32compat/inc/poll.h b/contrib/win32/win32compat/inc/poll.h index 30b181e..d7d35b9 100644 --- a/contrib/win32/win32compat/inc/poll.h +++ b/contrib/win32/win32compat/inc/poll.h @@ -4,4 +4,4 @@ /* created to #def out decarations in open-bsd.h (that are defined in winsock2.h) */ -int poll(struct pollfd *, nfds_t, int); \ No newline at end of file +int poll(struct pollfd *, nfds_t, int); \ No newline at end of file diff --git a/contrib/win32/win32compat/inc/sys/time.h b/contrib/win32/win32compat/inc/sys/time.h index 88d2bee..986afc2 100644 --- a/contrib/win32/win32compat/inc/sys/time.h +++ b/contrib/win32/win32compat/inc/sys/time.h @@ -1,3 +1,4 @@ #include -#define utimbuf _utimbuf \ No newline at end of file +#define utimbuf _utimbuf +int usleep(unsigned int); \ No newline at end of file diff --git a/contrib/win32/win32compat/inc/unistd.h b/contrib/win32/win32compat/inc/unistd.h index cf3a4df..0c3e72f 100644 --- a/contrib/win32/win32compat/inc/unistd.h +++ b/contrib/win32/win32compat/inc/unistd.h @@ -33,6 +33,8 @@ #define alarm w32_alarm #define lseek w32_lseek +#define getdtablesize() MAX_FDS + /* Compatibility header to avoid lots of #ifdefs in includes.h on Win32 */ #include diff --git a/contrib/win32/win32compat/misc.c b/contrib/win32/win32compat/misc.c new file mode 100644 index 0000000..3011f13 --- /dev/null +++ b/contrib/win32/win32compat/misc.c @@ -0,0 +1,7 @@ +#include + +int usleep(unsigned int useconds) +{ + Sleep(useconds / 1000); + return 1; +} \ No newline at end of file diff --git a/openbsd-compat/bsd-closefrom.c b/openbsd-compat/bsd-closefrom.c index 79ae140..9380b33 100644 --- a/openbsd-compat/bsd-closefrom.c +++ b/openbsd-compat/bsd-closefrom.c @@ -51,11 +51,6 @@ # define OPEN_MAX 256 #endif -#ifdef WIN32_FIXME -#define getdtablesize() FD_SETSIZE -#endif - - #if 0 __unused static const char rcsid[] = "$Sudo: closefrom.c,v 1.11 2006/08/17 15:26:54 millert Exp $"; #endif /* lint */ diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 907837d..717dad0 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -167,7 +167,7 @@ int nanosleep(const struct timespec *req, struct timespec *rem) return(rc); } #endif -#ifndef WIN32_FIXME + #if !defined(HAVE_USLEEP) int usleep(unsigned int useconds) { @@ -178,16 +178,6 @@ int usleep(unsigned int useconds) return nanosleep(&ts, NULL); } #endif -#else -#if !defined(HAVE_USLEEP) -int usleep(unsigned int useconds) -{ - Sleep(useconds/1000); - return 1; -} -#endif -#endif - #ifndef HAVE_TCGETPGRP pid_t diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index b9e76a2..0823028 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -227,12 +227,10 @@ unsigned long long strtoull(const char *, char **, int); long long strtonum(const char *, long long, long long, const char **); #endif -#ifndef WIN32_FIXME /* multibyte character support */ #ifndef HAVE_MBLEN # define mblen(x, y) (1) #endif -#endif #if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF) # include