diff options
-rw-r--r-- | bcrypt/bcrypt.c | 3 | ||||
-rw-r--r-- | bcrypt/bcrypt_python.c | 7 | ||||
-rw-r--r-- | bcrypt/pybc_blf.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/bcrypt/bcrypt.c b/bcrypt/bcrypt.c index 98ecbef..8f5812d 100644 --- a/bcrypt/bcrypt.c +++ b/bcrypt/bcrypt.c @@ -52,8 +52,9 @@ #include "pybc_blf.h" -#if defined(_MSC_VER) +#if defined(_WIN32) #define snprintf _snprintf +#define bzero(s,n) memset(s, '\0', n) #endif /* This implementation is adaptable to current computing power. diff --git a/bcrypt/bcrypt_python.c b/bcrypt/bcrypt_python.c index 5d33617..6154f5c 100644 --- a/bcrypt/bcrypt_python.c +++ b/bcrypt/bcrypt_python.c @@ -16,10 +16,11 @@ #include "Python.h" -#if defined(_MSC_VER) +#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 /* $Id$ */ @@ -67,10 +68,8 @@ bcrypt_hashpw(PyObject *self, PyObject *args, PyObject *kw_args) { static char *keywords[] = { "password", "salt", NULL }; char *password = NULL, *salt = NULL; - char hashed[128]; + char hashed[128], char *password_copy, *salt_copy; int ret; - char *password_copy; - char *salt_copy; if (!PyArg_ParseTupleAndKeywords(args, kw_args, "ss:hashpw", keywords, &password, &salt)) diff --git a/bcrypt/pybc_blf.h b/bcrypt/pybc_blf.h index 92e8ea2..55ac12c 100644 --- a/bcrypt/pybc_blf.h +++ b/bcrypt/pybc_blf.h @@ -34,7 +34,7 @@ #ifndef _PYBC_BLF_H_ #define _PYBC_BLF_H_ -#if defined(_MSC_VER) +#if defined(_WIN32) typedef unsigned __int8 u_int8_t; typedef unsigned __int16 u_int16_t; typedef unsigned __int32 u_int32_t; |