[zeromq-dev] Patch to build on windows
dhruva
dhruva at ymail.com
Mon Aug 3 12:40:29 CEST 2009
This is a final patch before I start exploring other areas, this fixes the unix build error caused by my previous patch (see below) and also eliminates the last warning message on windows build.
diff --git a/libzmq/api_thread.cpp b/libzmq/api_thread.cpp
index fdf8171..750157b 100644
--- a/libzmq/api_thread.cpp
+++ b/libzmq/api_thread.cpp
@@ -20,8 +20,7 @@
#include <zmq/api_thread.hpp>
#include <zmq/config.hpp>
-#ifdef _MSC_VER
-#include <stdio.h>
+#if defined(_MSC_VER) && defined(ZMQ_HAVE_RDTSC_IN_API_THREAD)
#include <intrin.h>
#pragma intrinsic(__rdtsc)
#endif
diff --git a/libzmq/zmq/platform.hpp.cmake b/libzmq/zmq/platform.hpp.cmake
index 63ab4a9..3405212 100644
--- a/libzmq/zmq/platform.hpp.cmake
+++ b/libzmq/zmq/platform.hpp.cmake
@@ -25,8 +25,10 @@
#define _WINSOCKAPI_
#define NOMINMAX
#define _CRT_SECURE_NO_WARNINGS
+#ifndef ZMQ_EXPORT
#define ZMQ_EXPORT __declspec(dllexport)
#endif
+#endif
-dhruva
----- Original Message ----
> From: dhruva <dhruva at ymail.com>
> To: Pavol Malosek <malosek at fastmq.com>; ZeroMQ <zeromq-dev at lists.zeromq.org>
> Sent: Monday, 3 August, 2009 3:41:52 PM
> Subject: Re: [zeromq-dev] Patch to build on windows
>
> Hello,
> The name is correct, thank you. A small fix over the previous patch which makes
> it correct:
>
> diff --git a/libzmq/api_thread.cpp b/libzmq/api_thread.cpp
> index fdf8171..58be20a 100644
> --- a/libzmq/api_thread.cpp
> +++ b/libzmq/api_thread.cpp
> @@ -20,8 +20,7 @@
> #include
> #include
>
> -#ifdef _MSC_VER
> -#include
> +#ifdef ZMQ_HAVE_RDTSC_IN_API_THREAD
> #include
> #pragma intrinsic(__rdtsc)
> #endif
>
>
>
> -dhruva
>
>
> ----- Original Message ----
> > From: Pavol Malosek
> > To: dhruva ; ZeroMQ
> > Sent: Monday, 3 August, 2009 3:09:50 PM
> > Subject: Re: [zeromq-dev] Patch to build on windows
> >
> > Hello Dhruva,
> >
> > Thank you for the patch, it has been committed into trunk with rev. 1603.
> > I have added your name Dhruva Krishnamurthy (correct me if it is wrong) into
> > AUTHORS file - contributors section.
> >
> > Thanks!
> >
> > malo
> >
> >
> > ----- Original Message ----- From: "dhruva"
> > To: "ZeroMQ"
> > Sent: Monday, July 27, 2009 1:32 AM
> > Subject: [zeromq-dev] Patch to build on windows
> >
> >
> > Hi,
> >
> > When I try to build on windows using MSVC 2005 (will happen with other
> versions
> > too), I get errors in building the server with respect to XMLnode not being
> > explorted by zmq.dll. As part of fixing it, I fixed all macro redefinition
> > warnings too. So, we now have a clean build on all targets in windows
> > environment.
> >
> > -dhruva
> >
> > For records (not sure if this is required though):
> > Any patch I submit can be used under MIT license (or anything found more
> > liberal)
>
>
>
> See the Web's breaking stories, chosen by people like you. Check out
> Yahoo! Buzz. http://in.buzz.yahoo.com/
Looking for local information? Find it on Yahoo! Local http://in.local.yahoo.com/
More information about the zeromq-dev
mailing list