OSSL_CRYPTO_ALLOC attribute introduction proposal.
[openssl.git] / include / openssl / macros.h
index 42e35ed9d304776f8196a558b860d66a80bb2b92..1db8ad9f5635a51be9fb07dcf0a47429565ab037 100644 (file)
 #  endif
 # endif
 
+# ifndef OSSL_CRYPTO_ALLOC
+#  if defined(__GNUC__)
+#   define OSSL_CRYPTO_ALLOC __attribute__((malloc))
+#  elif defined(_MSC_VER)
+#   define OSSL_CRYPTO_ALLOC __declspec(restrict)
+#  else
+#   define OSSL_CRYPTO_ALLOC
+#  endif
+# endif
+
 #endif  /* OPENSSL_MACROS_H */