compiles for windoze
This commit is contained in:
27
src/pcsc.hxx
27
src/pcsc.hxx
@@ -34,20 +34,29 @@
|
||||
#include <string>
|
||||
|
||||
#ifdef WIN32
|
||||
#undef UNICODE
|
||||
#include <WinSCard.h>
|
||||
#undef ERROR
|
||||
#ifndef MAX_ATR_SIZE
|
||||
#define MAX_ATR_SIZE 33
|
||||
#endif
|
||||
namespace pcsc {
|
||||
//! stupid windows needs std::wstring
|
||||
inline std::wstring strconv(std::string s) {
|
||||
return std::wstring(s.begin(), s.end());
|
||||
}
|
||||
inline std::string strconv(std::wstring s) {
|
||||
return std::string(s.begin(), s.end());
|
||||
}
|
||||
typedef wchar_t char_t;
|
||||
typedef std::wstring string;
|
||||
#ifdef UNICODE
|
||||
inline std::wstring strconv(std::string s) {
|
||||
return std::wstring(s.begin(), s.end());
|
||||
}
|
||||
inline std::string strconv(std::wstring s) {
|
||||
return std::string(s.begin(), s.end());
|
||||
}
|
||||
typedef wchar_t char_t;
|
||||
typedef std::wstring string;
|
||||
#else
|
||||
inline const std::string& strconv(const std::string& s) {
|
||||
return s;
|
||||
}
|
||||
typedef char char_t;
|
||||
typedef std::string string;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#include <PCSC/pcsclite.h>
|
||||
|
Reference in New Issue
Block a user