Added typedef for missing ssize_t on Windows. We used the same definitions Windows provided for the datatypes on MSDN, so it should not cause compiler problems (at least under Windows compilers)

pull/35/head
Jeffrey Walton 2015-07-30 14:26:17 -04:00
parent c9759f4ca1
commit 458d582ab1
1 changed files with 13 additions and 0 deletions

View File

@ -172,6 +172,19 @@ const lword LWORD_MAX = W64LIT(0xffffffffffffffff);
typedef word64 dword;
#endif
#endif
// Handle missing ssize_t on Windows. Typedef's taken from:
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx#LONG_PTR
#if defined(_WIN32) || defined(_WIN64)
# if defined(_WIN64)
typedef __int64 LONG_PTR;
# else
typedef long LONG_PTR;
# endif
typedef LONG_PTR SSIZE_T;
typedef SSIZE_T ssize_t;
#endif
#ifndef CRYPTOPP_BOOL_SLOW_WORD64
#define CRYPTOPP_BOOL_SLOW_WORD64 0
#endif