Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68123 - in sandbox/gil/boost/gil/extension/io2: . detail
From: dsaritz_at_[hidden]
Date: 2011-01-13 15:19:24


Author: psiha
Date: 2011-01-13 15:19:22 EST (Thu, 13 Jan 2011)
New Revision: 68123
URL: http://svn.boost.org/trac/boost/changeset/68123

Log:
Fixed MSVC compilation errors and warnings.
Text files modified:
   sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.cpp | 2 +-
   sandbox/gil/boost/gil/extension/io2/libjpeg_image.hpp | 17 +++++++++++------
   2 files changed, 12 insertions(+), 7 deletions(-)

Modified: sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.cpp
==============================================================================
--- sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.cpp (original)
+++ sandbox/gil/boost/gil/extension/io2/detail/memory_mapping.cpp 2011-01-13 15:19:22 EST (Thu, 13 Jan 2011)
@@ -23,7 +23,7 @@
     #endif // WIN32_LEAN_AND_MEAN
     #include "windows.h"
 
- //#define _POSIX_
+ #pragma warning ( disable : 4996 ) // "The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name."
     #include "io.h"
 #else
     #include <sys/mman.h> // mmap, munmap.

Modified: sandbox/gil/boost/gil/extension/io2/libjpeg_image.hpp
==============================================================================
--- sandbox/gil/boost/gil/extension/io2/libjpeg_image.hpp (original)
+++ sandbox/gil/boost/gil/extension/io2/libjpeg_image.hpp 2011-01-13 15:19:22 EST (Thu, 13 Jan 2011)
@@ -34,12 +34,12 @@
     #include <csetjmp>
 #endif // BOOST_GIL_THROW_THROUGH_C_SUPPORTED
 #include <cstdlib>
-#ifdef _MSC_VER
- #ifndef _POSIX_
- #define _POSIX_
- #endif
+#if defined(BOOST_MSVC)
+ #pragma warning( push )
+ #pragma warning( disable : 4996 ) // "The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name."
     #include "io.h"
-#endif // _MSC_VER
+ #include "sys/stat.h"
+#endif // MSVC
 #include "fcntl.h"
 //------------------------------------------------------------------------------
 namespace boost
@@ -397,7 +397,7 @@
                 reinterpret_cast<int>( compressor().client_data ),
                 write_buffer_.begin(),
                 number_of_bytes
- ) != number_of_bytes
+ ) != static_cast<int>( number_of_bytes )
         )
             fatal_error_handler( &common() );
     }
@@ -1084,4 +1084,9 @@
 //------------------------------------------------------------------------------
 } // namespace boost
 //------------------------------------------------------------------------------
+
+#if defined(BOOST_MSVC)
+ #pragma warning( pop )
+#endif // MSVC
+
 #endif // libjpeg_image_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