# HG changeset patch # Parent 21e72425955b99eab3210472b99d6d3d2d503ccd Address MinGW-Issue #39677; declare _findclose() once only. * include/io.h (_findclose): Relocate declaration within conditional block, to prevent second exposure when is included in full, following partial inclusion by diff --git a/mingwrt/include/io.h b/mingwrt/include/io.h --- a/mingwrt/include/io.h +++ b/mingwrt/include/io.h @@ -4,11 +4,12 @@ * System level I/O functions and types. * * $Id$ * * Written by Colin Peters - * Copyright (C) 1997-2004, 2007, 2009, 2010, 2014-2016, MinGW.org Project. + * Copyright (C) 1997-2004, 2007, 2009, 2010, 2014-2016, 2019, + * MinGW.org Project. * * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation @@ -466,25 +467,25 @@ int _wfindnexti64 (intptr_t __handle, st #endif /* !_USE_32BIT_TIME_T */ #endif /* __MSVCRT_VERSION__ >= MSVCR80.DLL */ #endif /* >= _WIN2K || >= MSVCR61.DLL */ +/* MSDN documents that must be included to get a prototype for + * _findclose(), which kind of negates the usefulness of declaring the + * wchar_t variants of the file name search API in ; mitigate + * this anomaly, by declaring _findclose() such that either or + * (but only the first to be included) will provide it. + */ +_CRTIMP __cdecl __MINGW_NOTHROW int _findclose (intptr_t); + #undef __fd_name_t #endif /* ! (_IO_H && _WCHAR_H) */ /* We have no further use for the __struct_finddata_t macro; delete it! */ #undef __struct_finddata_t -/* MSDN documents that must be included to get a prototype for - * _findclose(), which kind of negates the usefulness of declaring the - * wchar_t variants of the file name search API in ; mitigate - * this anomaly, by declaring _findclose() such that either or - * will provide it. - */ -_CRTIMP __cdecl __MINGW_NOTHROW int _findclose (intptr_t); - #ifdef _IO_H /* The following declarations are to be exposed only when is * included directly. */ _CRTIMP __cdecl __MINGW_NOTHROW int _chdir (const char *);