1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-07 08:02:56 +03:00

moved MAX size declarations #330

This commit is contained in:
Will Cosgrove
2019-03-20 08:44:37 -07:00
parent ca2744483e
commit d06ab72a14
2 changed files with 12 additions and 12 deletions

View File

@@ -145,18 +145,6 @@ typedef int libssh2_socket_t;
#define LIBSSH2_INVALID_SOCKET -1
#endif /* WIN32 */
#ifndef SIZE_MAX
#if _WIN64
#define SIZE_MAX 0xFFFFFFFFFFFFFFFF
#else
#define SIZE_MAX 0xFFFFFFFF
#endif
#endif
#ifndef UINT_MAX
#define UINT_MAX 0xFFFFFFFF
#endif
/*
* Determine whether there is small or large file support on windows.
*/

View File

@@ -146,6 +146,18 @@ static inline int writev(int sock, struct iovec *iov, int nvecs)
#endif
#ifndef SIZE_MAX
#if _WIN64
#define SIZE_MAX 0xFFFFFFFFFFFFFFFF
#else
#define SIZE_MAX 0xFFFFFFFF
#endif
#endif
#ifndef UINT_MAX
#define UINT_MAX 0xFFFFFFFF
#endif
/* RFC4253 section 6.1 Maximum Packet Length says:
*
* "All implementations MUST be able to process packets with