OSDN Git Service

Factor out <ctype.h> vs. <wctype.h> duplicate elements.
[mingw/mingw-org-wsl.git] / mingwrt / ChangeLog
index 7e2001b..84588ad 100644 (file)
@@ -1,3 +1,105 @@
+2016-07-09  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Factor out <ctype.h> vs. <wctype.h> duplicate elements.
+
+       * include/ctype.h: Assert copyright; tidy layout.
+       [!_CTYPE_H_]: Do not evaluate; rename macro to be tested, as...
+       [!_CTYPE_H]: ...this preferred multiple inclusion guard macro name.
+       (__CTYPE_H_SOURCED__): New macro; define it, and include <wctype.h>,
+       so requesting partial inclusion, to retrieve definitions for...
+       (_ALPHA, _BLANK, _CONTROL, _DIGIT, _HEX, _LOWER, _PUNCT, _SPACE)
+       (_UPPER, WEOF): ...these macros; hence, do not define them locally.
+       (wint_t, wchar_t, wctype_t): Likewise these type definitions...
+       (iswalnum, iswalpha, iswascii, iswblank, iswcntrl, iswctype)
+       (iswdigit, iswgraph, iswlower, iswprint, iswpunct, iswspace)
+       (iswupper, iswxdigit, towlower, towupper, is_wctype): ...these function
+       prototypes, and corresponding inline alternative implementations.
+       (_BEGIN_C_DECLS, _END_C_DECLS): Use these as appropriate.
+       [__MSVCRT_VERSION__<=__MSVCR70_DLL]: Likewise.
+
+       * include/wctype.h: Assert copyright; tidy layout.
+       [!_WCTYPE_H_]: Do not evaluate; rename macro to be tested, as...
+       [!_WCTYPE_H]: ...this preferred multiple inclusion guard macro name;
+       do not define it when partial inclusion only is selected, by...
+       [__CTYPE_H_SOURCED__]: ...this; thence define only...
+       (_ALPHA, _BLANK, _CONTROL, _DIGIT, _HEX, _LOWER, _PUNCT, _SPACE)
+       (_UPPER): ...these character characterisation macros...
+       (wint_t, wchar_t, wctype_t): ...these type definitions...
+       (iswalnum, iswalpha, iswascii, iswblank, iswcntrl, iswctype)
+       (iswdigit, iswgraph, iswlower, iswprint, iswpunct, iswspace)
+       (iswupper, iswxdigit, towlower, towupper): ...these function
+       prototypes, with corresponding inline alternative implementations...
+       (is_wctype): ...this further prototype, qualified as deprecated...
+       (WEOF): ...and this status reporting macro.
+       (_ctype, _pctype, _pctype_dll, _imp___ctype, _imp___pctype): Delete
+       declarations, and associated definitions; they do not belong here.
+       (isleadbyte): Likewise, this Microsoft specific function prototype...
+       (_LEADBYTE): ...and this associated character classification macro.
+       (_BEGIN_C_DECLS, _END_C_DECLS): Use these as appropriate.
+
+2016-07-04  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Do not pass MAKEFLAGS explicitly, when invoking recursive make.
+
+       * Makefile.in (install-strip, uninstall): Delete explicit $(MAKEFLAGS)
+       references from $(MAKE) command lines; make passes them implicitly.
+
+2016-07-03  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Rework tsearch and friends; resolve issues [#1512] and [#1576].
+
+       * include/search.h: Assert copyright; tidy layout.
+       (_SEARCH_H_): Rename this multiple inclusion guard macro...
+       (_SEARCH_H): ...to conform to this preferred standard convention.
+       (__search_comparator): New function prototype typedef; it provides a
+       convenient shorthand notation for argument declarations in functions
+       which require a comparator function pointer; use it where appropriate.
+       (tsearch, tfind, tdelete) [__MINGW_ATTRIB_NONNULL]: Apply to arguments
+       #2 and #3; was previously incorrectly applied to arguments #1 and #3.
+       (twalk) [__MINGW_ATTRIB_NONNULL]: Apply to both arguments #1 and #2.
+       [_SEARCH_PRIVATE] (__MINGW_ATTRIB_NONNULL): Suppress its effect, to
+       ensure that GCC does not optimize away checks within implementation.
+       (_BEGIN_C_DECLS, _END_C_DECLS): Use these.
+
+       * mingwex/tdelete.c: Tidy layout.
+       (tdelete): Reimplement it as a thin wrapper around...
+       (__tdelete): ...this; it encapsulates the original implementation as a
+       __CRT_ALIAS (inline) function, to simplify void ** --> node_t ** casts.
+       Remove unnecessary non-null assertions for arguments #1 and #3; prefer
+       to validate arguments #2 and #3 internally, and simply return NULL if
+       necessary; hence, do not include <assert.h>
+
+       * mingwex/tfind.c: Tidy layout.
+       (tfind): Similarly reimplement it as a thin wrapper around...
+       (__tfind): ...this __CRT_ALIAS (inline) encapsulation of the original.
+       Add non-null validation for argument #3; do not include <assert.h>
+
+       * mingwex/tsearch.c: Tidy layout.
+       (tsearch): Once again, reimplement it as a thin wrapper around...
+       (__tsearch): ...this __CRT_ALIAS variant.  Add non-null validation for
+       argument #3; do not include <assert.h>
+
+       * mingwex/twalk.c: Tidy layout; do not include <assert.h>
+
+2016-06-28  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Rework __try1/__except1 to resolve issue [#1328].
+
+       * include/excpt.h: Assert copyright; tidy layout.
+       (_EXCPT_H_): Multiple inclusion guard macro renamed to...
+       (_EXCPT_H): ...this; update all references as appropriate.
+       (_BEGIN_C_DECLS, _END_C_DECLS): Use these.
+       (__typecast_alloca): New macro; define it, casting return type of...
+       (__builtin_alloca): ...this to a specified data type; use it in...
+       (__try1_setup, __except1_teardown): ...these new macros; define them
+       as parameterized templates, providing both -masm-att and -masm-intel
+       syntax implementations, with host specific word size and register
+       assignment parameter substitutions; use them to redefine...
+       (__try1, __except1): ...each of these, using __builtin_alloca to avoid
+       direct stack pushes when registering exception handlers; assign the
+       template parameters as appropriate to support implementation for...
+       [_WIN64, _WIN32]: ...either of these, as the host requires.
+
 2016-06-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Merge Cygwin CVS updates to legacy branch.