#include <stdlib.h> is not needed.
[openssl.git] / crypto / crypto.h
index 6334eab23875bbd04c70ea76cd713421aa7fc38c..8d8cb3d51e9eed22ab77ba210c75027c1c8f7c6b 100644 (file)
 #ifndef HEADER_CRYPTO_H
 #define HEADER_CRYPTO_H
 
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stdlib.h>
-
 #ifndef NO_FP_API
 #include <stdio.h>
 #endif
@@ -77,6 +71,15 @@ extern "C" {
 #include <openssl/ebcdic.h>
 #endif
 
+#if defined(VMS) || defined(__VMS)
+#include "vms_idhacks.h"
+#endif
+
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 /* Backward compatibility to SSLeay */
 /* This is more to be used to check the correct DLL is being used
  * in the MS world. */
@@ -116,7 +119,8 @@ extern "C" {
 #define        CRYPTO_LOCK_RSA_BLINDING        23
 #define        CRYPTO_LOCK_DH                  24
 #define        CRYPTO_LOCK_MALLOC2             25
-#define        CRYPTO_NUM_LOCKS                26
+#define        CRYPTO_LOCK_DSO                 26
+#define        CRYPTO_NUM_LOCKS                27
 
 #define CRYPTO_LOCK            1
 #define CRYPTO_UNLOCK          2
@@ -183,7 +187,7 @@ typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d
                                        int idx, long argl, void *argp);
 
 /* This stuff is basically class callback functions
- * The current classes are SSL_CTX, SSL, SSL_SESION, and a few more */
+ * The current classes are SSL_CTX, SSL, SSL_SESSION, and a few more */
 
 typedef struct crypto_ex_data_func_st
        {
@@ -297,20 +301,28 @@ int CRYPTO_add_lock(int *pointer,int amount,int type, const char *file,
  * call the latter last if you need different functions */
 int CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *));
 int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*free_func)(void *));
-int CRYPTO_set_mem_debug_functions(void (*m)(),void (*r)(),void (*f)(),void (*so)(),long (*go)());
+int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
+                                  void (*r)(void *,void *,int,const char *,int,int),
+                                  void (*f)(void *,int),
+                                  void (*so)(long),
+                                  long (*go)(void));
 void CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *));
 void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *));
-void CRYPTO_get_mem_debug_functions(void (**m)(),void (**r)(),void (**f)(),void (**so)(),long (**go)());
+void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int),
+                                   void (**r)(void *,void *,int,const char *,int,int),
+                                   void (**f)(void *,int),
+                                   void (**so)(long),
+                                   long (**go)(void));
 
-void *CRYPTO_malloc_locked(int num, char *file, int line);
+void *CRYPTO_malloc_locked(int num, const char *file, int line);
 void CRYPTO_free_locked(void *);
-void *CRYPTO_malloc(int num, char *file, int line);
+void *CRYPTO_malloc(int num, const char *file, int line);
 void CRYPTO_free(void *);
-void *CRYPTO_realloc(void *addr,int num, char *file, int line);
-void *CRYPTO_remalloc(void *addr,int num, char *file, int line);
+void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
+void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
 
 void CRYPTO_set_mem_debug_options(long bits);
-long CRYPTO_get_mem_debug_options();
+long CRYPTO_get_mem_debug_options(void);
 
 #define CRYPTO_push_info(info) \
         CRYPTO_push_info_(info, __FILE__, __LINE__);
@@ -336,16 +348,16 @@ void CRYPTO_dbg_free(void *addr,int before_p);
  * 3:  1 + 2
  */
 void CRYPTO_dbg_set_options(long bits);
-long CRYPTO_dbg_get_options();
+long CRYPTO_dbg_get_options(void);
 
 #ifndef NO_FP_API
 void CRYPTO_mem_leaks_fp(FILE *);
 #endif
 void CRYPTO_mem_leaks(struct bio_st *bio);
 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
-void CRYPTO_mem_leaks_cb(void (*cb)());
+void CRYPTO_mem_leaks_cb(void (*cb)(unsigned long, const char *, int, int, void *));
 
-void ERR_load_CRYPTO_strings(void );
+void ERR_load_CRYPTO_strings(void);
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
@@ -365,4 +377,3 @@ void ERR_load_CRYPTO_strings(void );
 }
 #endif
 #endif
-