[GRASS-SVN] r42734 - grass/branches/develbranch_6/include/iostream

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jul 9 08:01:00 EDT 2010


Author: mmetz
Date: 2010-07-09 12:01:00 +0000 (Fri, 09 Jul 2010)
New Revision: 42734

Modified:
   grass/branches/develbranch_6/include/iostream/ami_stream.h
Log:
stream must be open on ming32 for stream_len()

Modified: grass/branches/develbranch_6/include/iostream/ami_stream.h
===================================================================
--- grass/branches/develbranch_6/include/iostream/ami_stream.h	2010-07-09 08:28:57 UTC (rev 42733)
+++ grass/branches/develbranch_6/include/iostream/ami_stream.h	2010-07-09 12:01:00 UTC (rev 42734)
@@ -302,6 +302,12 @@
   //assume this for now
   assert(st == AMI_READ_STREAM);
 
+#ifdef __MINGW32__
+  /* MINGW32: reopen file here for stream_len() below */
+  //reopen the file 
+  AMI_STREAM<T> *substr = new AMI_STREAM<T>(path, st);
+#endif
+
   //check range
   if (substream_level) {
      if( (sub_begin >= (logical_eos - logical_bos)) ||
@@ -317,9 +323,11 @@
     }
   }
 
+#ifndef __MINGW32__
   //reopen the file 
   AMI_STREAM<T> *substr = new AMI_STREAM<T>(path, st);
-  
+#endif
+
   // Set up the beginning and end positions.
   if (substream_level) {
     substr->logical_bos = logical_bos + sub_begin;



More information about the grass-commit mailing list