libedit: Update to 20260512 and fix Cygwin build#6399
Conversation
lygstate
commented
Jun 25, 2026
- Bump snapshot to 20260512_3.1 (pkgrel 2).
- Refactor patches with _patches and apply via prepare() loop.
- Extend cygwin-build.patch with read.c sys/ioctl.h for CYGWIN.
- Remove libedit-20191231-3.1.patch; wchar_t display types break Cygwin.
Could you go into detail as to why? It was added in #2241 to fix openssh |
|
The patch changes only The problem is that the patch never updated the helpers that allocate/free those buffers. With GCC 15, The same failure happens on the current 20240808 snapshot with GCC 15.3.0, so this is not specific to the version bump; it is the toolchain catching the type mismatch that the one-line Without the patch, 20260512 builds cleanly with Open question: whether the original openssh/sftp prompt bug still reproduces without the patch on the new snapshot. I have not re-tested sftp interactively yet. If it does, we probably need either a fuller Cygwin patch (also switch |
|
I see, thanks for the details |
- Bump snapshot to 20260512_3.1 (pkgrel 1). - Refactor patches with _patches and apply via prepare() loop. - Extend cygwin-build.patch with read.c sys/ioctl.h for __CYGWIN__. - Add 0002-fixes-compiling-with-gcc-15-by-use-wchar_t.patch; replaces the incomplete libedit-20191231-3.1.patch from msys2#2241. Reproduction (Cygwin, GCC 15.3.0, libedit 20260512): Runtime (msys2#1697 / msys2#2241 openssh sftp prompt): on Cygwin, wchar_t is 2 bytes and wint_t is 4 bytes. libedit stores display cells as wint_t but reads them via (wchar_t *) casts. Small C test: wint_t display[] = { L's', L'f', L't', L'p', L'>', 0 }; wcslen((wchar_t *)display); /* prints len=1, shows 's' not 'sftp>' */ With wchar_t storage (what 0002 applies): wcslen returns 5, shows 'sftp>'. Build: the old el.h-only patch fails on GCC 15 (-Wincompatible-pointer-types is an error), e.g. refresh.c:108 and terminal.c:462/481. Without any wchar patch the tree builds but drops the msys2#2241 openssh fix. With cygwin-build.patch + 0002 the tree builds and keeps the fix. Compare patches on 20260512: libedit-20191231-3.1.patch (removed): el.h only; fails GCC 15 build. 0002 (added): el.h + terminal.c alloc/free + refresh.c locals; builds on GCC 15 and matches what lazka noted was missing at msys2#2241 merge time.
920cd2e to
3c3960a
Compare
fixed the issue. |