Commit 32ffc7cb authored by Louis. Lenders's avatar Louis. Lenders Committed by Alexandre Julliard

msvcrt: Add stub for _setmaxstdio + tiny test.

parent eb7b1f4b
......@@ -3090,6 +3090,20 @@ int CDECL _getmaxstdio(void)
}
/*********************************************************************
* _setmaxstdio_ (MSVCRT.@)
*/
int CDECL _setmaxstdio(int newmax)
{
int res;
if( newmax > 2048)
res = -1;
else
res = newmax;
FIXME("stub: setting new maximum for number of simultaneously open files not implemented,returning %d\n",res);
return res;
}
/*********************************************************************
* __pioinfo (MSVCRT.@)
* FIXME: see MSVCRT_MAX_FILES define.
*/
......
......@@ -431,7 +431,7 @@
@ cdecl _seterrormode(long)
@ cdecl -i386 -norelay _setjmp(ptr) MSVCRT__setjmp
@ cdecl -i386 -norelay _setjmp3(ptr long) MSVCRT__setjmp3
@ stub _setmaxstdio #(long)
@ cdecl _setmaxstdio(long)
@ cdecl _setmbcp(long)
@ cdecl _setmode(long long)
@ stub _setsystime #(ptr long)
......
......@@ -788,6 +788,12 @@ static void test_get_osfhandle(void)
_unlink(fname);
}
static void test_setmaxstdio(void)
{
ok(2048 == _setmaxstdio(2048),"_setmaxstdio returned %d instead of 2048\n",_setmaxstdio(2048));
ok(-1 == _setmaxstdio(2049),"_setmaxstdio returned %d instead of -1\n",_setmaxstdio(2049));
}
START_TEST(file)
{
int arg_c;
......@@ -818,4 +824,5 @@ START_TEST(file)
test_file_put_get();
test_tmpnam();
test_get_osfhandle();
test_setmaxstdio();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment