Add ptrdiff_t (pointer difference) printf length modifier
Some of existing code prints pointer differences, but without taking into account that printf length modifier required for this differs between systems. Add SC_FORMAT_LEN_PTRDIFF_T macro for this, just as we have for size_t variables. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
This commit is contained in:
parent
1479c4cb3b
commit
5877fd260d
|
@ -46,9 +46,11 @@ extern "C" {
|
|||
|
||||
#if defined(_WIN32)
|
||||
#define SC_FORMAT_LEN_SIZE_T "I"
|
||||
#define SC_FORMAT_LEN_PTRDIFF_T "I"
|
||||
#else
|
||||
/* hope SUSv3 one works */
|
||||
/* hope SUSv3 ones work */
|
||||
#define SC_FORMAT_LEN_SIZE_T "z"
|
||||
#define SC_FORMAT_LEN_PTRDIFF_T "t"
|
||||
#endif
|
||||
|
||||
#define SC_SEC_OPERATION_DECIPHER 0x0001
|
||||
|
|
Loading…
Reference in New Issue