Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Commit

Permalink
Fix build on Solaris 9 and eariler
Browse files Browse the repository at this point in the history
We use <sys/inttypes.h> on Solaris platforms that don't have <stdint.h>.

This should fix https://bugs.launchpad.net/pycrypto/+bug/518871, reported by
Sebastian Kayser.
  • Loading branch information
dlitz committed Oct 11, 2011
1 parent 323ce9e commit 7401e64
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
1 change: 1 addition & 0 deletions ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Philippe Frycia
Peter Gutmann
Hirendra Hindocha
Nikhil Jhingan
Sebastian Kayser
Ryan Kelly
Andrew M. Kuchling
Piers Lauder
Expand Down
9 changes: 8 additions & 1 deletion src/Blowfish.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
10 changes: 9 additions & 1 deletion src/RIPEMD160.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 8 additions & 1 deletion src/_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/inc-msvc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7401e64

Please sign in to comment.