Simon Josefsson wrote: > For OATH Toolkit, I bumped gnulib to stable-202607 > 3d3f20e949413f1ebade541e43495ba32ad68516 and got the build error below, > any ideas? > > Do we need to back-port 0f83f0223badbbd228da9d15b7cb7937d866ad5a? It > seems to change stricmp into _wcsnicmp.
I prefer to fix that directly, without backporting a patch that is merely an optimization. 2026-10-11 Bruno Haible <[email protected]> fstat, stat: Fix compilation error on native Windows (regr. 2026-09-05). Reported by Simon Josefsson in <https://lists.gnu.org/archive/html/bug-gnulib/2026-10/msg00043.html>. * lib/stat-w32.c (_gl_fstat_by_handle): Use _strnicmp, not _stricmp. diff --git a/lib/stat-w32.c b/lib/stat-w32.c index b313f86db0..9329182196 100644 --- a/lib/stat-w32.c +++ b/lib/stat-w32.c @@ -290,10 +290,10 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf) if (length >= 4 && fpath[length - 4] == '.') { const char *suffix = fpath + length - 3; - if (_stricmp (suffix, "exe", 3) == 0 - || _stricmp (suffix, "bat", 3) == 0 - || _stricmp (suffix, "cmd", 3) == 0 - || _stricmp (suffix, "com", 3) == 0) + if (_strnicmp (suffix, "exe", 3) == 0 + || _strnicmp (suffix, "bat", 3) == 0 + || _strnicmp (suffix, "cmd", 3) == 0 + || _strnicmp (suffix, "com", 3) == 0) mode |= S_IEXEC_UGO; } }
