- mmap_addr = MapViewOfFileEx (mmap_handle, FILE_MAP_COPY, 0, offset,
- size, addr);
+
+ /* Retry five times, as here might occure a race with multiple gcc's
+ instances at same time. */
+ for (r = 0; r < 5; r++)
+ {
+ mmap_addr = MapViewOfFileEx (mmap_handle, FILE_MAP_COPY, 0, offset,
+ size, addr);
+ if (mmap_addr == addr)
+ break;
+ if (r != 4)
+ Sleep (500);
+ }
+