/* close replacement.
- Copyright (C) 2008-2020 Free Software Foundation, Inc.
+ Copyright (C) 2008-2021 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#undef close
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#if defined _WIN32 && !defined __CYGWIN__
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static int
close_nothrow (int fd)
{
TRY_MSVC_INVAL
{
- result = close (fd);
+ result = _close (fd);
}
CATCH_MSVC_INVAL
{
return result;
}
+# else
+# define close_nothrow _close
+# endif
#else
# define close_nothrow close
#endif