Sébastien Sablé <sa...@users.sourceforge.net> added the comment: Here is a new test for flock. HAVE_FLOCK is defined if we can link a C application calling flock, or if flock is defined in libbsd. FLOCK_NEEDS_LIBBSD is also defined in the second case.
AC_MSG_CHECKING(for flock) have_flock=no AC_TRY_LINK([ #include "confdefs.h" #include <sys/file.h> ], [void* p = flock; flock(0, 0)], [AC_CHECK_LIB(bsd,flock, [ AC_DEFINE(FLOCK_NEEDS_LIBBSD, 1, Define if flock needs to be linked with bsd library.) have_flock=yes ])], [have_flock=yes] ) if test "$have_flock" = yes ; then AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.) fi AC_MSG_RESULT($have_flock) I think that this new test would also cover your case with a broken AIX libbsd? [I haven't actually tried to compile it yet, if the behavior is OK I will test it in both autoconf formats and provide some new patches tomorrow] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4026> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com