From 41d79bc19eb4b53c6e6c7ea0477a1607ff0b59a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Tue, 19 Feb 2013 16:49:23 +0100 Subject: [PATCH] Windows CE support : using standard _WIN32_WCE flag instead of WINCE - when compiling for Windows CE, a C++ project must define the preprocessor definitions: UNDER_CE=$(CEVersion),_WIN32_WCE=$(CEVersion) - choosing the "_WIN32_CE" form for uniformization with "_WIN32" and "_WIN32_WINNT" already used in libzmq (boost is using both forms) - see http://msdn.microsoft.com/en-us/library/ee479161(v=winembedded.60).aspx --- builds/msvc/errno.cpp | 2 +- include/zmq.h | 2 +- src/clock.cpp | 2 +- src/err.cpp | 2 +- src/err.hpp | 2 +- src/socket_base.cpp | 2 +- src/thread.cpp | 2 +- src/windows.hpp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/builds/msvc/errno.cpp b/builds/msvc/errno.cpp index bf386371..ddfe59ff 100644 --- a/builds/msvc/errno.cpp +++ b/builds/msvc/errno.cpp @@ -1,4 +1,4 @@ -#if defined WINCE +#if defined _WIN32_WCE //#include "..\..\include\zmq.h" #include "..\..\src\err.hpp" diff --git a/include/zmq.h b/include/zmq.h index b9f194ea..9f7093f2 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -27,7 +27,7 @@ extern "C" { #endif -#if !defined WINCE +#if !defined _WIN32_WCE #include #endif #include diff --git a/src/clock.cpp b/src/clock.cpp index 1646397c..3ef01021 100644 --- a/src/clock.cpp +++ b/src/clock.cpp @@ -27,7 +27,7 @@ #include #if defined _MSC_VER -#if defined WINCE +#if defined _WIN32_WCE #include #else #include diff --git a/src/err.cpp b/src/err.cpp index 5aecd544..23662884 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -203,7 +203,7 @@ const char *zmq::wsa_error_no (int no_) void zmq::win_error (char *buffer_, size_t buffer_size_) { DWORD errcode = GetLastError (); -#if defined WINCE +#if defined _WIN32_WCE DWORD rc = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)buffer_, buffer_size_ / sizeof(wchar_t), NULL ); diff --git a/src/err.hpp b/src/err.hpp index 7e27c823..81c95410 100644 --- a/src/err.hpp +++ b/src/err.hpp @@ -26,7 +26,7 @@ #include "../include/zmq.h" #include -#if defined WINCE +#if defined _WIN32_WCE #include "..\builds\msvc\errno.hpp" #else #include diff --git a/src/socket_base.cpp b/src/socket_base.cpp index bfcdd383..3317ad12 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -29,7 +29,7 @@ #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #if defined _MSC_VER -#if defined WINCE +#if defined _WIN32_WCE #include #else #include diff --git a/src/thread.cpp b/src/thread.cpp index cc1964a4..8fe9016f 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -43,7 +43,7 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_) { tfn = tfn_; arg =arg_; -#if defined WINCE +#if defined _WIN32_WCE descriptor = (HANDLE) CreateThread (NULL, 0, &::thread_routine, this, 0 , NULL); #else diff --git a/src/windows.hpp b/src/windows.hpp index 4a3124eb..d89a9a84 100644 --- a/src/windows.hpp +++ b/src/windows.hpp @@ -170,7 +170,7 @@ #include #include -#if !defined WINCE +#if !defined _WIN32_WCE #include #endif