@ 260915.5

260804.1 · 8b661eb3d5ec3323bb88036318c7415fed80b6c9

MinGW portability fixes

- see also #553
- distinct OS_WIN versus OS_WIN_MINGW is necessary, since MinGW is almost windows but not quite, so most changes are for #ifdef checks with a few code blocks moved (no new logic)
- tested with MinGW-w64 UCRT64 with MSYS2 GCC 16.1
- updated verify.sh runs with 'make test' skips directory searches for MinGW, because of the lack of symlink support
- appease -Wunused

reading declarations

Changes to include/reflex/. All files

include/reflex/pattern.h

@@ -956,7 +956,7 @@ class Pattern {     static const uint16_t MAX_DEPTH = 256;        ///< analyze DFA up to states this deep to improve predict match     static const Index MAX_STATES = Const::GMAX/3;///< maximum number of DFA states is constrained by opcode table size     static const Index MAX_EDGES = 16*Const::GMAX;///< maximum number of DFA edges is constrained by opcode table size-    static const size_t MAX_POSITIONS = 4194304;  ///< maximum accumulated positions over all DFA states; position sets dominate construction memory when counted repetition overlaps a preceding repeat, so this bounds worst-case memory to fail fast instead of exhausting RAM+    static const Index MAX_POSITIONS = 4194304;   ///< maximum accumulated positions over all DFA states     static const Index DEAD_PATH = 1;             ///< state marker "path always and only reaches backedges" (a dead end)     static const Index KEEP_PATH = MAX_DEPTH;     ///< state marker "required path" (from a newline edge)     static const Index LOOP_PATH = MAX_DEPTH + 1; ///< state marker "path reaches a backedge" (collect lookback chars)@@ -997,7 +997,7 @@ class Pattern {       s->swap(pos);       return s;     }-    /// new DFA state with optional tree DFA node and positions, destroys pos.+    /// new DFA state with optional tree DFA node and positions.     State *state(State *tnode)     {       State *s = state();

include/reflex/timer.h

@@ -40,7 +40,9 @@ #if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_WIN64) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(__BORLANDC__)  // disable min/max macros to use std::min and std::max+#ifndef NOMINMAX #define NOMINMAX+#endif  #include <windows.h>