mingw32 puts a lot of declarations (namely - from stdlib.h) under #ifndef __STRICT_ANSI__
Some 3rd-party programs (namely - libtool) make an assumption that defined(__STRICT_ANSI__) means that these declarations are absent (namely - _putenv) and that they (programs) are free to make their own declarations.
mingw64 uses __STRICT_ANSI__ for non-ANSI floating-point functions, but its usage in stdlib.h is very limited. mingw64, however, uses _POSIX instead of __STRICT_ANSI__ for most non-ANSI declarations (mingw32 makes almost no use of _POSIX, by the way).
Is it correct to use _POSIX as a synonym to __STRICT_ANSI__?
Anyway, this mismatch might cause re-declaration warnings/errors in mingw32-aware programs.
How to fix:
Not sure. Probably the best way is to add extra || !defined(__STRICT_ANSI__) in some places which are only protected by _POSIX at the moment.
Log in to post a comment.