diff options
-rw-r--r-- | bcrypt/bcrypt_python.c | 4 | ||||
-rw-r--r-- | bcrypt/pybc_blf.h | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/bcrypt/bcrypt_python.c b/bcrypt/bcrypt_python.c index 9875bdc..fd59bbb 100644 --- a/bcrypt/bcrypt_python.c +++ b/bcrypt/bcrypt_python.c @@ -26,6 +26,10 @@ typedef int Py_ssize_t; #define PYBCRYPT_VERSION "0.4" +#if defined(_WIN32) +#define bzero(s,n) memset(s, '\0', n) +#endif + /* $Id$ */ /* Import */ diff --git a/bcrypt/pybc_blf.h b/bcrypt/pybc_blf.h index dd0ce46..68b404f 100644 --- a/bcrypt/pybc_blf.h +++ b/bcrypt/pybc_blf.h @@ -35,17 +35,16 @@ #define _PYBC_BLF_H_ #include <sys/types.h> -#if defined(_WIN32) -typedef unsigned __int8 u_int8_t; -typedef unsigned __int16 u_int16_t; -typedef unsigned __int32 u_int32_t; -typedef unsigned __int64 u_int64_t; -#elif __STDC_VERSION__ >= 199901L /* C99 or later */ +#if __STDC_VERSION__ >= 199901L /* C99 or later */ #include <stdint.h> typedef uint8_t u_int8_t; typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; +#elif defined(_WIN32) +typedef unsigned __int8 u_int8_t; +typedef unsigned __int16 u_int16_t; +typedef unsigned __int32 u_int32_t; #endif /* Schneier specifies a maximum key length of 56 bytes. |