summaryrefslogtreecommitdiffstats
path: root/crypto/mem.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-08-03 21:22:34 +0200
committerRichard Levitte <levitte@openssl.org>2016-08-19 14:41:07 +0200
commit556c4b51d5a1e48788fb6a64578cca52355cf0c8 (patch)
treec7e765b519b3799c3b10a2f32126bc9af1fe3144 /crypto/mem.c
parentc78a34f4750b7a35c02033cb50879152d230a192 (diff)
VSI submission: avoid pointer size warnings in mem.c
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/mem.c')
-rw-r--r--crypto/mem.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index 1e873e3428..9c45135529 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -82,6 +82,14 @@ static void *default_malloc_ex(size_t num, const char *file, int line)
static void *(*malloc_ex_func) (size_t, const char *file, int line)
= default_malloc_ex;
+#ifdef OPENSSL_SYS_VMS
+# if __INITIAL_POINTER_SIZE == 64
+# define realloc _realloc64
+# else
+# define realloc _realloc32
+# endif
+#endif
+
static void *(*realloc_func) (void *, size_t) = realloc;
static void *default_realloc_ex(void *str, size_t num,
const char *file, int line)
@@ -92,7 +100,11 @@ static void *default_realloc_ex(void *str, size_t num,
static void *(*realloc_ex_func) (void *, size_t, const char *file, int line)
= default_realloc_ex;
-static void (*free_func) (void *) = free;
+#ifdef OPENSSL_SYS_VMS
+ static void (*free_func) (__void_ptr64) = free;
+#else
+ static void (*free_func) (void *) = free;
+#endif
static void *(*malloc_locked_func) (size_t) = malloc;
static void *default_malloc_locked_ex(size_t num, const char *file, int line)
@@ -103,7 +115,11 @@ static void *default_malloc_locked_ex(size_t num, const char *file, int line)
static void *(*malloc_locked_ex_func) (size_t, const char *file, int line)
= default_malloc_locked_ex;
-static void (*free_locked_func) (void *) = free;
+#ifdef OPENSSL_SYS_VMS
+ static void (*free_locked_func) (__void_ptr64) = free;
+#else
+ static void (*free_locked_func) (void *) = free;
+#endif
/* may be changed as long as 'allow_customize_debug' is set */
/* XXX use correct function pointer types */