Download List

Sponsored link

项目描述

MinGW: A native Windows port of the GNU Compiler Collection (GCC), with freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All of MinGW's software will execute on the 64bit Windows platforms.

系统要求

System requirement is not defined

发布: 2018-12-23 07:53
MinGW.org Windows System Libraries (WSL) C-Runtime Library (32-bit), Version 5.2 (10 files 隐藏)

发布版本通知

The following user visible changes have been implemented for this release:–

  • The alloca() (and Microsoft's equivalent _alloca()) function is now declared in new <alloca.h> header, which may be included "stand-alone", thus conforming with GNU practice; conformance with Microsoft practice is preserved, by ensuring that <alloca.h> is automatically included when including <malloc.h>.
  • _aligned_malloc(), and related functions are no longer advertised by libmsvcrt.a; this is to ensure that GNU autoconf detection will not report their availability, when they may not actually be exported by the platform MSVCRT.DLL. Users, wishing to use any of this group of functions, are advised to enable the appropriate __MSVCRT_VERSION__ feature test, and then to either link directly to a DLL which is known to export them, or to perform a dlsym() or GetProcAddress() lookup for the function entry point.
  • The MinGW alternatives to the _aligned_malloc() group of functions, (qualified by prefixing __mingw to the function names), now perform more rigorous validation of alignment and offset parameters; in particular, zero is rejected as an alignment, offset, if non-zero, must be positive, and less than the requested allocation size, and the reallocation functions require strict identity of alignment and offset with those specified at original allocation.
  • The __mingw_aligned_malloc() group of functions is now complemented by __mingw_realloc() and __mingw_free() functions; each can perform its respective function on memory which has been allocated by malloc(), (or any malloc() compatible allocator), and equally on memory allocated by any of the __mingw_aligned_malloc() function group, (but not by Microsoft's _aligned_malloc() group). Together, these pave the way to possible implementations of the ISO-C11 aligned_alloc() or POSIX.1 posix_memalign() memory allocation stratagems.
  • Microsoft's _fseeki64() and _ftelli64() APIs are now fully emulated on all Win32 platforms, (by __mingw_ftelli64() and __mingw_ftelli64() functions respectively), irrespective of the availability of the Microsoft implementation within the platform MSVCRT.DLL.
  • Implementations of the POSIX.1 insque(), and remque() functions are now provided; (these were necessary to mitigate an identified flaw in the original MinGW work-around for correct handling of fwrite() following fseek() beyond EOF, on Win9x legacy platforms.
  • The __USE_MINGW_FSEEK feature test is no longer required to enable the aforementioned fwrite() corrective action, and is now marked as "deprecated"; the recommended method for enabling this feature is now to define _WIN32_WINDOWS, (with an appropriate value for required Win9x version conformance), in addition to any _WIN32_WINNT or NTDDI_VERSION conformance specification.
  • The aforementioned fwrite() after fseek() handler, for Win9x, now maintains a per-stream record for when corrective fwrite() action may be required; this avoids possible interference between interleaved seeks and writes to more than one stream.
  • The __USE_MINGW_ANSI_STDIO feature test is now marked as "deprecated", when user defined; the preferred method for enabling this feature has always been to define any one or more of _GNU_SOURCE, _BSD_SOURCE, or _ISOC99_SOURCE, (or, added with this release, _ISOC11_SOURCE), or to explicitly request a particular level of _XOPEN_SOURCE or _POSIX_C_SOURCE conformance, (or compile with the -posix option); alternatively, (but not recommended), compile with the -ansi, or any of the -std=... options which implies the __STRICT_ANSI__ feature.

变更日志

2018-12-22  Keith Marshall  <keith@users.osdn.me>

	Correct an optional DLL installation and packaging defect.

	* Makefile.in (optional_dll): New function macro; define it, and...
	(MAP_LIBMINGWEX_A_DLLVERSION): ...wrap this, replacing all usage of...
	(optional_dll_version, optional_dll_package): ...these; delete them,
	together with all dependent references.

2018-12-22  Keith Marshall  <keith@users.osdn.me>

	Update ANSI stdio feature test to accommodate ISO-C11.

	* include/_mingw.h.in (__USE_MINGW_ANSI_STDIO): Add a deprecation
	warning, for ill-advised direct definition in user code; include...
	(_ISOC11_SOURCE): ...this new user defined feature test macro as a
	further indirect enabling condition.

2018-12-20  Keith Marshall  <keith@users.osdn.me>

	Implement test suite for aligned heap management API.

	* tests/testsuite.at.in: Include...
	* tests/memalign.at: ...this new file; it replaces...
	* mingwex/tst-aligned-malloc.c: ...this; delete it.

2018-12-20  Keith Marshall  <keith@users.osdn.me>

	Reimplement aligned heap management API.

	* mingwex/mingw-aligned-malloc.c: Delete it; it is replaced by...
	* mingwex/memalign.c: ...this new file; it reimplements...
	(__mingw_aligned_offset_malloc, __mingw_aligned_offset_realloc)
	(__mingw_aligned_free): ...each of these public API functions; also...
	(__mingw_realloc, __mingw_free): ...adds these new public functions,...
	(__mingw_memalign_base, __mingw_memalign_realloc): ...these private,
	but globally exposed, supporting functions, and additionally...
	(__mingw_memalign_lwm): ...this global, private use, variable.

	* include/stdlib.h (__mingw_realloc, __mingw_free): Declare prototypes.

	* include/malloc.h (__mingw_aligned_malloc, __mingw_aligned_realloc):
	Implement them in-line; export them, via __LIBIMPL__, to libmingwex.a
	(_aligned_malloc, __mingw_aligned_malloc, _aligned_offset_malloc)
	(__mingw_aligned_offset_malloc): Add __MINGW_ATTRIB_MALLOC attribute.
	[__MSVCRT_VERSION__ < __MSVCR70_DLL] (_aligned_malloc, _aligned_free)
	(_aligned_realloc, _aligned_offset_malloc, _aligned_offset_realloc):
	Implement them in-line, as wrappers around their MinGW alternatives;
	export them, via __LIBIMPL__, to new library, libmemalign.a

	* Makefile.in (LIBMINGWEX_MEMALIGN): New macro; define it; derive...
	(LIBMINGWEX_MEMALIGN_OBJECTS): ...this macro; add compilation rule.
	(libmingwex.a): Add $LIBMINGWEX_MEMALIGN_OBJECTS; they replace...
	(mingw-aligned-malloc.$OBJEXT): ...this; remove dependency.
	(all-mingwrt-libs, install-mingwrt-libs): Add libmemalign.a
	(msvcrt_repl_funcs): Add alias references for...
	(free, realloc): ...these.

2018-12-04  Keith Marshall  <keith@users.osdn.me>

	Reimplement Win9x specific fseek()/fwrite() redirector.

	* include/stdio.h [__USE_MINGW_FSEEK]: Deprecate support for direct
	user definition; deduce it, as an internal private definition, from...
	[_WIN32_WINDOWS]: ...this, when appropriately defined for Win9x.
	[__USE_MINGW_FSEEK] (__mingw_fseek): Declare new prototype; map it as
	multiple __CRT_ALIAS inline function overrides for each of...
	(fseek, _fseeki64, fseeko64): ...these.
	[__USE_MINGW_FSEEK] (__mingw_fwrite): Likewise, overriding...
	(fwrite): ...this.
	(__mingw_fseeko64): Delete all references; it is no longer provided,
	nor required.

	* mingwex/stdio/fwrite.c: New file; it reimplements the Win9x
	fseek()/fwrite() function redirector interface, and thus replaces...
	* mingex/ming-fseek.c: ...this; delete it.

	* Makefile.in (libmingwex.a): Remove dependency on...
	(mingw-fseek.$OBJEXT): ...this object module; replace it with...
	(fwrite.$OBJEXT): ...this alternative dependency.

2018-12-04  Keith Marshall  <keith@users.osdn.me>

	Implement POSIX.1-1996 linked-list queue management API.

	* mingwex/insque.c mingwex/remque.c: New files; they implement the
	POSIX.1-1996 insque(), and remque() functions, respectively.

	* include/search.h (insque, remque): Declare function prototypes.

	* Makefile.in (libmingwex.a): Add dependencies on...
	(insque.$OBJEXT, remque.$OBJEXT): ...these.

2018-11-25  Keith Marshall  <keith@users.osdn.me>

	Emulate _fseeki64()/_ftelli64() API on legacy platforms.

	* mingwex/stdio/fseeki64.c: New file; it implements...
	(__mingw_fseeki64, fseeko64): ...both of these functions, avoiding any
	dependency on undocumented internal implementation details of...
	(fpos_t): ...this opaque data type, and replacing...
	* mingwex/stdio/fseeko64.c: ...this; delete it.

	* mingwex/stdio/ftelli64.c: New file; it implements...
	(_ftelli64, ftello64): ...both of these, again avoiding any dependency
	on undocumented internal implementation details of...
	(fpos_t): ...this opaque data type.

	* include/stdio.h (fpos_t): Make it more effectively opaque.
	(__mingw_fseeki64, __mingw_ftelli64): Declare them for legacy use.
	[_WIN32_WINNT < VISTA && __MSVCRT_VERSION__ < MSVCR80_DLL] (_fseeki64)
	(_ftelli64): Map inline emulations, to "__mingw" prefixed names.
	(ftello64): Remove inline implementation.

	* Makefile.in (libmingwex.a): Add references to...
	(fseeki64.$OBJEXT, ftelli64.$OBJEXT): these; remove reference to...
	(fseeko64.$OBJEXT): ...this.

2018-10-21  Keith Marshall  <keith@users.osdn.me>

	Update <conio.h> and <wchar.h> header files.

	* include/conio.h: Tidy layout; assert copyright.
	[_CONIO_H_]: Rename multiple inclusion guard macro, to conform to...
	[_CONIO_H]: ...this preferred convention; do not define when...
	[__WCHAR_H_SOURCED__]: ...this selective inclusion condition applies.
	[__need_wint_t, __need_wchar_t]: Define them; include <stddef.h>...
	(wint_t, wchar_t): ...for these corresponding data type definitions.
	[_WIN32_WINNT >= WINXP || __MSVCRT_VERSION__ >= __MSVCR70_DLL]
	(_getwch, _getwche, _ungetwch, _putwch): Declare function prototypes.
	[__MSVCRT_VERSION__>=__MSVCR80_DLL] (_getch_nolock, _getche_nolock)
	(_ungetch_nolock, _putch_nolock, _getwch_nolock, _getwche_nolock)
	(_ungetwch_nolock, _putwch_nolock): Likewise.
	[_BEGIN_C_DECLS, _END_C_DECLS]: Use them.

	* include/wchar.h: Selectively include <conio.h>, for...
	(_getwch, _getwche, _ungetwch): ...these function prototypes, and...
	[__MSVCRT_VERSION__>=__MSCVCR80_DLL] (_getwch_nolock)
	(_getwche_nolock, _ungetwch_nolock): ...these.

2018-10-18  Keith Marshall  <keith@users.osdn.me>

	Map compile-time constant references for POSIX clocks.

	* include/time.h (CLOCK_REALTIME, CLOCK_MONOTONIC): Redefine, using...
	(__MINGW_POSIX_CLOCKAPI): ...this new macro; it converts clock indices
	to odd-valued compile-time constant pseudo-pointers, (distinguishable
	from real pointers which are always even-valued), which may be passed
	as clockid_t references in POSIX clock API function calls.

	* mingwex/clockapi.h (struct __clockid__): Specify 4-byte alignment.
	(__clock_api_is_valid): Change return type to "clockid_t".

	* mingwex/clockapi.c (__clock_api_is_valid): Return an even-valued,
	non-NULL, "clockid_t" reference pointer, or "NULL" if invalid; use...
	(clock_reference): ...this new static inline function, to convert...
	(CLOCK_REALTIME, CLOCK_MONOTONIC): ...these odd-valued pseudo-pointers
	to their actual run-time pointer equivalents; delete their physical
	initializations, which have now become invalid.

	* mingwex/clockres.c (clock_getres)
	* mingwex/clocktime.c (clock_gettime)
	* mingwex/clockset.c (clock_settime): Update the "clockid_t" argument
	to match the real pointer returned by __clock_api_is_valid()

2018-10-08  Keith Marshall  <keith@users.osdn.me>

	Suppress autoconf detection of _aligned_malloc functions.

	* msvcrt-xref/msvcrt.def.in (_aligned_malloc, _aligned_free)
	(_aligned_offset_malloc, _aligned_realloc, _aligned_offset_realloc):
	Mark as requiring dlsym() lookup, when linking with MSVCRT.DLL

2018-10-07  Keith Marshall  <keith@users.osdn.me>

	Make alloca() API both GNU and Microsoft compatible.

	* include/malloc.h: Tidy layout; assert copyright.
	(_MALLOC_H_): Rename guard macro, for conformance with...
	(_MALLOC_H): ...this preferred guard macro naming convention.
	(GCC system_header): Add pragma, declaring it as such.
	[__MSVCRT_VERSION__ >= 0x0700]: Express symbolically, guarding...
	(_aligned_malloc, _aligned_offset_malloc)
	(_aligned_realloc, _aligned_offset_realloc)
	(_aligned_recalloc, _aligned_offset_recalloc): ...these...
	[__MSVCRT_VERSION__>=__MSVCR70_DLL]: ...thus.
	[_BEGIN_C_DECLS, _END_C_DECLS]: Use them.
	(alloca, _alloca): Factor them out, then include from...
	* include/alloca.h: ...this new header file; it reimplements...
	(alloca, _alloca): ...these, such that they remain Microsoft
	compatible, while adding GNU conformity, either explicitly when
	included by user code, or conditionally when included by...
	* include/stdlib.h [!__STRICT_ANSI__]: ...this.

	* tests/headers.at: Regenerated by "make check".
	(MINGWRT_AT_PACKAGE_HEADERS): Add alloca.h

2018-09-06  Keith Marshall  <keith@users.osdn.me>

	Avoid unwanted GCC warning diagnostic messages.

	* Makefile.in (libm_dummy.c): Remove "static" qualifier from...
	(__mingw_libm_dummy): ...this variable; it caused "-Wunused-variable"
	warning diagnostics, when compiled with "-Wall".

	* main.c (WinMain): Remove unnecessary argument names from prototype.
	(main): Make its argument list conform to convention, otherwise it
	causes a "-Wmain" warning diagnostic when compiled with "-Wall".

	* mingwex/clocktime.c (clock_gettime) [clock_id-type]
	* mingwex/clockapi.c (clock_api_getres_interval) [clock_api->type]:
	Ensure that switches include default cases; this avoids a "-Wswitch"
	warning diagnostic message, in each case, when compiled with "-Wall".

	* mingwex/cryptnam.c (crypto_random_filename_char): Remove "unsigned"
	qualifier from both argument and return type; this avoids an argument
	type mismatch, raising a "-Wpointer-sign" warning when called from...
	(__mingw_crypto_tmpname): ...here, and compiled with "-Wall".

	* mingwex/imaxdiv.c: Tidy layout; assert copyright.
	(lldiv): Correct return type; explicitly disable "-Wattribute-alias"
	diagnostic messages, under GCC pragma control.

	* mingwex/ofmt.c [__crtofmt__] (__mingw_set_output_format_fallback)
	[__crtnfmt__] (__mingw_get_printf_count_output_fallback): Likewise,
	disable "-Wattribute-alias" diagnostics.

	* mingwrt/mingwex/stdio/pformat.c (__pformat_ignore_flags): Adjust
	layout, to avoid a "-Wmisleading-indentation" warning diagnostic.
	(__pformat_argmap) [length]: Add a no-op default case, to avoid a
	"-Wswitch" warning diagnostic message.

	* mingwrt/profile/mcount.c: Explicitly disable "-Wframe-address"
	diagnostics, under GCC pragma control, to avoid warnings relating...
	(__builtin_return_address): ...this, when called from...
	(mcount): ...here.

	* mingwrt/setargv.c (__mingw_setargv): Insert parentheses, as advised,
	to eliminate "-Wparentheses" diagnostic messages.