Add support for memory leak checking in fips_algvs.
[openssl.git] / fips / fips_premain.c
index 165d2c5dc9741da4f7a67f8bc623c1f55e4f3c59..a7c8b78f8f716d7099c52f5a33c902ec41c7f702 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(__unix) || defined(__unix__)
+#if defined(__unix) || defined(__unix__) || defined(__vxworks) || defined(__ANDROID__)
 #include <unistd.h>
 #endif
 
 #define HMAC_SHA1_SIG "?have to make sure this string is unique"
 #endif
 
-static const unsigned char FINGERPRINT_ascii_value[40] = HMAC_SHA1_SIG;
+#if defined(_MSC_VER)
+# pragma const_seg("fipsro")
+# pragma const_seg()
+  __declspec(allocate("fipsro"))
+#endif
+static const unsigned char FINGERPRINT_ascii_value[41] = HMAC_SHA1_SIG;
 
 #define atox(c) ((c)>='a'?((c)-'a'+10):((c)>='A'?(c)-'A'+10:(c)-'0'))