enhance windoze compatibility
This commit is contained in:
		@@ -9,6 +9,9 @@
 | 
			
		||||
    @license LGPL, see file <a href="license.html">COPYING</a>
 | 
			
		||||
 | 
			
		||||
    $Log$
 | 
			
		||||
    Revision 1.4  2004/10/07 09:24:08  marc
 | 
			
		||||
    enhance windoze compatibility
 | 
			
		||||
 | 
			
		||||
    Revision 1.3  2004/08/28 16:21:25  marc
 | 
			
		||||
    mrw-c++-0.92 (mrw)
 | 
			
		||||
    - new file: version.cpp
 | 
			
		||||
@@ -28,6 +31,7 @@
 | 
			
		||||
 | 
			
		||||
#include <sys/types.h> // size_t
 | 
			
		||||
#include <sys/mman.h> // munmap, PROT_READ, MAP_SHARED
 | 
			
		||||
#include <unistd.h> // close
 | 
			
		||||
#include <stdexcept>
 | 
			
		||||
 | 
			
		||||
// forward
 | 
			
		||||
@@ -177,7 +181,7 @@ namespace mrw {
 | 
			
		||||
  };
 | 
			
		||||
  inline void munmap(MMapHandle& res) throw(std::bad_exception) {
 | 
			
		||||
    if (res.first!=0 && res.second>0)
 | 
			
		||||
      ::munmap(res.first, res.second);
 | 
			
		||||
      ::munmap((char*)res.first, res.second); // char* conversion for windoze cygwin compatibility
 | 
			
		||||
  }
 | 
			
		||||
  /** @brief Automatically calls @c munmap on destruction for mmaped files.
 | 
			
		||||
      @pre #include <mrw/auto.hpp>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user