From 5332245664f7b82ef190f13894a4a4f4ffb15922 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 2 Aug 2024 12:12:49 +0900 Subject: [PATCH] p11-kit: Move CRYPTOKI_GNU definitions to Previously, the same fallback types are defined in and if CRYPTOKI_GNU is defined. This moves those to so they are not redefined. Signed-off-by: Daiki Ueno --- p11-kit/iter.h | 10 ---------- p11-kit/p11-kit.h | 18 +++++++++++++++--- p11-kit/uri.h | 11 ----------- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/p11-kit/iter.h b/p11-kit/iter.h index 38407d255..d4868f62f 100644 --- a/p11-kit/iter.h +++ b/p11-kit/iter.h @@ -45,16 +45,6 @@ extern "C" { #ifdef P11_KIT_FUTURE_UNSTABLE_API -/* - * If the caller is using the PKCS#11 GNU calling convention, then we cater - * to that here. - */ -#ifdef CRYPTOKI_GNU -typedef unsigned char CK_BBOOL; -typedef ck_object_handle_t CK_OBJECT_HANDLE; -typedef ck_session_handle_t CK_SESSION_HANDLE; -#endif - typedef struct p11_kit_iter P11KitIter; typedef P11KitIter p11_kit_iter; diff --git a/p11-kit/p11-kit.h b/p11-kit/p11-kit.h index aa8323eeb..4b27fbdeb 100644 --- a/p11-kit/p11-kit.h +++ b/p11-kit/p11-kit.h @@ -42,11 +42,23 @@ * to that here. */ #ifdef CRYPTOKI_GNU -typedef ck_rv_t CK_RV; +typedef ck_attribute_type_t CK_ATTRIBUTE_TYPE; typedef ck_object_handle_t CK_OBJECT_HANDLE; -typedef unsigned long int CK_ULONG; -typedef struct ck_function_list* CK_FUNCTION_LIST_PTR; +typedef ck_rv_t CK_RV; +typedef ck_session_handle_t CK_SESSION_HANDLE; +typedef ck_slot_id_t CK_SLOT_ID; +typedef struct ck_attribute *CK_ATTRIBUTE_PTR; +typedef struct ck_attribute CK_ATTRIBUTE; typedef struct ck_function_list CK_FUNCTION_LIST; +typedef struct ck_function_list* CK_FUNCTION_LIST_PTR; +typedef struct ck_info *CK_INFO_PTR; +typedef struct ck_info CK_INFO; +typedef struct ck_slot_info *CK_SLOT_INFO_PTR; +typedef struct ck_slot_info CK_SLOT_INFO; +typedef struct ck_token_info *CK_TOKEN_INFO_PTR; +typedef struct ck_token_info CK_TOKEN_INFO; +typedef unsigned char CK_BBOOL; +typedef unsigned long int CK_ULONG; #endif #include "p11-kit/deprecated.h" diff --git a/p11-kit/uri.h b/p11-kit/uri.h index d95bd00eb..d83e1ca91 100644 --- a/p11-kit/uri.h +++ b/p11-kit/uri.h @@ -79,17 +79,6 @@ typedef enum { * to that here. */ #ifdef CRYPTOKI_GNU -typedef struct ck_info CK_INFO; -typedef struct ck_info *CK_INFO_PTR; -typedef struct ck_token_info CK_TOKEN_INFO; -typedef struct ck_token_info *CK_TOKEN_INFO_PTR; -typedef ck_attribute_type_t CK_ATTRIBUTE_TYPE; -typedef struct ck_attribute CK_ATTRIBUTE; -typedef struct ck_attribute *CK_ATTRIBUTE_PTR; -typedef unsigned long int CK_ULONG; -typedef struct ck_slot_info CK_SLOT_INFO; -typedef struct ck_slot_info *CK_SLOT_INFO_PTR; -typedef ck_slot_id_t CK_SLOT_ID; typedef P11KitUriType p11_kit_uri_type_t; typedef P11KitUriResult p11_kit_uri_result_t; #endif