diff options
Diffstat (limited to 'libs/libssh2/src/misc.h')
-rw-r--r-- | libs/libssh2/src/misc.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/libssh2/src/misc.h b/libs/libssh2/src/misc.h index bf3e3c3623..c7b090f1b8 100644 --- a/libs/libssh2/src/misc.h +++ b/libs/libssh2/src/misc.h @@ -1,5 +1,5 @@ -#ifndef __LIBSSH2_MISC_H -#define __LIBSSH2_MISC_H +#ifndef LIBSSH2_MISC_H +#define LIBSSH2_MISC_H /* Copyright (C) Daniel Stenberg * All rights reserved. * @@ -44,8 +44,7 @@ (void)(buf); \ (void)(size); \ } while(0) -#else -#ifdef WIN32 +#elif defined(_WIN32) #define _libssh2_explicit_zero(buf, size) SecureZeroMemory(buf, size) #elif defined(HAVE_EXPLICIT_BZERO) #define _libssh2_explicit_zero(buf, size) explicit_bzero(buf, size) @@ -58,7 +57,6 @@ void _libssh2_memzero(void *buf, size_t size); #define _libssh2_explicit_zero(buf, size) _libssh2_memzero(buf, size) #endif -#endif struct list_head { struct list_node *last; @@ -81,6 +79,11 @@ int _libssh2_error_flags(LIBSSH2_SESSION* session, int errcode, const char *errmsg, int errflags); int _libssh2_error(LIBSSH2_SESSION* session, int errcode, const char *errmsg); +#ifdef _WIN32 +/* Convert Win32 WSAGetLastError to errno equivalent */ +int _libssh2_wsa2errno(void); +#endif + void _libssh2_list_init(struct list_head *head); /* add a node last in the list */ @@ -139,4 +142,4 @@ void _libssh2_xor_data(unsigned char *output, void _libssh2_aes_ctr_increment(unsigned char *ctr, size_t length); -#endif /* _LIBSSH2_MISC_H */ +#endif /* LIBSSH2_MISC_H */ |