mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 23:14:53 +00:00
[XDK][PSDK] add security checks for PSDK as well
svn path=/trunk/; revision=69081
This commit is contained in:
parent
b35101db5f
commit
88cdcad1f6
|
@ -768,8 +768,13 @@ typedef struct _GROUP_AFFINITY {
|
|||
#define RTL_NUMBER_OF_V2(A) \
|
||||
(({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \
|
||||
RTL_NUMBER_OF_V1(A))
|
||||
#elif defined(__cplusplus)
|
||||
extern "C++" {
|
||||
template <typename T, size_t N>
|
||||
static char (& SAFE_RTL_NUMBER_OF(T (&)[N]))[N];
|
||||
}
|
||||
#define RTL_NUMBER_OF_V2(A) sizeof(SAFE_RTL_NUMBER_OF(A))
|
||||
#else
|
||||
/// \todo implement security checks for cplusplus / MSVC
|
||||
#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -702,8 +702,13 @@ typedef struct _GROUP_AFFINITY {
|
|||
#define RTL_NUMBER_OF_V2(A) \
|
||||
(({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \
|
||||
RTL_NUMBER_OF_V1(A))
|
||||
#elif defined(__cplusplus)
|
||||
extern "C++" {
|
||||
template <typename T, size_t N>
|
||||
static char (& SAFE_RTL_NUMBER_OF(T (&)[N]))[N];
|
||||
}
|
||||
#define RTL_NUMBER_OF_V2(A) sizeof(SAFE_RTL_NUMBER_OF(A))
|
||||
#else
|
||||
/// \todo implement security checks for cplusplus / MSVC
|
||||
#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -681,8 +681,10 @@ typedef struct _GROUP_AFFINITY {
|
|||
(({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \
|
||||
RTL_NUMBER_OF_V1(A))
|
||||
#elif defined(__cplusplus)
|
||||
extern "C++" {
|
||||
template <typename T, size_t N>
|
||||
char (& SAFE_RTL_NUMBER_OF(T (&)[N]))[N];
|
||||
static char (& SAFE_RTL_NUMBER_OF(T (&)[N]))[N];
|
||||
}
|
||||
#define RTL_NUMBER_OF_V2(A) sizeof(SAFE_RTL_NUMBER_OF(A))
|
||||
#else
|
||||
#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
|
||||
|
|
Loading…
Reference in a new issue