# define THRIFT_READ _read
# define THRIFT_FSTAT _fstat
# define THRIFT_STAT _stat
-# define THRIFT_GAI_STRERROR gai_strerrorA
+# ifdef _WIN32_WCE
+# define THRIFT_GAI_STRERROR(...) thrift_wstr2str(gai_strerrorW(__VA_ARGS__))
+# else
+# define THRIFT_GAI_STRERROR gai_strerrorA
+# endif
# define THRIFT_SSIZET ptrdiff_t
# define THRIFT_SNPRINTF _snprintf
# define THRIFT_SLEEP_SEC thrift_sleep
}
#endif // WINVER
+#ifdef _WIN32_WCE
+std::string thrift_wstr2str(std::wstring ws) {
+ std::string s(ws.begin(), ws.end());
+ return s;
+}
+#endif
#error This is a MSVC header only.
#endif
+#ifdef _WIN32_WCE
+#include <string>
+#endif
+
// Win32
#include <Winsock2.h>
#include <thrift/transport/PlatformSocket.h>
int thrift_poll(THRIFT_POLLFD *fdArray, ULONG nfds, INT timeout);
}
+#ifdef _WIN32_WCE
+std::string thrift_wstr2str(std::wstring ws);
+#endif
+
#endif // _THRIFT_WINDOWS_FCNTL_H_
// windows
#include <Winsock2.h>
#include <ws2tcpip.h>
+#ifdef _WIN32_WCE
+#pragma comment(lib, "Ws2.lib")
+#else
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "advapi32.lib") //For security APIs in TPipeServer
-
+#endif
#endif // _THRIFT_WINDOWS_CONFIG_H_