e6ff0d91cb5027521a314fd0c5eaaedcc7521c19 mingwrt-3.21-release
283116261e256a65a941ce62e80059843d4d8c51 mingwrt-3.21.1-release
-ef4db1b16b1422d4eb06cbe47f0f3c08e11d2f8d mingwrt-3.22-release
ef4db1b16b1422d4eb06cbe47f0f3c08e11d2f8d w32api-3.18-release
-ef4db1b16b1422d4eb06cbe47f0f3c08e11d2f8d mingwrt-3.22-release
b1ff7f59f95a8334245c7e7c07795514e55b6921 mingwrt-3.22-release
cd1bc4d018548b498e0e74e52bea935b0904d1f2 w32api-3.18.1-release
c42986e81e9ce0a5fcf8f09012f9d0f038032bac mingwrt-3.22.1-release
+96dcdb8540b8cdebba812d8125ed29761ec9aa39 mingwrt-3.22.2-release
+cd725d6ae238714355b000ae9d7c6f3ace34317d w32api-3.18.2-release
+9db085b7464425de03f96232b5e6f48d119d8713 mingwrt-3.22.3-release
+2016-10-14 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Merge mingwrt-3.22.3 updates into 5.0-active branch.
+
+ * configure.ac: Preserve original 5.0-active state.
+ * include/_mingw.h.in include/string.h include/sys/types.h
+ * include/io.h: Update per 2016-10-13 commits.
+
+2016-10-13 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Prepare and tag mingwrt-3.22.3 patch release.
+
+ * configure.ac (AC_INIT): Increment patch level.
+
+2016-10-13 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Emulate glibc <string.h> POSIX.1 non-compliance.
+
+ * include/_mingw.h.in (_EMULATE_GLIBC): New feature test macro.
+ [_GNU_SOURCE || _BSD_SOURCE || !__STRICT_ANSI__]: Enable it when...
+ [_XOPEN_SOURCE || _POSIX_C_SOURCE || _POSIX_SOURCE]: ...none of
+ these have been pre-defined by the user.
+
+ * include/string.h [_EMULATE_GLIBC]: Include <strings.h> in full...
+ (strcasecmp, strncasecmp): ...so prototypes for these are declared.
+ [!_EMULATE_GLIBC]: Preserve partial <strings.h> include, guarded by...
+ [__STRING_H_SOURCED__]: ...this context selector, so suppressing the
+ declarations of those function prototypes.
+
+2016-10-13 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Resolve some non-ANSI typedef omissions.
+
+ * include/sys/types.h (off_t, ssize_t): Always typedef them when...
+ [_POSIX_C_SOURCE || !_NO_OLDNAMES]: ...either of these prevails.
+
+ * include/io.h (_fsize_t): Do not suppress its typedef when...
+ [__STRICT_ANSI__]: ...this compiler option applies, irrespective of...
+ [!(_IO_H && _WCHAR_H)]: ...this, which otherwise causes supression.
+
+2016-09-20 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Prepare and tag mingwrt-3.22.2 patch release.
+
+ * configure.ac (AC_INIT): Increment patch level.
+ * config.guess config.sub: Delete, per 2016-07-16 commit.
+ * include/stdlib.h: Backport, per 2016-09-14 commit.
+ * include/wchar.h: Backport, per 2016-09-17 commits.
+
2016-09-17 Keith Marshall <keithmarshall@users.sourceforge.net>
Add missing <wchar.h> declarations when compiling C++.
*/
# define _POSIX_C_SOURCE 200809L
+# if ! defined _EMULATE_GLIBC && ! defined _POSIX_SOURCE
+ /* For this default case, unless it has already been specified
+ * otherwise, we enable some GNU glibc extensions, which may be
+ * considered as violations of strict POSIX.1 conformance.
+ */
+# define _EMULATE_GLIBC 1
+# endif
+
# elif defined _POSIX_SOURCE
/* Now formally deprecated by POSIX, some old code may specify this;
* it will enable a minimal level of POSIX support, in addition to the
/* We must define _fsize_t, but some compilers (including GCC prior to
* version 4.0), may choke if we try to do so more than once...
*/
-#if ! (defined _IO_H && defined _WCHAR_H)
+#if ! (defined _IO_H && defined _WCHAR_H) || defined __STRICT_ANSI__
/* ...so DO NOT define it during direct <io.h> inclusion, (i.e. _IO_H
* is defined), if <wchar.h> has already caused it to be defined, (i.e.
- * _WCHAR_H is ALSO defined).
+ * _WCHAR_H is ALSO defined, but __STRICT_ANSI__ is NOT).
*/
typedef unsigned long _fsize_t;
#endif /* ! (_IO_H && _WCHAR_H) */
#endif
#include <stddef.h>
+#if _EMULATE_GLIBC
+/* GNU's glibc declares strcasecmp() and strncasecmp() in <string.h>,
+ * contravening POSIX.1-2008 which requires them to be declared only in
+ * <strings.h>; we may emulate this anomalous glibc behaviour, which is
+ * ostensibly to support BSD usage, (in spite of such usage now being
+ * obsolete in BSD), by simply including our <strings.h> here.
+ */
+#include <strings.h>
+#endif
+
_BEGIN_C_DECLS
#define __STRING_H_SOURCED__
/* MSVC's non-ANSI _stricmp() and _strnicmp() functions must also be
* prototyped here, but we need to share them with <strings.h>, where
* we declare their POSIX strcasecmp() and strncasecmp() equivalents;
- * get the requisite prototypes by selective <strings.h> inclusion.
+ * get the requisite prototypes by selective <strings.h> inclusion,
+ * (noting that we've already done so, if emulating glibc).
*/
+#if !_EMULATE_GLIBC
#include <strings.h>
+#endif
# ifdef __MSVCRT__
/* These were not present in the CRTDLL prior to the first release of
*/
typedef __off32_t _off_t;
-# if _POSIX_C_SOURCE
+# if _POSIX_C_SOURCE || ! defined _NO_OLDNAMES
/* ...but note that this form should ALWAYS be preferred when
- * compiling POSIX compatible source code.
+ * compiling POSIX compatible source code, and should also be
+ * made generally available unless Microsoft's old names have
+ * been suppressed, (by defining _NO_OLDNAMES).
*/
typedef _off_t off_t;
# endif
# if __GNUC__ < 4
/* Some compilers, including GCC prior to v4, may get upset
- * if we try to specifiy these typedefs more than once.
+ * if we try to specify these typedefs more than once.
*/
# define __have_typedef_off_t
# endif
# if __GNUC__ < 4
/* Some compilers, including GCC prior to v4, may get upset
- * if we try to specifiy these typedefs more than once.
+ * if we try to specify these typedefs more than once.
*/
# define __have_typedef___off64_t
# endif
*/
typedef int _ssize_t;
-# if _POSIX_C_SOURCE
+# if _POSIX_C_SOURCE || ! defined _NO_OLDNAMES
/* ...but note that this form should ALWAYS be preferred when
- * compiling POSIX compatible source code.
+ * compiling POSIX compatible source code, and should also be
+ * made generally available unless Microsoft's old names have
+ * been suppressed, (by defining _NO_OLDNAMES).
*/
typedef _ssize_t ssize_t;
# endif
# if __GNUC__ < 4
/* Some compilers, including GCC prior to v4, may get upset
- * if we try to specifiy these typedefs more than once.
+ * if we try to specify these typedefs more than once.
*/
# define __have_typedef_ssize_t
# endif