Skip to content

Commit c5e7386

Browse files
steven-bellockjyao1
authored andcommitted
Remove LIBSPDM_OPENSSL_STDINT_WORKAROUND
Fix #3383. Signed-off-by: Steven Bellock <sbellock@nvidia.com>
1 parent 2e699c6 commit c5e7386

File tree

1 file changed

+3
-35
lines changed

1 file changed

+3
-35
lines changed

include/hal/base.h

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,17 @@
11
/**
22
* Copyright Notice:
3-
* Copyright 2021-2024 DMTF. All rights reserved.
3+
* Copyright 2021-2025 DMTF. All rights reserved.
44
* License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
55
**/
66

77
#ifndef BASE_H
88
#define BASE_H
99

1010
#ifndef LIBSPDM_STDINT_ALT
11-
1211
#include <stdint.h>
13-
14-
/* LIBSPDM_OPENSSL_STDINT_WORKAROUND */
15-
16-
/* This is a workaround for OpenSSL compilation problems when used with <stdint.h>
17-
* on Windows platforms built with Visual Studio. Including <stdint.h> pulls in
18-
* <vcruntime.h>, which causes the type size_t to be defined. The size_t type
19-
* depends on if _WIN32 or _WIN64 is defined. The default if neither is defined
20-
* is the 32-bit version of size_t. */
21-
22-
/* Our OpenSSL compilation requires _WIN32 and _WIN64 to NOT be defined.
23-
* This will force the <vcruntime.h> to use the wrong 32-bit definition of size_t
24-
* if we are compiling as 64-bit. This 32-bit definition then does not agree with
25-
* the 64-bit definition defined in libspdm and generates compile errors. */
26-
27-
/* To workaround this issue, LIBSPDM_OPENSSL_STDINT_WORKAROUND was created
28-
* that is only defined for compilation via the makefile of the OpenSSL library
29-
* portion of libspdm. */
30-
31-
/* This will lead to _WIN32 and _WIN64 to be NOT defined when reaching the OpenSSL
32-
* portions of a compilation unit (header files + c file), thus meeting the
33-
* no Win32/Win64 requirement for OpenSSL, but will still be defined when compiling
34-
* the <vcruntime.h> file in the compilation unit (and getting the right size_t). */
35-
36-
/* In the future libspdm intends to use the Windows native compilation flags and defines,
37-
* in place of the UEFI profile / personality. */
38-
39-
#ifdef LIBSPDM_OPENSSL_STDINT_WORKAROUND
40-
#undef _WIN32
41-
#undef _WIN64
42-
#endif
43-
44-
#else /* LIBSPDM_STDINT_ALT */
12+
#else
4513
#include LIBSPDM_STDINT_ALT
46-
#endif /* LIBSPDM_STDINT_ALT */
14+
#endif
4715

4816
#ifndef LIBSPDM_STDBOOL_ALT
4917
#include <stdbool.h>

0 commit comments

Comments
 (0)