From 32917a9c0af3d78cd32029f348bbcb6cdc48a4a9 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Tue, 24 Aug 2010 09:23:48 +0000 Subject: [PATCH 1/2] Unbreak nfc-list on windows. The 'z' format modifier is not portable. Switch to a basic int and cast the size_t to an int. --- examples/nfc-list.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/nfc-list.c b/examples/nfc-list.c index 24a2e18..9b53257 100644 --- a/examples/nfc-list.c +++ b/examples/nfc-list.c @@ -149,7 +149,7 @@ int main(int argc, const char* argv[]) // List ISO14443A targets if (nfc_initiator_list_passive_targets(pnd, NM_ISO14443A_106, anti, MAX_TARGET_COUNT, &szTargetFound )) { size_t n; - printf("%zu ISO14443A passive target(s) was found%s\n", szTargetFound, (szTargetFound==0)?".\n":":"); + printf("%d ISO14443A passive target(s) was found%s\n", (int)szTargetFound, (szTargetFound==0)?".\n":":"); for(n=0; n Date: Tue, 24 Aug 2010 09:25:53 +0000 Subject: [PATCH 2/2] Fix libnfc version in the Microsoft Windows Makefile. Also add a note to avoid forgetting it in configure.ac. --- configure.ac | 2 ++ windows/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a827da0..e938431 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,6 @@ # General init + +# /!\ Don't forget to update 'windows/Makefile' too /!\ AC_INIT(libnfc, 1.3.9, info@libnfc.org) AC_CONFIG_MACRO_DIR([m4]) diff --git a/windows/Makefile b/windows/Makefile index 5b7788c..f10274e 100644 --- a/windows/Makefile +++ b/windows/Makefile @@ -14,7 +14,7 @@ NFCOPTS= /I..\include \ /DDRIVER_ARYGON_ENABLED \ /DDRIVER_PN532_UART_ENABLED -NFCLIBOPTS=/Dnfc_EXPORTS /DPACKAGE_VERSION=\"1.3.4\" +NFCLIBOPTS=/Dnfc_EXPORTS /DPACKAGE_VERSION=\"1.3.9\" CFLAGS=$(COMMONOPTS) /WX $(NFCOPTS) CXXFLAGS=$(COMMONOPTS) /EHa $(NFCOPTS)