From 9c43e75691fa2d23b7f57c608853225c8b4c3177 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Wed, 7 Apr 2010 16:30:16 +0000 Subject: [PATCH] Redo r336. (Missed at r340) --- libnfc/bitutils.h | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/libnfc/bitutils.h b/libnfc/bitutils.h index c3e35dc..1a9eea1 100644 --- a/libnfc/bitutils.h +++ b/libnfc/bitutils.h @@ -26,20 +26,27 @@ #include -#include - /* * FIXME: There is no place for this here */ -#if defined (_WIN32) - #if defined(nfc_EXPORTS) - #define NFC_EXPORT __declspec(dllexport) - #else - #define NFC_EXPORT __declspec(dllimport) - #endif /* nfc_EXPORTS */ -#else /* defined (_WIN32) */ - #define NFC_EXPORT -#endif +#ifdef _WIN32 + /* Windows platform */ + #ifndef _WINDLL + /* CMake compilation */ + #ifdef nfc_EXPORTS + #define NFC_EXPORT __declspec(dllexport) + #else /* nfc_EXPORTS */ + #define NFC_EXPORT __declspec(dllimport) + #endif /* nfc_EXPORTS */ + #else /* _WINDLL */ + /* Manual makefile */ + #define NFC_EXPORT + #endif /* _WINDLL */ +#else /* _WIN32 */ + #define NFC_EXPORT +#endif /* _WIN32 */ + +#include byte_t oddparity(const byte_t bt); void oddparity_byte_ts(const byte_t* pbtData, const size_t szLen, byte_t* pbtPar);