summaryrefslogtreecommitdiffstats
path: root/crypto/crypto.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-05-02 13:36:50 +0000
committerRichard Levitte <levitte@openssl.org>2000-05-02 13:36:50 +0000
commit65962686758eda5e4eea9852306d91d17502bd1e (patch)
tree50a5df4a61f7c455b4c5fe9518e4fd8476059b0b /crypto/crypto.h
parentb50e1bd3c3f0b8331b616a10bbc1fc20ea866d07 (diff)
In Message-ID: <003201bfb332$14a07520$0801a8c0@janm.transactionsite.com>,
"Jan Mikkelsen" <janm@transactionsite.com> correctly states that the OpenSSL header files have #include's and extern "C"'s in an incorrect order. Thusly fixed. Also, make the memory debugging routines defined and declared with prototypes, and use void* instead of char* for memory blobs. And last of all, redo the ugly callback construct for elegance and better definition (with prototypes).
Diffstat (limited to 'crypto/crypto.h')
-rw-r--r--crypto/crypto.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/crypto/crypto.h b/crypto/crypto.h
index 7ea6a756d4..32f02afe93 100644
--- a/crypto/crypto.h
+++ b/crypto/crypto.h
@@ -59,10 +59,6 @@
#ifndef HEADER_CRYPTO_H
#define HEADER_CRYPTO_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stdlib.h>
#ifndef NO_FP_API
@@ -82,6 +78,10 @@ extern "C" {
#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. */
@@ -303,10 +303,18 @@ 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, const char *file, int line);
void CRYPTO_free_locked(void *);