2525extern "C" {
2626#endif
2727
28- # ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
29-
30- /* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
31- # define ASN1_ADB_ptr (iptr ) ((const ASN1_ADB *)(iptr))
32-
33- /* Macros for start and end of ASN1_ITEM definition */
34-
35- # define ASN1_ITEM_start (itname ) \
36- const ASN1_ITEM itname##_it = {
37-
38- # define static_ASN1_ITEM_start (itname ) \
39- static const ASN1_ITEM itname##_it = {
40-
41- # define ASN1_ITEM_end (itname ) \
42- };
43-
44- # else
45-
4628/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
47- # define ASN1_ADB_ptr (iptr ) ((const ASN1_ADB *)((iptr)()))
29+ # define ASN1_ADB_ptr (iptr ) ((const ASN1_ADB *)((iptr)()))
4830
4931/* Macros for start and end of ASN1_ITEM definition */
5032
51- # define ASN1_ITEM_start (itname ) \
33+ # define ASN1_ITEM_start (itname ) \
5234 const ASN1_ITEM * itname##_it(void) \
5335 { \
5436 static const ASN1_ITEM local_it = {
5537
56- # define static_ASN1_ITEM_start (itname ) \
38+ # define static_ASN1_ITEM_start (itname ) \
5739 static ASN1_ITEM_start(itname)
5840
59- # define ASN1_ITEM_end (itname ) \
41+ # define ASN1_ITEM_end (itname ) \
6042 }; \
6143 return &local_it; \
6244 }
6345
64- # endif
65-
6646/* Macros to aid ASN1 template writing */
6747
6848# define ASN1_ITEM_TEMPLATE (tname ) \
@@ -335,13 +315,9 @@ extern "C" {
335315
336316/* Any defined by macros: the field used is in the table itself */
337317
338- # ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
339- # define ASN1_ADB_OBJECT (tblname ) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }
340- # define ASN1_ADB_INTEGER (tblname ) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }
341- # else
342- # define ASN1_ADB_OBJECT (tblname ) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }
343- # define ASN1_ADB_INTEGER (tblname ) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }
344- # endif
318+ # define ASN1_ADB_OBJECT (tblname ) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }
319+ # define ASN1_ADB_INTEGER (tblname ) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }
320+
345321/* Plain simple type */
346322# define ASN1_SIMPLE (stname , field , type ) ASN1_EX_TYPE(0,0, stname, field, type)
347323/* Embedded simple type */
@@ -421,23 +397,7 @@ extern "C" {
421397# define ASN1_ADB (name ) \
422398 static const ASN1_ADB_TABLE name##_adbtbl[]
423399
424- # ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
425-
426- # define ASN1_ADB_END (name , flags , field , adb_cb , def , none ) \
427- ;\
428- static const ASN1_ADB name##_adb = {\
429- flags,\
430- offsetof(name, field),\
431- adb_cb,\
432- name##_adbtbl,\
433- sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\
434- def,\
435- none\
436- }
437-
438- # else
439-
440- # define ASN1_ADB_END (name , flags , field , adb_cb , def , none ) \
400+ # define ASN1_ADB_END (name , flags , field , adb_cb , def , none ) \
441401 ;\
442402 static const ASN1_ITEM *name##_adb(void) \
443403 { \
@@ -455,8 +415,6 @@ extern "C" {
455415 } \
456416 void dummy_function(void)
457417
458- # endif
459-
460418# define ADB_ENTRY (val , template ) {val, template}
461419
462420# define ASN1_ADB_TEMPLATE (name ) \
0 commit comments