The documentation of the Gnulib module 'flock' says that no replacement is provided on AIX, HP-UX, Solaris. This is wrong: The lib/flock.c file _does_ provide a replacement in this case, based on fcntl. However, I see a unit test failure for it on Solaris 11.3 and AIX 7.1.
I don't know if this is due to different semantics of locking facilities, as described in http://www.perkin.org.uk/posts/solaris-portability-flock.html https://gavv.github.io/articles/file-locks/ https://unix.stackexchange.com/questions/1777/flock2-versus-fcntl2-over-a-nfs 2021-01-06 Bruno Haible <br...@clisp.org> flock: Update documentation. * doc/glibc-functions/flock.texi: Document what to expect on AIX and Solaris. diff --git a/doc/glibc-functions/flock.texi b/doc/glibc-functions/flock.texi index 41cca4c..bc93a67 100644 --- a/doc/glibc-functions/flock.texi +++ b/doc/glibc-functions/flock.texi @@ -13,11 +13,12 @@ Portability problems fixed by Gnulib: @item This function is missing on some platforms: mingw, MSVC 14 +@item +This function is missing on some platforms: +AIX 7.1, HP-UX 11.23, Solaris 11.4. +But the replacement function does not really work; it exhibits test failures. @end itemize Portability problems not fixed by Gnulib: @itemize -@item -This function is missing on some platforms: -AIX 5.1, HP-UX 11.23, Solaris 11.4. @end itemize