You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 08:43:45 UTC
svn commit: r1131976 - in /incubator/mesos/trunk/src: messages.hpp
third_party/libprocess/serialization.cpp
third_party/libprocess/serialization.hpp
Author: benh
Date: Sun Jun 5 06:43:45 2011
New Revision: 1131976
URL: http://svn.apache.org/viewvc?rev=1131976&view=rev
Log:
Fixing build on Mac OS X.
Modified:
incubator/mesos/trunk/src/messages.hpp
incubator/mesos/trunk/src/third_party/libprocess/serialization.cpp
incubator/mesos/trunk/src/third_party/libprocess/serialization.hpp
Modified: incubator/mesos/trunk/src/messages.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/messages.hpp?rev=1131976&r1=1131975&r2=1131976&view=diff
==============================================================================
--- incubator/mesos/trunk/src/messages.hpp (original)
+++ incubator/mesos/trunk/src/messages.hpp Sun Jun 5 06:43:45 2011
@@ -1,6 +1,8 @@
#ifndef MESSAGES_HPP
#define MESSAGES_HPP
+#include <stdint.h>
+
#include <map>
#include <string>
#include <vector>
Modified: incubator/mesos/trunk/src/third_party/libprocess/serialization.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/third_party/libprocess/serialization.cpp?rev=1131976&r1=1131975&r2=1131976&view=diff
==============================================================================
--- incubator/mesos/trunk/src/third_party/libprocess/serialization.cpp (original)
+++ incubator/mesos/trunk/src/third_party/libprocess/serialization.cpp Sun Jun 5 06:43:45 2011
@@ -26,6 +26,19 @@ void serializer::operator & (const int64
}
+#ifdef __APPLE__
+void serializer::operator & (const intptr_t &i)
+{
+ if (sizeof(intptr_t) == sizeof(int32_t))
+ this->operator & ((int32_t &) i);
+ else if (sizeof(intptr_t) == sizeof(int64_t))
+ this->operator & ((int64_t &) i);
+ else
+ abort();
+}
+#endif
+
+
void serializer::operator & (const double &d)
{
// TODO(*): Deal with endian issues?
@@ -79,6 +92,19 @@ void deserializer::operator & (int64_t &
}
+#ifdef __APPLE__
+void deserializer::operator & (intptr_t &i)
+{
+ if (sizeof(intptr_t) == sizeof(int32_t))
+ this->operator & ((int32_t &) i);
+ else if (sizeof(intptr_t) == sizeof(int64_t))
+ this->operator & ((int64_t &) i);
+ else
+ abort();
+}
+#endif
+
+
void deserializer::operator & (double &d)
{
// TODO(*): Deal with endian issues?
Modified: incubator/mesos/trunk/src/third_party/libprocess/serialization.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/third_party/libprocess/serialization.hpp?rev=1131976&r1=1131975&r2=1131976&view=diff
==============================================================================
--- incubator/mesos/trunk/src/third_party/libprocess/serialization.hpp (original)
+++ incubator/mesos/trunk/src/third_party/libprocess/serialization.hpp Sun Jun 5 06:43:45 2011
@@ -16,6 +16,9 @@ struct serializer
void operator & (const int32_t &);
void operator & (const int64_t &);
+#ifdef __APPLE__
+ void operator & (const intptr_t &);
+#endif
void operator & (const double &);
void operator & (const size_t &);
void operator & (const std::string &);
@@ -30,6 +33,9 @@ struct deserializer
void operator & (int32_t &);
void operator & (int64_t &);
+#ifdef __APPLE__
+ void operator & (intptr_t &);
+#endif
void operator & (double &);
void operator & (size_t &);
void operator & (std::string &);