crypto/dso/dso_vms.c: Better definition of DSO_MALLOC()

Now we cover all possible cases.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19529)
This commit is contained in:
Richard Levitte 2022-10-28 12:11:30 +02:00
parent 8df9f34384
commit 89d7231132

View File

@ -22,6 +22,7 @@
# include "../vms_rms.h"
/* Some compiler options may mask the declaration of "_malloc32". */
# define DSO_MALLOC OPENSSL_malloc
# if __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE
# if __INITIAL_POINTER_SIZE == 64
# pragma pointer_size save
@ -37,10 +38,9 @@ static void *dso_malloc(__size_t num, const char *file, int line)
}
return ret;
}
# undef DSO_MALLOC
# define DSO_MALLOC(num) dso_malloc((num), OPENSSL_FILE, OPENSSL_LINE)
# pragma pointer_size restore
# else /* __INITIAL_POINTER_SIZE == 64 */
# define DSO_MALLOC OPENSSL_malloc
# endif /* __INITIAL_POINTER_SIZE == 64 [else] */
# endif /* __INITIAL_POINTER_SIZE && defined
* _ANSI_C_SOURCE */