This commit is contained in:
Alex Spataru 2024-11-11 10:47:14 -05:00
commit 0ee4f241a3
10 changed files with 66 additions and 60 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
.DS_Store
.AppleDouble
.LSOverride
.cache
# Build & IDEs
*.kdev*

View File

@ -45,7 +45,7 @@
return ossl_pqueue_num((OSSL_PQUEUE *)pq); \
} \
static ossl_unused ossl_inline int ossl_pqueue_##type##_push( \
PRIORITY_QUEUE_OF(type) * pq, ctype * data, size_t * elem) \
PRIORITY_QUEUE_OF(type) * pq, ctype * data, size_t *elem) \
{ \
return ossl_pqueue_push((OSSL_PQUEUE *)pq, (void *)data, elem); \
} \

View File

@ -285,18 +285,14 @@ extern "C" {
/* This helps with the template wrapper form of ASN1_ITEM */
#define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) \
{ \
(flags), (tag), 0, #name, ASN1_ITEM_ref(type) \
}
{(flags), (tag), 0, #name, ASN1_ITEM_ref(type)}
/* These help with SEQUENCE or CHOICE components */
/* used to declare other types */
#define ASN1_EX_TYPE(flags, tag, stname, field, type) \
{ \
(flags), (tag), offsetof(stname, field), #field, ASN1_ITEM_ref(type) \
}
{(flags), (tag), offsetof(stname, field), #field, ASN1_ITEM_ref(type)}
/* implicit and explicit helper macros */
@ -309,13 +305,9 @@ extern "C" {
/* Any defined by macros: the field used is in the table itself */
#define ASN1_ADB_OBJECT(tblname) \
{ \
ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb \
}
{ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb}
#define ASN1_ADB_INTEGER(tblname) \
{ \
ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb \
}
{ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb}
/* Plain simple type */
#define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0, 0, stname, field, type)
@ -425,10 +417,7 @@ extern "C" {
} \
void dummy_function(void)
#define ADB_ENTRY(val, template) \
{ \
val, template \
}
#define ADB_ENTRY(val, template) {val, template}
#define ASN1_ADB_TEMPLATE(name) static const ASN1_TEMPLATE name##_tt

View File

@ -669,7 +669,7 @@ size_t BIO_ctrl_wpending(BIO *b);
#define BIO_set_write_buf_size(b, size) \
(int)BIO_ctrl(b, BIO_C_SET_WRITE_BUF_SIZE, size, NULL)
#define BIO_get_write_buf_size(b, size) \
(size_t) BIO_ctrl(b, BIO_C_GET_WRITE_BUF_SIZE, size, NULL)
(size_t)BIO_ctrl(b, BIO_C_GET_WRITE_BUF_SIZE, size, NULL)
#define BIO_make_bio_pair(b1, b2) (int)BIO_ctrl(b1, BIO_C_MAKE_BIO_PAIR, 0, b2)
#define BIO_destroy_bio_pair(b) \
(int)BIO_ctrl(b, BIO_C_DESTROY_BIO_PAIR, 0, NULL)
@ -705,9 +705,9 @@ int BIO_ctrl_reset_read_request(BIO *b);
#define BIO_dgram_set_local_addr_enable(b, enable) \
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE, (enable), NULL)
#define BIO_dgram_get_effective_caps(b) \
(uint32_t) BIO_ctrl((b), BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS, 0, NULL)
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS, 0, NULL)
#define BIO_dgram_get_caps(b) \
(uint32_t) BIO_ctrl((b), BIO_CTRL_DGRAM_GET_CAPS, 0, NULL)
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_CAPS, 0, NULL)
#define BIO_dgram_set_caps(b, caps) \
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_CAPS, (long)(caps), NULL)
#define BIO_dgram_get_no_trunc(b) \

View File

@ -84,10 +84,8 @@ typedef struct
* OSSL_HPKE_SUITE myvar = OSSL_HPKE_SUITE_DEFAULT;
*/
#define OSSL_HPKE_SUITE_DEFAULT \
{ \
OSSL_HPKE_KEM_ID_X25519, OSSL_HPKE_KDF_ID_HKDF_SHA256, \
OSSL_HPKE_AEAD_ID_AES_GCM_128 \
}
{OSSL_HPKE_KEM_ID_X25519, OSSL_HPKE_KDF_ID_HKDF_SHA256, \
OSSL_HPKE_AEAD_ID_AES_GCM_128}
typedef struct ossl_hpke_ctx_st OSSL_HPKE_CTX;

View File

@ -19,17 +19,12 @@
extern "C" {
#endif
#define OSSL_PARAM_UNMODIFIED ((size_t) - 1)
#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
#define OSSL_PARAM_END \
{ \
NULL, 0, NULL, 0, 0 \
}
#define OSSL_PARAM_END {NULL, 0, NULL, 0, 0}
#define OSSL_PARAM_DEFN(key, type, addr, sz) \
{ \
(key), (type), (addr), (sz), OSSL_PARAM_UNMODIFIED \
}
{(key), (type), (addr), (sz), OSSL_PARAM_UNMODIFIED}
/* Basic parameter types without return sizes */
#define OSSL_PARAM_int(key, addr) \

View File

@ -1068,30 +1068,54 @@ struct ISSUING_DIST_POINT_st
#define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL;
#define EXT_BITSTRING(nid, table) \
{ \
nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), 0, 0, 0, 0, 0, 0, \
(X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \
(X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, NULL, NULL, table \
}
{nid, \
0, \
ASN1_ITEM_ref(ASN1_BIT_STRING), \
0, \
0, \
0, \
0, \
0, \
0, \
(X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \
(X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \
NULL, \
NULL, \
table}
#define EXT_IA5STRING(nid) \
{ \
nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), 0, 0, 0, 0, \
(X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \
(X509V3_EXT_S2I)s2i_ASN1_IA5STRING, 0, 0, 0, 0, NULL \
}
{nid, \
0, \
ASN1_ITEM_ref(ASN1_IA5STRING), \
0, \
0, \
0, \
0, \
(X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \
(X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \
0, \
0, \
0, \
0, \
NULL}
#define EXT_UTF8STRING(nid) \
{ \
nid, 0, ASN1_ITEM_ref(ASN1_UTF8STRING), 0, 0, 0, 0, \
(X509V3_EXT_I2S)i2s_ASN1_UTF8STRING, \
(X509V3_EXT_S2I)s2i_ASN1_UTF8STRING, 0, 0, 0, 0, NULL \
}
{nid, \
0, \
ASN1_ITEM_ref(ASN1_UTF8STRING), \
0, \
0, \
0, \
0, \
(X509V3_EXT_I2S)i2s_ASN1_UTF8STRING, \
(X509V3_EXT_S2I)s2i_ASN1_UTF8STRING, \
0, \
0, \
0, \
0, \
NULL}
#define EXT_END \
{ \
-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \
}
#define EXT_END {-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/* X509_PURPOSE stuff */

View File

@ -126,8 +126,8 @@ void FFTRealFixLen<LL2>::do_ifft(const DataType f[], DataType x[])
assert(FFT_LEN_L2 >= 3);
// Do the transform in several passes
DataType *s_ptr = FFTRealSelect<FFT_LEN_L2 & 1>::sel_bin(&_buffer[0], x);
DataType *d_ptr = FFTRealSelect<FFT_LEN_L2 & 1>::sel_bin(x, &_buffer[0]);
DataType *s_ptr = FFTRealSelect < FFT_LEN_L2 & 1 > ::sel_bin(&_buffer[0], x);
DataType *d_ptr = FFTRealSelect < FFT_LEN_L2 & 1 > ::sel_bin(x, &_buffer[0]);
const DataType *cos_ptr = &_trigo_data[0];
const long *br_ptr = &_br_data[0];

View File

@ -1504,8 +1504,8 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
arg2_type arg2, arg3_type arg3, arg4_type arg4, \
arg5_type arg5, arg6_type arg6, arg7_type arg7, \
arg8_type arg8, arg9_type arg9) const; \
GMOCK_INTERNAL_DEFN_##value_params private \
: GTEST_DISALLOW_ASSIGN_(gmock_Impl); \
GMOCK_INTERNAL_DEFN_##value_params private \
: GTEST_DISALLOW_ASSIGN_(gmock_Impl); \
}; \
template<typename F> \
operator ::testing::Action<F>() const \
@ -1513,8 +1513,8 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
return ::testing::Action<F>( \
new gmock_Impl<F>(GMOCK_INTERNAL_LIST_##value_params)); \
} \
GMOCK_INTERNAL_DEFN_##value_params private \
: GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params)); \
GMOCK_INTERNAL_DEFN_##value_params private \
: GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params)); \
}; \
template<GMOCK_INTERNAL_DECL_##template_params \
GMOCK_INTERNAL_DECL_TYPE_##value_params> \

View File

@ -1143,10 +1143,9 @@ INSTANTIATE_TEST_CASE_P(RangeZeroToFive, ParameterizedDerivedTest, Range(0, 5));
#endif // GTEST_HAS_PARAM_TEST
TEST(CompileTest, CombineIsDefinedOnlyWhenGtestHasParamTestIsDefined)
{
TEST(CompileTest, CombineIsDefinedOnlyWhenGtestHasParamTestIsDefined){
#if GTEST_HAS_COMBINE && !GTEST_HAS_PARAM_TEST
FAIL() << "GTEST_HAS_COMBINE is defined while GTEST_HAS_PARAM_TEST is not\n"
FAIL() << "GTEST_HAS_COMBINE is defined while GTEST_HAS_PARAM_TEST is not\n"
#endif
}