msvcrt: _getmaxstdio and _setmaxstdio

Phil Lodwick Phil.Lodwick at EFI.COM
Tue Jul 25 13:54:55 CDT 2006


Greetings,

I have an application that requires these functions which are currently stubs
in wine.  These functions set/retrieve the number of files that can be
simultaneously open at the stdio level.   As of now the Win32 platform has a
default of 512 and can be set as high as 2048.

There is probably quite a bit of work required to be truly compatible.  For
example, fail when you try to fopen() more than the maximum number of files.

My simple fix for my app is to set an initial static variable to 512 and
allow this variable to be set via _setmaxstdio as long as it is less <= 2048
and return this variable when _setmaxstdio is called.

Is such a patch a positive thing because it allows more apps to run, or is it
a negative thing because it might mask the fact that more work needs to be
done?  Perhaps add a WARN that these values are for informational purposes
only and may not be enforced?

MSDN _setmaxstdio: http://msdn2.microsoft.com/en-us/library/6e3b887c.aspx
MSDN _getmaxstdio: http://msdn2.microsoft.com/en-us/library/6e3b887c.aspx

Phil





More information about the wine-devel mailing list