This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sable
Recipients darkside, drj, haubi, inkblotter, pitrou, sable
Date 2010-09-07.14:51:16
SpamBayes Score 7.608884e-05
Marked as misclassified No
Message-id <1283871078.3.0.375167820076.issue4026@psf.upfronthosting.co.za>
In-reply-to
Content
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]
History
Date User Action Args
2010-09-07 14:51:18sablesetrecipients: + sable, pitrou, drj, inkblotter, darkside, haubi
2010-09-07 14:51:18sablesetmessageid: <1283871078.3.0.375167820076.issue4026@psf.upfronthosting.co.za>
2010-09-07 14:51:17sablelinkissue4026 messages
2010-09-07 14:51:16sablecreate