diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_opermd5.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_opersha256.cpp (renamed from src/modules/extra/m_opersha256.cpp) | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/modules/m_opermd5.cpp b/src/modules/m_opermd5.cpp index c5ac5a0ee..d99b9a96e 100644 --- a/src/modules/m_opermd5.cpp +++ b/src/modules/m_opermd5.cpp @@ -20,7 +20,7 @@ using namespace std; #include <stdio.h> #include "inspircd_config.h" -#ifdef STDINT_H +#ifdef HAS_STDINT #include <stdint.h> #endif #include "users.h" @@ -38,6 +38,10 @@ using namespace std; #define MD5STEP(f,w,x,y,z,in,s) \ (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x) +#ifndef HAS_STDINT +typedef unsigned int uint32_t; +#endif + typedef uint32_t word32; /* NOT unsigned long. We don't support 16 bit platforms, anyway. */ typedef unsigned char byte; diff --git a/src/modules/extra/m_opersha256.cpp b/src/modules/m_opersha256.cpp index 82caa9d12..a13028061 100644 --- a/src/modules/extra/m_opersha256.cpp +++ b/src/modules/m_opersha256.cpp @@ -37,7 +37,10 @@ using namespace std; #include <stdio.h> +#include "inspircd_config.h" +#ifdef HAS_STDINT #include <stdint.h> +#endif #include "users.h" #include "channels.h" #include "modules.h" @@ -48,6 +51,10 @@ static Server *Srv; #define SHA256_DIGEST_SIZE (256 / 8) #define SHA256_BLOCK_SIZE (512 / 8) +#ifndef HAS_STDINT +typedef unsigned int uint32_t; +#endif + struct SHA256Context { unsigned int tot_len; |