[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [pkcs11] CK_ULONG considered harmful?
> In the current version of the spec, the definition for CK_ULONG and CK_LONG are "integers at least 32 bits wide". > Given this spec is at least in part an interface spec, there can be an issue where the client uses a CK_ULONG of 32 bits and the driver uses a CK_ULONG of 64 bits (for example) or vice versa. The text in the section says: Hi Michael I was pretty vocal at the face to face about thinking this is inherently broken. The problem is that changing this value is potentially going to break everything out there. I think stdint.h is a good example of this as a larger problem and the fact that something was finally done about it. > 2) "Clarify" the language and force things to 32 bits. > Change the base definitions (page 11, section 2 of the 2.40 draft) to: > > typedef uint32_t CK_ULONG; > typedef int_32_t CK_LONG; > typedef uint8_t CK_BYTE; I think this is reasonable for 2.4, but I would like to see CK_(U)LONG move to uint64_t for >= 3.x --Chris
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]