Commit d439d4a9e24107448b4cddd5378495200655fe0b
- Diff rendering mode:
- inline
- side by side
etc/ChangeLog-5.1
(4 / 0)
|   | |||
| 1 | 2008-01-02 Francois Dumont <dums@users.sourceforge.net> | ||
| 2 | |||
| 3 | * src/fstream.cpp: #1854345 bug fixed. | ||
| 4 | |||
| 1 | 5 | 2007-12-11 Petr Ovtchenkov <complement@users.sourceforge.net> | |
| 2 | 6 | ||
| 3 | 7 | * build/Makefiles/gmake/lib/gcc.mak, build/Makefiles/gmake/app/gcc.mak: |
src/fstream.cpp
(7 / 8)
|   | |||
| 1151 | 1151 | && __this->_M_always_noconv | |
| 1152 | 1152 | && __this->_M_base._M_in_binary_mode()) { | |
| 1153 | 1153 | // If we've mmapped part of the file already, then unmap it. | |
| 1154 | if (__this->_M_mmap_base) | ||
| 1154 | if (__this->_M_mmap_base) { | ||
| 1155 | 1155 | __this->_M_base._M_unmap(__this->_M_mmap_base, __this->_M_mmap_len); | |
| 1156 | __this->_M_mmap_base = 0; | ||
| 1157 | __this->_M_mmap_len = 0; | ||
| 1156 | __this->_M_mmap_base = 0; | ||
| 1157 | __this->_M_mmap_len = 0; | ||
| 1158 | __this->setg(__STATIC_CAST(char*, 0), __STATIC_CAST(char*, 0), __STATIC_CAST(char*, 0)); | ||
| 1159 | } | ||
| 1158 | 1160 | ||
| 1159 | 1161 | // Determine the position where we start mapping. It has to be | |
| 1160 | 1162 | // a multiple of the page size. | |
| … | … | ||
| 1177 | 1177 | (char*) __this->_M_mmap_base + __STATIC_CAST(ptrdiff_t, __remainder), | |
| 1178 | 1178 | (char*) __this->_M_mmap_base + __STATIC_CAST(ptrdiff_t, __this->_M_mmap_len)); | |
| 1179 | 1179 | return traits_type::to_int_type(*__this->gptr()); | |
| 1180 | } | ||
| 1181 | } else /* size > 0 ... */ { | ||
| 1182 | // There is nothing to map. We unmapped the file above, now zap pointers. | ||
| 1183 | __this->_M_mmap_base = 0; | ||
| 1184 | __this->_M_mmap_len = 0; | ||
| 1180 | } else | ||
| 1181 | __this->_M_mmap_len = 0; | ||
| 1185 | 1182 | } | |
| 1186 | 1183 | } | |
| 1187 | 1184 |

