compiles for windoze

This commit is contained in:
Marc Wäckerlin
2009-10-21 08:52:04 +00:00
parent 7840897598
commit 6f1bd2ae87
8 changed files with 271 additions and 169 deletions

View File

@@ -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>