Skip to content

Commit

Permalink
Allow to configure max file handles on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest committed Dec 10, 2017
1 parent da85398 commit def90bf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions maputil.c
Expand Up @@ -1894,6 +1894,17 @@ shapeObj *msOffsetPolyline(shapeObj *p, double offsetx, double offsety)

int msSetup()
{
#ifdef _WIN32
char* maxfiles = getenv("MS_MAX_OPEN_FILES");
if (maxfiles) {
int res = _getmaxstdio();
if (res < 2048) {
res = _setmaxstdio(atoi(maxfiles));
assert(res != -1);
}
}
#endif

#ifdef USE_THREAD
msThreadInit();
#endif
Expand Down

0 comments on commit def90bf

Please sign in to comment.