summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACKS1
-rw-r--r--src/Blowfish.c9
-rw-r--r--src/RIPEMD160.c10
-rw-r--r--src/_counter.h9
-rw-r--r--src/inc-msvc/config.h3
5 files changed, 29 insertions, 3 deletions
diff --git a/ACKS b/ACKS
index 558fbd1..2c0d950 100644
--- a/ACKS
+++ b/ACKS
@@ -29,6 +29,7 @@ Philippe Frycia
Peter Gutmann
Hirendra Hindocha
Nikhil Jhingan
+Sebastian Kayser
Ryan Kelly
Andrew M. Kuchling
Piers Lauder
diff --git a/src/Blowfish.c b/src/Blowfish.c
index f0d8594..8a6232f 100644
--- a/src/Blowfish.c
+++ b/src/Blowfish.c
@@ -26,8 +26,15 @@
* http://www.schneier.com/paper-blowfish-fse.html
*/
+#include "config.h"
+#if HAVE_STDINT_H
+# include <stdint.h>
+#elif defined(__sun) || defined(__sun__)
+# include <sys/inttypes.h>
+#else
+# error "stdint.h not found"
+#endif
#include <assert.h>
-#include <stdint.h>
#include <string.h>
#include "Python.h"
diff --git a/src/RIPEMD160.c b/src/RIPEMD160.c
index 45b4a2c..692cb3e 100644
--- a/src/RIPEMD160.c
+++ b/src/RIPEMD160.c
@@ -43,8 +43,16 @@
* "RIPEMD-160 is big-bit-endian, little-byte-endian, and left-justified."
*/
+#include "config.h"
+#if HAVE_STDINT_H
+# include <stdint.h>
+#elif defined(__sun) || defined(__sun__)
+# include <sys/inttypes.h>
+#else
+# error "stdint.h not found"
+#endif
+
#include <assert.h>
-#include <stdint.h>
#include <string.h>
#include "Python.h"
#include "pycrypto_compat.h"
diff --git a/src/_counter.h b/src/_counter.h
index 47dd494..fc3e24e 100644
--- a/src/_counter.h
+++ b/src/_counter.h
@@ -24,7 +24,14 @@
#ifndef PCT__COUNTER_H
#define PCT__COUNTER_H
-#include <stdint.h>
+#include "config.h"
+#if HAVE_STDINT_H
+# include <stdint.h>
+#elif defined(__sun) || defined(__sun__)
+# include <sys/inttypes.h>
+#else
+# error "stdint.h not found"
+#endif
typedef struct {
PyObject_HEAD
diff --git a/src/inc-msvc/config.h b/src/inc-msvc/config.h
index aa42a7b..2b7a626 100644
--- a/src/inc-msvc/config.h
+++ b/src/inc-msvc/config.h
@@ -11,3 +11,6 @@
/* Define to 1 if you have the `mpir' library (-lmpir). */
#undef HAVE_LIBMPIR
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1