(cherry picked from commit 65c7884)
encodings: use only one iconv definition [backport:1.2] (#14741)
Fix an issue reported on IRC: using encodings with --dynlibOverrideAll result in duplicated iconv definitions, causing compile errors. This commit remove the `var` wrapper of iconv and go all out on pointers, as it should due to how the API accepts nil. Also corrected the API to resemble iconv(3p). (cherry picked from commit c7dee55)
[backport] Docs: Fix broken code-block (#14749)
This commit indents the contents of a `code-block` in `httpclient.nim` so that it displays correctly. The bug was introduced by 42a6424. I did a quick search for other `code-block`s that are broken in the same way, but the only other one I found (in `pegs.nim`) is not included in the generated documentation. (cherry picked from commit 1e484ed)
posix_other: add define to force time_t to 64 bit [backport] (#14753)
This is a temporary remedy for time_t transition to 64 bit on newer Linux libc (musl >= 1.2.0, glibc >= 2.32). In the future we might want to move away from libc, or figure out a way to reliably detect the real size of C types at compile time, both of which are difficult. (cherry picked from commit c8554eb)
SSL_CTX_load_verify_locations parameters are reversed (#14815) [backp…
…ort] (cherry picked from commit d968163)
fix #14082, don't crash on incorrectly formatted input (#14977) [back…
…port] (cherry picked from commit c625130)
fix odbc regressions (#15009) [backport]
* fix odbc regressions * make only necessary changes (cherry picked from commit edbbbdf)
[Backport] Fixes callbacks being dropped on Linux/macOS/BSD. (#15012)
Fixes #15003. This is a serious bug which occurs when data cannot be read/sent immediately and there are a bunch of other read/write events pending. What happens is that the new events are dropped which results in the case of the reported bug resulted in some data not being sent (!). (cherry picked from commit 1e3a0ef)
fix several newline problems (#15028) [backend]
* prevent newlines where they shouldn't be * 'contentLength' shouldn't be negative (cherry picked from commit 5fafa2f)
asyncftpclient.nim - don't assume a sufficiend line length (#14973)
(cherry picked from commit f4f21c8)
enforce browsers.nim only handles URLs [backport] (#15045)
(cherry picked from commit 925dd92)
Fulfill #14995 (comment) (#15104)
request. This can be conceived as an alternate, more capable resolution of #12200 than #12208 The code re-org idea here is to upgrade tablimpl.nim:`delImpl`/`delImplIdx` to abstract client code conventions for cell emptiness & cell hashing via three new template arguments - `makeEmpty`, `cellEmpty`, `cellHash` which all take a single integer argument and clear a cell, test if clear or produce the hash of the key stored at that index in `.data[]`. Then we update the 3 call sites (`Table`, `CountTable`, `SharedTable`) of `delImpl`/`delImplIdx` by defining define those arguments just before the first invocation as non-exported templates. Because `CountTable` does not save hash() outputs as `.hcode`, it needs a new tableimpl.nim:`delImplNoHCode` which simply in-lines the hash search when no `.hcode` field is available for "prefix compare" acceleration. It is conceivable this new template could be used by future variants, such as one optimized for integer keys where `hash()` and `==` are fast and `.hcode` is both wasted space & time (though a small change to interfaces there for a sentinel key meaning "empty" is needed for maximum efficiency). We also eliminate the old O(n) `proc remove(CountTable...)` in favor of simply invoking the new `delImpl*` templates and take care to correctly handle the case where `val` is either zero for non-existent keys in `inc` or evolves to zero over time in `[]=` or `inc`. The only user-visible changes from the +-42 delta here are speed, iteration order post deletes, and relaxing the `Positive` constraint on `val` in `proc inc` again, as indicated in the `changelog.md` entry. (cherry picked from commit b2a1944)
(cherry picked from commit c90c53e)
(cherry picked from commit 12a9fe0)
(cherry picked from commit aae998f)
parsecsv: fix '\0' being displayed as '0' in docs (#15086) [backport]
(cherry picked from commit a62bc55)
Attempt to explain better why delImplIdx is the way it is. Maybe this…