diff options
-rw-r--r-- | bcrypt/bcrypt_python.c | 3 | ||||
-rw-r--r-- | bcrypt/pybc_blf.h | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/bcrypt/bcrypt_python.c b/bcrypt/bcrypt_python.c index a41352e..5450b48 100644 --- a/bcrypt/bcrypt_python.c +++ b/bcrypt/bcrypt_python.c @@ -24,9 +24,6 @@ typedef int Py_ssize_t; #define PYBCRYPT_VERSION "0.4" #if defined(_WIN32) -typedef unsigned __int8 u_int8_t; -typedef unsigned __int16 u_int16_t; -typedef unsigned __int32 u_int32_t; #define bzero(s,n) memset(s, '\0', n) #endif diff --git a/bcrypt/pybc_blf.h b/bcrypt/pybc_blf.h index 55ac12c..5f9ecd7 100644 --- a/bcrypt/pybc_blf.h +++ b/bcrypt/pybc_blf.h @@ -34,10 +34,15 @@ #ifndef _PYBC_BLF_H_ #define _PYBC_BLF_H_ -#if defined(_WIN32) -typedef unsigned __int8 u_int8_t; -typedef unsigned __int16 u_int16_t; -typedef unsigned __int32 u_int32_t; +#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; +#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. |