Boost logo

Boost-Commit :

From: oryol_at_[hidden]
Date: 2008-04-09 23:18:58


Author: jeremypack
Date: 2008-04-09 23:18:58 EDT (Wed, 09 Apr 2008)
New Revision: 44141
URL: http://svn.boost.org/trac/boost/changeset/44141

Log:
Fixes for Windows and GCC

Text files modified:
   sandbox/boost/extension/impl/library_impl.hpp | 8 ++++----
   sandbox/boost/extension/impl/typeinfo.hpp | 29 ++++++++++++++++++++++++++---
   2 files changed, 30 insertions(+), 7 deletions(-)

Modified: sandbox/boost/extension/impl/library_impl.hpp
==============================================================================
--- sandbox/boost/extension/impl/library_impl.hpp (original)
+++ sandbox/boost/extension/impl/library_impl.hpp 2008-04-09 23:18:58 EDT (Wed, 09 Apr 2008)
@@ -19,8 +19,8 @@
 #define _WIN32_WINNT 0x0501
 #endif
 
-#ifndef WINDOWS_LEAN_AND_MEAN
-#define WINDOWS_LEAN_AND_MEAN
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
 #endif
 #include <Windows.h>
 namespace
@@ -34,14 +34,14 @@
             && file_name[len-2] == 'l' && file_name[len-1] == 'l');
   }
   inline library_handle load_shared_library(const char * libraryName) {
- return LoadLibrary(libraryName);
+ return LoadLibraryA(libraryName);
   }
   inline generic_function_ptr get_function(library_handle handle,
                                            const char * function_name) {
     return GetProcAddress(handle, function_name);
   }
   inline bool close_shared_library(library_handle handle) {
- return FreeLibrary(handle)!=0;
+ return FreeLibrary(handle) != 0;
   }
 }
 # pragma comment(lib, "kernel32.lib")

Modified: sandbox/boost/extension/impl/typeinfo.hpp
==============================================================================
--- sandbox/boost/extension/impl/typeinfo.hpp (original)
+++ sandbox/boost/extension/impl/typeinfo.hpp 2008-04-09 23:18:58 EDT (Wed, 09 Apr 2008)
@@ -40,7 +40,8 @@
 // This list should be expanded to all platforms that successfully
 // compare type_info across shared library boundaries.
 #if defined(__APPLE__) || defined(BOOST_EXTENSION_FORCE_FAST_TYPEINFO)
-namespace boost { namespace extensions {
+namespace boost {
+namespace extensions {
 bool operator<(const default_type_info& first,
                const default_type_info& second) {
   return &first.type < &second.type;
@@ -57,6 +58,7 @@
 }
 }}
 #else
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
 #include <string>
 namespace boost { namespace extensions {
 bool operator<(const default_type_info& first,
@@ -73,7 +75,28 @@
                const default_type_info& second) {
   return std::strcmp(first.type.raw_name(), second.type.raw_name()) > 0;
 }
-}}
-#endif
+} // namespace extensions
+} // namespace boost
+#else // OTHER OS
+#include <string>
+namespace boost { namespace extensions {
+bool operator<(const default_type_info& first,
+ const default_type_info& second) {
+ return std::strcmp(first.type.name(), second.type.name()) < 0;
+}
+
+bool operator==(const default_type_info& first,
+ const default_type_info& second) {
+ return std::strcmp(first.type.name(), second.type.name()) == 0;
+}
+
+bool operator>(const default_type_info& first,
+ const default_type_info& second) {
+ return std::strcmp(first.type.name(), second.type.name()) > 0;
+}
+} // namespace extensions
+} // namespace boost
 
+#endif // WINDOWS
+#endif // OS X
 #endif // BOOST_EXTENSION_TYPEINFO_HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk