--- Ice-1.0.0/include/Ice/Config.h.orig Thu Feb 20 23:26:57 2003 +++ Ice-1.0.0/include/Ice/Config.h Thu Feb 20 23:27:42 2003 @@ -75,7 +75,7 @@ inline int getSocketErrno() { return WSAGetLastError(); } inline int getDNSErrno() { return WSAGetLastError(); } -#elif defined(__linux__) && defined(i386) +#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(i386) # include # include --- Ice-1.0.0/include/IceUtil/Config.h.orig Tue Feb 18 19:02:28 2003 +++ Ice-1.0.0/include/IceUtil/Config.h Sat Feb 22 19:12:47 2003 @@ -62,7 +62,7 @@ # define SIZEOF_WCHAR_T 2 -#elif defined(__linux__) && defined(i386) +#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(i386) # define ICE_UTIL_API /**/ # define HAVE_READLINE @@ -81,12 +81,23 @@ #include #include +#if !defined(_WIN32) +#define HAVE_INTTYPES_H +#endif + #ifndef _WIN32 # ifndef _REENTRANT # define _REENTRANT 1 # endif # include # include + +# ifdef HAVE_INTTYPES_H + // define the following to expose definitions for INT64_MIN, INT64_MAX + // C99 standard lets us do this for C++ +# define __STDC_LIMIT_MACROS 1 +# include +# endif /* HAVE_STDINT_H */ #endif // @@ -121,10 +132,10 @@ typedef __int64 Int64; const Int64 Int64Min = -9223372036854775808i64; const Int64 Int64Max = 9223372036854775807i64; -#elif defined(__linux__) && defined(i386) -typedef long long Int64; -const Int64 Int64Min = -0x7fffffffffffffffLL-1LL; -const Int64 Int64Max = 0x7fffffffffffffffLL; +#elif defined(INT64_MIN) && defined(INT64_MAX) +typedef int64_t Int64; +const Int64 Int64Min = INT64_MIN; +const Int64 Int64Max = INT64_MAX; #endif } --- Ice-1.0.0/include/Slice/Parser.h.orig Thu Feb 20 23:05:16 2003 +++ Ice-1.0.0/include/Slice/Parser.h Thu Feb 20 23:08:43 2003 @@ -42,10 +42,10 @@ typedef double Double; const IceUtil::Int64 Int32Max = 0x7fffffffi64; const IceUtil::Int64 Int32Min = -Int32Max - 1i64; -#elif(__linux__) && defined(i386) +#elif defined(INT32_MIN) && defined(INT32_MAX) typedef double Double; - const IceUtil::Int64 Int32Max = 0x7fffffffLL; - const IceUtil::Int64 Int32Min = -Int32Max - 1LL; + const IceUtil::Int64 Int32Max = INT32_MAX; + const IceUtil::Int64 Int32Min = INT32_MIN; #else # error "Unsupported operating system or platform!" #endif --- Ice-1.0.0/src/Ice/Network.cpp.orig Fri Feb 21 21:01:30 2003 +++ Ice-1.0.0/src/Ice/Network.cpp Fri Feb 21 21:02:18 2003 @@ -30,8 +30,12 @@ return true; } #else - if(errno == EINTR || - errno == EPROTO) + if(errno == EINTR +#ifdef EPROTO + || errno == EPROTO) +#else + ) +#endif { return true; } --- Ice-1.0.0/src/IcePack/ActivatorI.cpp.orig Fri Feb 21 21:55:54 2003 +++ Ice-1.0.0/src/IcePack/ActivatorI.cpp Fri Feb 21 21:55:56 2003 @@ -541,7 +541,12 @@ if(ret == -1) { - if(errno == EINTR || errno == EPROTO) + if(errno == EINTR +#ifdef EPROTO + || errno == EPROTO) +#else + ) +#endif { goto repeatSelect; } --- Ice-1.0.0/src/IceSSL/OpenSSLPluginI.cpp.orig Fri Feb 21 21:11:46 2003 +++ Ice-1.0.0/src/IceSSL/OpenSSLPluginI.cpp Fri Feb 21 21:12:11 2003 @@ -148,7 +148,7 @@ #ifdef WINDOWS threadID = GetCurrentThreadId(); #elif _POSIX_THREADS - threadID = pthread_self(); + threadID = (unsigned long)pthread_self(); #else #error You must define a method to return the current thread ID. #endif --- Ice-1.0.0/src/IceUtil/RecMutex.cpp.orig Thu Feb 20 12:18:43 2003 +++ Ice-1.0.0/src/IceUtil/RecMutex.cpp Fri Feb 21 20:58:20 2003 @@ -88,12 +88,26 @@ IceUtil::RecMutex::RecMutex() : _count(0) { - const pthread_mutexattr_t attr = { PTHREAD_MUTEX_RECURSIVE_NP }; - int rc = pthread_mutex_init(&_mutex, &attr); + pthread_mutexattr_t attr; + int rc = pthread_mutexattr_init(&attr); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__); } + + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + if(rc != 0) + { + throw ThreadSyscallException(__FILE__, __LINE__); + } + + rc = pthread_mutex_init(&_mutex, &attr); + if(rc != 0) + { + throw ThreadSyscallException(__FILE__, __LINE__); + } + + } IceUtil::RecMutex::~RecMutex() --- Ice-1.0.0/src/icecpp/config.h.orig Thu Feb 20 22:43:49 2003 +++ Ice-1.0.0/src/icecpp/config.h Thu Feb 20 22:45:00 2003 @@ -17,7 +17,7 @@ // configure script from the gcc-2.8.1 distribution. // -#if defined(__linux__) +#if defined(__linux__) || defined(__FreeBSD__) # define HAVE_INTTYPES_H 1 # define TIME_WITH_SYS_TIME 1 # define HAVE_BCMP 1 @@ -51,7 +51,7 @@ #define LONG_TYPE_SIZE 4 #if defined(_WIN32) # define WCHAR_TYPE_SIZE 2 -#elif defined(__linux__) && defined(i386) +#elif ( defined(__linux__) || defined(__FreeBSD__) ) && defined(i386) # define WCHAR_TYPE_SIZE 4 #else # error "unsupported operating system or platform"