Define MIN/MAX also for other OS'a

SVN revision: 2334
This commit is contained in:
Stefan Ritt 2010-11-16 08:59:45 +00:00
parent 03b1549afa
commit e418c6ae7c

View File

@ -8,8 +8,6 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#define MAX(x,y) ((x)>(y)?(x):(y))
#define MIN(x,y) ((x)<(y)?(x):(y))
#define __alignof__(x) sizeof(x) #define __alignof__(x) sizeof(x)
#define alloca(x) malloc(x) #define alloca(x) malloc(x)
#define ERANGE 34 #define ERANGE 34
@ -27,6 +25,11 @@ typedef unsigned int uint32_t;
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#ifndef MAX
#define MAX(x,y) ((x)>(y)?(x):(y))
#define MIN(x,y) ((x)<(y)?(x):(y))
#endif
/* Structure to save state of computation between the single steps. */ /* Structure to save state of computation between the single steps. */
struct sha256_ctx { struct sha256_ctx {
uint32_t H[8]; uint32_t H[8];