X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=lib%2Fgetdtablesize.c;h=9947405af61b9773e5fc06d96d25ca66990ab76e;hb=1b5cc0fd70f9b4483984e781b6e43d6d3cb9d9f6;hp=60e7f5af1dcf6bd140c8d4dcc8c35f87df4e3bb5;hpb=ab2dee7101e75806a54d954f726bcb5b969f1ab7;p=debian%2Fgzip diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index 60e7f5a..9947405 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c @@ -1,5 +1,5 @@ /* getdtablesize() function for platforms that don't have it. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2013 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -24,6 +24,29 @@ #include +#include "msvc-inval.h" + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static int +_setmaxstdio_nothrow (int newmax) +{ + int result; + + TRY_MSVC_INVAL + { + result = _setmaxstdio (newmax); + } + CATCH_MSVC_INVAL + { + result = -1; + } + DONE_MSVC_INVAL; + + return result; +} +# define _setmaxstdio _setmaxstdio_nothrow +#endif + /* Cache for the previous getdtablesize () result. */ static int dtablesize;