summaryrefslogtreecommitdiff
path: root/bcrypt/pybc_blf.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-07-28 09:53:48 +1000
committerDamien Miller <djm@mindrot.org>2013-07-28 09:53:48 +1000
commitbae2b6181523d39d9313f9b996199e618684ed63 (patch)
treec59d3e74c8ef7699d9868c68a14d7702edd80cec /bcrypt/pybc_blf.h
parente72cf0d46a6afb7b3a38d629ee5968c5e5cf2f3d (diff)
downloadpy-bcrypt-bae2b6181523d39d9313f9b996199e618684ed63.tar.gz
issue#9: use C99 fixed integer types if available
Diffstat (limited to 'bcrypt/pybc_blf.h')
-rw-r--r--bcrypt/pybc_blf.h13
1 files changed, 9 insertions, 4 deletions
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.