mark all block comments that need format preserving so that
[openssl.git] / crypto / crypto.h
index 3eb1c553297da6a9fe91789cad0e9d275b03a583..f5cb4c7106bc69397c7ad4abdb647359758331bf 100644 (file)
 #include <stdio.h>
 #endif
 
-/* Get FIPS renames if needed */
-#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSAPI)
-#include <openssl/fips.h>
-#endif
-
 #include <openssl/stack.h>
 #include <openssl/safestack.h>
 #include <openssl/opensslv.h>
    one way or another */
 #include <openssl/symhacks.h>
 
-/* For FIPS mode rename all OpenSSL symbols to avoid clashes with a
- * non-FIPS OpenSSL.
- */
-
-#if defined(OPENSSL_FIPSCANISTER)
-# include <openssl/fipssyms.h>
-#else
-# define __fips_constseg
-#endif
-
 #ifdef  __cplusplus
 extern "C" {
 #endif
@@ -395,6 +380,7 @@ int CRYPTO_is_mem_check_on(void);
 #define OPENSSL_malloc_locked(num) \
        CRYPTO_malloc_locked((int)num,__FILE__,__LINE__)
 #define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr)
+#define OPENSSL_MALLOC_MAX_NELEMS(type)  (((1U<<(sizeof(int)*8-1))-1)/sizeof(type))
 
 
 const char *SSLeay_version(int type);
@@ -456,10 +442,14 @@ void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
-#ifndef OPENSSL_NO_DEPRECATED
-void CRYPTO_set_id_callback(unsigned long (*func)(void));
+#ifdef OPENSSL_USE_DEPRECATED
+DECLARE_DEPRECATED(void CRYPTO_set_id_callback(unsigned long (*func)(void)));
+/*
+ * mkdef.pl cannot handle this next one so not inside DECLARE_DEPRECATED,
+ * but still inside OPENSSL_USE_DEPRECATED
+ */
 unsigned long (*CRYPTO_get_id_callback(void))(void);
-unsigned long CRYPTO_thread_id(void);
+DECLARE_DEPRECATED(unsigned long CRYPTO_thread_id(void));
 #endif
 
 const char *CRYPTO_get_lock_name(int type);
@@ -535,7 +525,8 @@ int CRYPTO_remove_all_info(void);
 void CRYPTO_dbg_malloc(void *addr,int num,const char *file,int line,int before_p);
 void CRYPTO_dbg_realloc(void *addr1,void *addr2,int num,const char *file,int line,int before_p);
 void CRYPTO_dbg_free(void *addr,int before_p);
-/* Tell the debugging code about options.  By default, the following values
+/*-
+ * Tell the debugging code about options.  By default, the following values
  * apply:
  *
  * 0:                           Clear all options.