mirror of https://github.com/apache/activemq.git
patched the #ifdef stuff to work nicely on OS X - not sure why defined(unix) is false
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418786 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8a960016ed
commit
96f78a2c08
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(unix) && !defined(__CYGWIN__)
|
#if (defined(unix) || defined(__APPLE__)) && !defined(__CYGWIN__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
using namespace activemq::network;
|
using namespace activemq::network;
|
||||||
|
|
||||||
#if !defined( unix ) || defined( __CYGWIN__ )
|
#if !(defined( unix ) || defined(__APPLE__)) || defined( __CYGWIN__ )
|
||||||
|
|
||||||
// Static socket initializer needed for winsock
|
// Static socket initializer needed for winsock
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ ServerSocket::ServerSocket()
|
||||||
{
|
{
|
||||||
socketHandle = Socket::INVALID_SOCKET_HANDLE;
|
socketHandle = Socket::INVALID_SOCKET_HANDLE;
|
||||||
|
|
||||||
#if !defined( unix ) || defined( __CYGWIN__ )
|
#if !(defined( unix ) || defined(__APPLE__)) || defined( __CYGWIN__ )
|
||||||
if (ServerSocket::staticSocketInitializer.getSocketInitError() != NULL) {
|
if (ServerSocket::staticSocketInitializer.getSocketInitError() != NULL) {
|
||||||
throw *ServerSocket::staticSocketInitializer.getSocketInitError();
|
throw *ServerSocket::staticSocketInitializer.getSocketInitError();
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ void ServerSocket::close() throw (cms::CMSException){
|
||||||
|
|
||||||
if (isBound()) {
|
if (isBound()) {
|
||||||
|
|
||||||
#if defined(unix) && !defined(__CYGWIN__)
|
#if (defined(unix) || defined(__APPLE__)) && !defined(__CYGWIN__)
|
||||||
::close(socketHandle);
|
::close(socketHandle);
|
||||||
#else
|
#else
|
||||||
::closesocket(socketHandle);
|
::closesocket(socketHandle);
|
||||||
|
@ -186,7 +186,7 @@ Socket* ServerSocket::accept () throw (SocketException)
|
||||||
{
|
{
|
||||||
struct sockaddr_in temp;
|
struct sockaddr_in temp;
|
||||||
|
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
socklen_t temp_len = sizeof (sockaddr_in);
|
socklen_t temp_len = sizeof (sockaddr_in);
|
||||||
#else
|
#else
|
||||||
int temp_len = sizeof (sockaddr_in);
|
int temp_len = sizeof (sockaddr_in);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <activemq/io/OutputStream.h>
|
#include <activemq/io/OutputStream.h>
|
||||||
#include <cms/Closeable.h>
|
#include <cms/Closeable.h>
|
||||||
|
|
||||||
#if !defined( unix ) || defined( __CYGWIN__ )
|
#if !(defined( unix ) || defined(__APPLE__)) || defined( __CYGWIN__ )
|
||||||
#include <Winsock2.h> // SOCKET
|
#include <Winsock2.h> // SOCKET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace network{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Define the SocketHandle type.
|
// Define the SocketHandle type.
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if defined( unix ) || defined(__APPLE__) && !defined( __CYGWIN__ )
|
||||||
typedef int SocketHandle;
|
typedef int SocketHandle;
|
||||||
#else
|
#else
|
||||||
typedef SOCKET SocketHandle;
|
typedef SOCKET SocketHandle;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(unix) && !defined(__CYGWIN__)
|
#if (defined(unix) || defined(__APPLE__)) && !defined(__CYGWIN__)
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -50,7 +50,7 @@ SocketInputStream::~SocketInputStream()
|
||||||
int SocketInputStream::available() const{
|
int SocketInputStream::available() const{
|
||||||
|
|
||||||
|
|
||||||
#if defined(unix) && !defined(__CYGWIN__)
|
#if (defined(unix) || defined(__APPLE__)) && !defined(__CYGWIN__)
|
||||||
|
|
||||||
// Poll the socket for input.
|
// Poll the socket for input.
|
||||||
pollfd fd;
|
pollfd fd;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(unix) && !defined(__CYGWIN__)
|
#if (defined(unix) || defined(__APPLE__)) && !defined(__CYGWIN__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -46,7 +46,7 @@ using namespace activemq::network;
|
||||||
using namespace activemq::io;
|
using namespace activemq::io;
|
||||||
|
|
||||||
|
|
||||||
#if !defined( unix ) || defined( __CYGWIN__ )
|
#if !(defined( unix ) || defined(__APPLE__)) || defined( __CYGWIN__ )
|
||||||
|
|
||||||
// Static socket initializer needed for winsock
|
// Static socket initializer needed for winsock
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ TcpSocket::TcpSocket() {
|
||||||
inputStream = NULL;
|
inputStream = NULL;
|
||||||
outputStream = NULL;
|
outputStream = NULL;
|
||||||
|
|
||||||
#if !defined( unix ) || defined( __CYGWIN__ )
|
#if !(defined( unix ) || defined(__APPLE__)) || defined( __CYGWIN__ )
|
||||||
if (staticSocketInitializer.getSocketInitError() != NULL) {
|
if (staticSocketInitializer.getSocketInitError() != NULL) {
|
||||||
throw *staticSocketInitializer.getSocketInitError();
|
throw *staticSocketInitializer.getSocketInitError();
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ void TcpSocket::close() throw( cms::CMSException )
|
||||||
|
|
||||||
::shutdown(socketHandle, 2);
|
::shutdown(socketHandle, 2);
|
||||||
|
|
||||||
#if defined(unix) && !defined(__CYGWIN__)
|
#if (defined(unix) || defined(__APPLE__)) && !defined(__CYGWIN__)
|
||||||
::close(socketHandle);
|
::close(socketHandle);
|
||||||
#else
|
#else
|
||||||
::closesocket(socketHandle);
|
::closesocket(socketHandle);
|
||||||
|
@ -286,7 +286,7 @@ void TcpSocket::setSendBufferSize( const int size ) throw(SocketException){
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void TcpSocket::setSoTimeout ( const int millisecs ) throw (SocketException)
|
void TcpSocket::setSoTimeout ( const int millisecs ) throw (SocketException)
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
timeval timot;
|
timeval timot;
|
||||||
timot.tv_sec = millisecs / 1000;
|
timot.tv_sec = millisecs / 1000;
|
||||||
timot.tv_usec = (millisecs % 1000) * 1000;
|
timot.tv_usec = (millisecs % 1000) * 1000;
|
||||||
|
@ -301,7 +301,7 @@ void TcpSocket::setSoTimeout ( const int millisecs ) throw (SocketException)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int TcpSocket::getSoTimeout() const throw(SocketException)
|
int TcpSocket::getSoTimeout() const throw(SocketException)
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
timeval timot;
|
timeval timot;
|
||||||
timot.tv_sec = 0;
|
timot.tv_sec = 0;
|
||||||
timot.tv_usec = 0;
|
timot.tv_usec = 0;
|
||||||
|
@ -313,7 +313,7 @@ int TcpSocket::getSoTimeout() const throw(SocketException)
|
||||||
|
|
||||||
::getsockopt(socketHandle, SOL_SOCKET, SO_RCVTIMEO, (char*) &timot, &size);
|
::getsockopt(socketHandle, SOL_SOCKET, SO_RCVTIMEO, (char*) &timot, &size);
|
||||||
|
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
return (timot.tv_sec * 1000) + (timot.tv_usec / 1000);
|
return (timot.tv_sec * 1000) + (timot.tv_usec / 1000);
|
||||||
#else
|
#else
|
||||||
return timot;
|
return timot;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef ACTIVEMQ_UTIL_ENDIAN_H
|
#ifndef ACTIVEMQ_UTIL_ENDIAN_H
|
||||||
#define ACTIVEMQ_UTIL_ENDIAN_H
|
#define ACTIVEMQ_UTIL_ENDIAN_H
|
||||||
|
|
||||||
#ifdef unix
|
#if defined( unix ) || defined(__APPLE__)
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#else
|
#else
|
||||||
#include <Winsock2.h>
|
#include <Winsock2.h>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// First try - check __BYTE_ORDER macro
|
// First try - check __BYTE_ORDER macro
|
||||||
#if !defined IFR_IS_BIG_ENDIAN && !defined IFR_IS_LITTLE_ENDIAN && !defined IFR_IS_DPD_ENDIAN
|
#if !defined IFR_IS_BIG_ENDIAN && !defined IFR_IS_LITTLE_ENDIAN && !defined IFR_IS_DPD_ENDIAN
|
||||||
# ifdef unix
|
# if defined( unix ) || defined(__APPLE__)
|
||||||
# include <sys/param.h> // defines __BYTE_ORDER (or sometimes __LITTLE_ENDIAN or __BIG_ENDIAN or __PDP_ENDIAN)
|
# include <sys/param.h> // defines __BYTE_ORDER (or sometimes __LITTLE_ENDIAN or __BIG_ENDIAN or __PDP_ENDIAN)
|
||||||
# endif
|
# endif
|
||||||
# if defined (__GLIBC__)
|
# if defined (__GLIBC__)
|
||||||
|
|
|
@ -25,7 +25,7 @@ using namespace std;
|
||||||
Guid::Guid(void)
|
Guid::Guid(void)
|
||||||
{
|
{
|
||||||
// Clear internal uuid, would pass isNull
|
// Clear internal uuid, would pass isNull
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
memset(&uuid, 0, sizeof(uuid_t));
|
memset(&uuid, 0, sizeof(uuid_t));
|
||||||
#else
|
#else
|
||||||
::UuidCreateNil(&uuid);
|
::UuidCreateNil(&uuid);
|
||||||
|
@ -62,7 +62,7 @@ Guid::~Guid(void)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Guid::isNull(void) const
|
bool Guid::isNull(void) const
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// Check the uuid APIs is null method
|
// Check the uuid APIs is null method
|
||||||
return uuid_is_null(*(const_cast<uuid_t*>(&uuid))) == 1 ? true : false;
|
return uuid_is_null(*(const_cast<uuid_t*>(&uuid))) == 1 ? true : false;
|
||||||
#else
|
#else
|
||||||
|
@ -77,7 +77,7 @@ bool Guid::isNull(void) const
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Guid::setNull(void)
|
void Guid::setNull(void)
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// use the uuid function to clear
|
// use the uuid function to clear
|
||||||
uuid_clear(uuid);
|
uuid_clear(uuid);
|
||||||
#else
|
#else
|
||||||
|
@ -88,7 +88,7 @@ void Guid::setNull(void)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Guid& Guid::createGUID(void) throw( RuntimeException )
|
Guid& Guid::createGUID(void) throw( RuntimeException )
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// Use the uuid_generate method to create a new GUID
|
// Use the uuid_generate method to create a new GUID
|
||||||
uuid_generate(uuid);
|
uuid_generate(uuid);
|
||||||
#else
|
#else
|
||||||
|
@ -111,7 +111,7 @@ std::string Guid::toString(void) const throw( RuntimeException )
|
||||||
{
|
{
|
||||||
std::string uuid_str = "";
|
std::string uuid_str = "";
|
||||||
|
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// Create storage for the string buffer
|
// Create storage for the string buffer
|
||||||
char buffer[36] = {0};
|
char buffer[36] = {0};
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ const unsigned char* Guid::toBytes(void) const
|
||||||
unsigned char* buffer = new unsigned char[getRawBytesSize()];
|
unsigned char* buffer = new unsigned char[getRawBytesSize()];
|
||||||
|
|
||||||
// copy our buffer
|
// copy our buffer
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
uuid_copy(buffer, *(const_cast<uuid_t*>(&uuid)));
|
uuid_copy(buffer, *(const_cast<uuid_t*>(&uuid)));
|
||||||
#else
|
#else
|
||||||
memcpy(buffer, &uuid, getRawBytesSize());
|
memcpy(buffer, &uuid, getRawBytesSize());
|
||||||
|
@ -177,7 +177,7 @@ Guid& Guid::fromBytes(const unsigned char* bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the data
|
// Copy the data
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
memcpy(uuid, bytes, getRawBytesSize());
|
memcpy(uuid, bytes, getRawBytesSize());
|
||||||
#else
|
#else
|
||||||
memcpy(&uuid, bytes, getRawBytesSize());
|
memcpy(&uuid, bytes, getRawBytesSize());
|
||||||
|
@ -189,7 +189,7 @@ Guid& Guid::fromBytes(const unsigned char* bytes)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int Guid::getRawBytesSize(void) const
|
int Guid::getRawBytesSize(void) const
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
return sizeof(uuid_t);
|
return sizeof(uuid_t);
|
||||||
#else
|
#else
|
||||||
return sizeof(::GUID);
|
return sizeof(::GUID);
|
||||||
|
@ -199,7 +199,7 @@ int Guid::getRawBytesSize(void) const
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Guid::operator const unsigned char*() const
|
Guid::operator const unsigned char*() const
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
return &uuid[0];
|
return &uuid[0];
|
||||||
#else
|
#else
|
||||||
return reinterpret_cast<const unsigned char*>(&uuid);
|
return reinterpret_cast<const unsigned char*>(&uuid);
|
||||||
|
@ -210,7 +210,7 @@ Guid::operator const unsigned char*() const
|
||||||
Guid& Guid::operator=(const Guid& source)
|
Guid& Guid::operator=(const Guid& source)
|
||||||
throw ( IllegalArgumentException )
|
throw ( IllegalArgumentException )
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// Use the uuid method to copy
|
// Use the uuid method to copy
|
||||||
uuid_copy(uuid, *(const_cast<uuid_t*>(&source.uuid)));
|
uuid_copy(uuid, *(const_cast<uuid_t*>(&source.uuid)));
|
||||||
#else
|
#else
|
||||||
|
@ -225,7 +225,7 @@ Guid& Guid::operator=(const Guid& source)
|
||||||
Guid& Guid::operator=(const std::string& source)
|
Guid& Guid::operator=(const std::string& source)
|
||||||
throw ( IllegalArgumentException )
|
throw ( IllegalArgumentException )
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// Parse a uuid from the passed in string
|
// Parse a uuid from the passed in string
|
||||||
uuid_parse( const_cast<char*>(source.c_str()), uuid );
|
uuid_parse( const_cast<char*>(source.c_str()), uuid );
|
||||||
#else
|
#else
|
||||||
|
@ -253,7 +253,7 @@ Guid& Guid::operator=(const std::string& source)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Guid::operator==(const Guid& source) const
|
bool Guid::operator==(const Guid& source) const
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// uuid_compare returns 0 for equal
|
// uuid_compare returns 0 for equal
|
||||||
return uuid_compare(
|
return uuid_compare(
|
||||||
*(const_cast<uuid_t*>(&uuid)),
|
*(const_cast<uuid_t*>(&uuid)),
|
||||||
|
@ -291,7 +291,7 @@ bool Guid::operator!=(const std::string& source) const
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Guid::operator<(const Guid& source) const
|
bool Guid::operator<(const Guid& source) const
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// uuid_compare returns 0 for equal
|
// uuid_compare returns 0 for equal
|
||||||
return uuid_compare(
|
return uuid_compare(
|
||||||
*(const_cast<uuid_t*>(&uuid)),
|
*(const_cast<uuid_t*>(&uuid)),
|
||||||
|
@ -317,7 +317,7 @@ bool Guid::operator<(const std::string& source) const
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Guid::operator<=(const Guid& source) const
|
bool Guid::operator<=(const Guid& source) const
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// uuid_compare returns 0 for equal
|
// uuid_compare returns 0 for equal
|
||||||
return uuid_compare(
|
return uuid_compare(
|
||||||
*(const_cast<uuid_t*>(&uuid)),
|
*(const_cast<uuid_t*>(&uuid)),
|
||||||
|
@ -343,7 +343,7 @@ bool Guid::operator<=(const std::string& source) const
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Guid::operator>(const Guid& source) const
|
bool Guid::operator>(const Guid& source) const
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// uuid_compare returns 0 for equal
|
// uuid_compare returns 0 for equal
|
||||||
return uuid_compare(
|
return uuid_compare(
|
||||||
*(const_cast<uuid_t*>(&uuid)),
|
*(const_cast<uuid_t*>(&uuid)),
|
||||||
|
@ -369,7 +369,7 @@ bool Guid::operator>(const std::string& source) const
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Guid::operator>=(const Guid& source) const
|
bool Guid::operator>=(const Guid& source) const
|
||||||
{
|
{
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if (defined( unix ) || defined(__APPLE__)) && !defined( __CYGWIN__ )
|
||||||
// uuid_compare returns 0 for equal
|
// uuid_compare returns 0 for equal
|
||||||
return uuid_compare(
|
return uuid_compare(
|
||||||
*(const_cast<uuid_t*>(&uuid)),
|
*(const_cast<uuid_t*>(&uuid)),
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef ACTIVEMQ_UTIL_GUID_H
|
#ifndef ACTIVEMQ_UTIL_GUID_H
|
||||||
#define ACTIVEMQ_UTIL_GUID_H
|
#define ACTIVEMQ_UTIL_GUID_H
|
||||||
|
|
||||||
#if defined( unix ) && !defined( __CYGWIN__ )
|
#if defined( unix ) || defined(__APPLE__) && !defined( __CYGWIN__ )
|
||||||
#include <uuid/uuid.h>
|
#include <uuid/uuid.h>
|
||||||
#elif defined(_WIN32) || defined( __CYGWIN__ )
|
#elif defined(_WIN32) || defined( __CYGWIN__ )
|
||||||
#include <objbase.h>
|
#include <objbase.h>
|
||||||
|
@ -187,7 +187,7 @@ namespace util{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// the uuid that this object represents.
|
// the uuid that this object represents.
|
||||||
#ifdef unix
|
#if defined( unix ) || defined(__APPLE__)
|
||||||
uuid_t uuid;
|
uuid_t uuid;
|
||||||
#else
|
#else
|
||||||
::GUID uuid;
|
::GUID uuid;
|
||||||
|
|
Loading…
Reference in New Issue