Fix PCSC compilation under windows
PR3843 based on release-v0.12 => rebased on master
This commit is contained in:
@@ -48,6 +48,15 @@ namespace hw {
|
||||
/* ===================================================================== */
|
||||
/* === Debug ==== */
|
||||
/* ===================================================================== */
|
||||
#ifdef WIN32
|
||||
static char *pcsc_stringify_error(LONG rv) {
|
||||
static __thread char out[20];
|
||||
sprintf_s(out, sizeof(out), "0x%08lX", rv);
|
||||
|
||||
return out;
|
||||
}
|
||||
#endif
|
||||
|
||||
void set_apdu_verbose(bool verbose) {
|
||||
apdu_verbose = verbose;
|
||||
}
|
||||
|
||||
@@ -33,8 +33,13 @@
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include "device.hpp"
|
||||
#ifdef WIN32
|
||||
#include <winscard.h>
|
||||
#define MAX_ATR_SIZE 33
|
||||
#else
|
||||
#include <PCSC/winscard.h>
|
||||
#include <PCSC/wintypes.h>
|
||||
#endif
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/recursive_mutex.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user