Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#335 _set_invalid_parameter_handler defined even for CRT < 0x800

v1.0 (example)
closed-fixed
nobody
header (101)
5
2014-03-12
2013-04-10
Anonymous
No

The "old-school" mingw has an #if around the definitions for
#if __MSVCRT_VERSION__ >= 0x800
_set_abort_behavior
_WRITE_ABORT_MSG
_CALL_REPORTFAULT
_set_invalid_parameter_handler
#endif

mingw-w64-headers lacks this check (or an equivalent check) in stdlib.h.
Hence when compiling some software you'll get undefined references, depending on how you check for _set_invalid_parameter_handler.
For instance, and this is how I noticed, libuv:
http://git.io/nDrtew
libuv checks if _WRITE_ABORT_MSG to determine if _set_invalid_parameter_handler is present.
While this is clearly not a very good solution, it should IMO work.

Expected:
- Hide the _set_invalid_parameter_handler and corresponding defined when not __MSVCRT_VERSION__ >= 0x800

Discussion

  • Kai Tietz
    Kai Tietz
    2014-03-12

    • status: open --> closed-fixed
    • Group: --> v1.0 (example)
     
  • Kai Tietz
    Kai Tietz
    2014-03-12

    Issue got fixed. Therefore close bug as fixed