summaryrefslogtreecommitdiffstats
path: root/crypto/sha/sha.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-02-19 17:06:34 +0100
committerRichard Levitte <levitte@openssl.org>2001-02-19 17:06:34 +0100
commitcf1b7d96647d55e533f779e476e3d4371f40445a (patch)
treef7d6534cf77223190eaefe68d9e192d3d1246206 /crypto/sha/sha.h
parentRemove temporary files when done. (diff)
downloadopenssl-cf1b7d96647d55e533f779e476e3d4371f40445a.tar.xz
openssl-cf1b7d96647d55e533f779e476e3d4371f40445a.zip
Make all configuration macros available for application by making
sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
Diffstat (limited to 'crypto/sha/sha.h')
-rw-r--r--crypto/sha/sha.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/crypto/sha/sha.h b/crypto/sha/sha.h
index 77f6d9695e..b75194319a 100644
--- a/crypto/sha/sha.h
+++ b/crypto/sha/sha.h
@@ -59,11 +59,13 @@
#ifndef HEADER_SHA_H
#define HEADER_SHA_H
+#include <openssl/e_os2.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#if defined(NO_SHA) || (defined(NO_SHA0) && defined(NO_SHA1))
+#if defined(OPENSSL_NO_SHA) || (defined(OPENSSL_NO_SHA0) && defined(OPENSSL_NO_SHA1))
#error SHA is disabled.
#endif
@@ -74,9 +76,9 @@ extern "C" {
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
-#if defined(WIN16) || defined(__LP32__)
+#if defined(OPENSSL_SYS_WIN16) || defined(__LP32__)
#define SHA_LONG unsigned long
-#elif defined(_CRAY) || defined(__ILP64__)
+#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
#define SHA_LONG unsigned long
#define SHA_LONG_LOG2 3
#else
@@ -98,14 +100,14 @@ typedef struct SHAstate_st
int num;
} SHA_CTX;
-#ifndef NO_SHA0
+#ifndef OPENSSL_NO_SHA0
void SHA_Init(SHA_CTX *c);
void SHA_Update(SHA_CTX *c, const void *data, unsigned long len);
void SHA_Final(unsigned char *md, SHA_CTX *c);
unsigned char *SHA(const unsigned char *d, unsigned long n,unsigned char *md);
void SHA_Transform(SHA_CTX *c, const unsigned char *data);
#endif
-#ifndef NO_SHA1
+#ifndef OPENSSL_NO_SHA1
void SHA1_Init(SHA_CTX *c);
void SHA1_Update(SHA_CTX *c, const void *data, unsigned long len);
void SHA1_Final(unsigned char *md, SHA_CTX *c);