activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1399874 - in /activemq/activemq-cpp/trunk/activemq-cpp: configure.ac src/main/decaf/util/Config.h src/main/decaf/util/HashCode.h
Date Thu, 18 Oct 2012 21:35:53 GMT
Author: tabish
Date: Thu Oct 18 21:35:53 2012
New Revision: 1399874

URL: http://svn.apache.org/viewvc?rev=1399874&view=rev
Log:
Add some configuration checks for wchar_t to help fix windows build issues when its not defined
as a built-in type. 

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/configure.ac
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Config.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/configure.ac
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/configure.ac?rev=1399874&r1=1399873&r2=1399874&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/configure.ac (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/configure.ac Thu Oct 18 21:35:53 2012
@@ -119,9 +119,12 @@ AC_HEADER_STDC
 AC_C_CONST
 AC_TYPE_SIZE_T
 AC_C_BIGENDIAN
+AC_CHECK_TYPE(wchar_t, AC_DEFINE(HAVE_WCHAR_T, 1, [Define if compiler provides wchar_t]))
+
 AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(wchar_t)
 
 AC_CHECK_SIZEOF(char, 1)
 AC_CHECK_SIZEOF(short, 2)

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Config.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Config.h?rev=1399874&r1=1399873&r2=1399874&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Config.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Config.h Thu Oct 18 21:35:53
2012
@@ -75,6 +75,9 @@
         #ifndef HAVE_PROCESS_H
             #define HAVE_PROCESS_H
         #endif
+        #ifdef _NATIVE_WCHAR_T_DEFINED
+            #define HAVE_WCHAR_T
+        #endif
 
         #if defined(_MSC_VER) && _MSC_VER >= 1400
             #ifndef _CRT_SECURE_NO_DEPRECATE

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h?rev=1399874&r1=1399873&r2=1399874&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h Thu Oct 18 21:35:53
2012
@@ -63,12 +63,14 @@ namespace util {
         }
     };
 
+    #if defined(HAVE_WCHAR_T)
     template<>
     struct HashCode<unsigned char> : public std::unary_function<unsigned char, int>
{
         int operator()(unsigned char arg) const {
             return (int) arg;
         }
     };
+    #endif
 
     template<>
     struct HashCode<char> : public std::unary_function<char, int> {



Mime
View raw message