diff options
author | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-02-17 11:39:05 -0800 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2013-02-17 11:39:49 -0800 |
commit | d715685ae7f5a26ee90a23db5832e4243ce3af45 (patch) | |
tree | cb85ad0d86b0bf4c9e86a659d04e77bfd6031200 | |
parent | e85ae486ab9b7ec1bee51431888283ac7a7fcaa2 (diff) | |
download | pycrypto-d715685ae7f5a26ee90a23db5832e4243ce3af45.tar.gz |
Fix compiler warning about "_POSIX_C_SOURCE" being redefined in string.h
The solution is to include Python.h before string.h is included.
-rw-r--r-- | src/AES.c | 2 | ||||
-rw-r--r-- | src/ARC2.c | 2 | ||||
-rw-r--r-- | src/Blowfish.c | 2 | ||||
-rw-r--r-- | src/DES.c | 3 | ||||
-rw-r--r-- | src/MD2.c | 2 | ||||
-rw-r--r-- | src/MD4.c | 2 | ||||
-rw-r--r-- | src/RIPEMD160.c | 3 | ||||
-rw-r--r-- | src/_counter.c | 2 | ||||
-rw-r--r-- | src/_fastmath.c | 2 | ||||
-rw-r--r-- | src/block_template.c | 2 | ||||
-rw-r--r-- | src/hash_SHA2.h | 2 | ||||
-rw-r--r-- | src/hash_template.c | 2 | ||||
-rw-r--r-- | src/stream_template.c | 2 |
13 files changed, 16 insertions, 12 deletions
@@ -24,9 +24,9 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "Python.h" #include <assert.h> #include <stdlib.h> -#include "Python.h" #define MODULE_NAME _AES #define BLOCK_SIZE 16 @@ -41,8 +41,8 @@ * */ -#include <string.h> #include "Python.h" +#include <string.h> #define MODULE_NAME _ARC2 #define BLOCK_SIZE 8 diff --git a/src/Blowfish.c b/src/Blowfish.c index 94562bb..fd90fd7 100644 --- a/src/Blowfish.c +++ b/src/Blowfish.c @@ -26,6 +26,7 @@ * http://www.schneier.com/paper-blowfish-fse.html */ +#include "Python.h" #include "config.h" #if HAVE_STDINT_H # include <stdint.h> @@ -36,7 +37,6 @@ #endif #include <assert.h> #include <string.h> -#include "Python.h" #include "Blowfish-tables.h" @@ -24,6 +24,8 @@ * Country of origin: Canada */ +#include "Python.h" + /* Setting this will cause LibTomCrypt to return CRYPT_INVALID_ARG when its * assert-like LTC_ARGCHK macro fails. */ #define ARGTYPE 4 @@ -34,7 +36,6 @@ #undef DES /* this is needed because tomcrypt_custom.h defines DES to an empty string */ #include <assert.h> -#include "Python.h" typedef struct { symmetric_key sk; @@ -27,8 +27,8 @@ */ -#include <string.h> #include "Python.h" +#include <string.h> #include "pycrypto_compat.h" #define MODULE_NAME _MD2 @@ -27,8 +27,8 @@ */ -#include <string.h> #include "Python.h" +#include <string.h> #include "pycrypto_compat.h" #define MODULE_NAME _MD4 diff --git a/src/RIPEMD160.c b/src/RIPEMD160.c index 9786af8..8ff3fc5 100644 --- a/src/RIPEMD160.c +++ b/src/RIPEMD160.c @@ -43,6 +43,8 @@ * "RIPEMD-160 is big-bit-endian, little-byte-endian, and left-justified." */ +#include "Python.h" + #include "config.h" #if HAVE_STDINT_H # include <stdint.h> @@ -54,7 +56,6 @@ #include <assert.h> #include <string.h> -#include "Python.h" #include "pycrypto_compat.h" #define RIPEMD160_DIGEST_SIZE 20 diff --git a/src/_counter.c b/src/_counter.c index 9b396e4..a29b0ce 100644 --- a/src/_counter.c +++ b/src/_counter.c @@ -22,10 +22,10 @@ * =================================================================== */ +#include "Python.h" #include <assert.h> #include <stddef.h> #include <string.h> -#include "Python.h" #include "pycrypto_compat.h" #include "_counter.h" diff --git a/src/_fastmath.c b/src/_fastmath.c index 99b1c43..bd2651d 100644 --- a/src/_fastmath.c +++ b/src/_fastmath.c @@ -26,9 +26,9 @@ * $Id$ */ +#include "Python.h" #include <stdio.h> #include <string.h> -#include "Python.h" #include "pycrypto_compat.h" #include <longintrepr.h> /* for conversions */ #include "config.h" diff --git a/src/block_template.c b/src/block_template.c index c36b316..2cfee1b 100644 --- a/src/block_template.c +++ b/src/block_template.c @@ -24,6 +24,7 @@ * =================================================================== */ +#include "Python.h" #ifdef HAVE_CONFIG_H #include "config.h" @@ -33,7 +34,6 @@ #include <string.h> #endif -#include "Python.h" #include "pycrypto_compat.h" #include "modsupport.h" diff --git a/src/hash_SHA2.h b/src/hash_SHA2.h index 5867191..02991bd 100644 --- a/src/hash_SHA2.h +++ b/src/hash_SHA2.h @@ -26,6 +26,8 @@ #ifndef __HASH_SHA2_H #define __HASH_SHA2_H +#include "Python.h" + /* check if implementation set the correct macros */ #ifndef MODULE_NAME #error SHA2 Implementation must define MODULE_NAME before including this header diff --git a/src/hash_template.c b/src/hash_template.c index eb27e9f..10b1b1c 100644 --- a/src/hash_template.c +++ b/src/hash_template.c @@ -24,13 +24,13 @@ /* Basic object type */ +#include "Python.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef _HAVE_STDC_HEADERS #include <string.h> #endif -#include "Python.h" #include "pycrypto_compat.h" #define _STR(x) #x diff --git a/src/stream_template.c b/src/stream_template.c index c3effa4..a74d18d 100644 --- a/src/stream_template.c +++ b/src/stream_template.c @@ -24,6 +24,7 @@ * =================================================================== */ +#include "Python.h" #ifdef HAVE_CONFIG_H #include "config.h" @@ -33,7 +34,6 @@ #include <string.h> #endif -#include "Python.h" #include "pycrypto_compat.h" #include "modsupport.h" |