Make sure we get the definition of OPENSSL_NO_FP_API.
[openssl.git] / crypto / crypto.h
index f87262f517ec4140d5d81334c67d60ad982e4c3f..0f15a565444bbb268ecf05099458c302310983ef 100644 (file)
@@ -1,6 +1,6 @@
 /* crypto/crypto.h */
 /* ====================================================================
- * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1998-2003 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #include <stdlib.h>
 
+#include <openssl/e_os2.h>
+
 #ifndef OPENSSL_NO_FP_API
 #include <stdio.h>
 #endif
@@ -189,7 +191,8 @@ extern "C" {
 #define CRYPTO_LOCK_EC                 33
 #define CRYPTO_LOCK_ECDH               34
 #define CRYPTO_LOCK_BN                 35
-#define CRYPTO_NUM_LOCKS               36
+#define CRYPTO_LOCK_EC_PRE_COMP                36
+#define CRYPTO_NUM_LOCKS               37
 
 #define CRYPTO_LOCK            1
 #define CRYPTO_UNLOCK          2
@@ -298,6 +301,7 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
 #define CRYPTO_EX_INDEX_UI             11
 #define CRYPTO_EX_INDEX_ECDSA          12
 #define CRYPTO_EX_INDEX_ECDH           13
+#define CRYPTO_EX_INDEX_COMP           14
 
 /* Dynamically assigned indexes start from this value (don't use directly, use
  * via CRYPTO_ex_data_new_class). */
@@ -343,6 +347,8 @@ int CRYPTO_is_mem_check_on(void);
 #define OPENSSL_malloc(num)    CRYPTO_malloc((int)num,__FILE__,__LINE__)
 #define OPENSSL_realloc(addr,num) \
        CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)
+#define OPENSSL_realloc_clean(addr,old_num,num) \
+       CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__)
 #define OPENSSL_remalloc(addr,num) \
        CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)
 #define OPENSSL_freeFunc       CRYPTO_free
@@ -445,8 +451,12 @@ void CRYPTO_free_locked(void *);
 void *CRYPTO_malloc(int num, const char *file, int line);
 void CRYPTO_free(void *);
 void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
+void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file,
+                          int line);
 void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
 
+void OPENSSL_cleanse(void *ptr, size_t len);
+
 void CRYPTO_set_mem_debug_options(long bits);
 long CRYPTO_get_mem_debug_options(void);
 
@@ -487,6 +497,9 @@ void CRYPTO_mem_leaks(struct bio_st *bio);
 typedef void *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *);
 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
 
+/* die if we have to */
+void OpenSSLDie(const char *file,int line,const char *assertion);
+#define OPENSSL_assert(e)      ((e) ? (void)0 : OpenSSLDie(__FILE__, __LINE__, #e))
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes