[pkg-opensc-commit] [opensc] 206/295: Add ptrdiff_t (pointer difference) printf length modifier
Eric Dorland
eric at moszumanska.debian.org
Sat Jun 24 21:11:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository opensc.
commit 5877fd260d19be031696103ad0cac4be39b93245
Author: Maciej S. Szmigiero <mail at maciej.szmigiero.name>
Date: Tue Aug 23 18:42:12 2016 +0200
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 at maciej.szmigiero.name>
---
src/libopensc/opensc.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/libopensc/opensc.h b/src/libopensc/opensc.h
index d7accfc..e139678 100644
--- a/src/libopensc/opensc.h
+++ b/src/libopensc/opensc.h
@@ -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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git
More information about the pkg-opensc-commit
mailing list