Fix HAVE_LOCKF in dtoolbase.h for python headers that don't define it.

This commit is contained in:
kestred 2014-01-19 17:33:19 -07:00
parent 5f136ca281
commit f4bf740362
1 changed files with 15 additions and 4 deletions

View File

@ -104,10 +104,21 @@
#endif
#ifdef HAVE_PYTHON
#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE
#undef HAVE_LOCKF
#include "pyconfig.h"
# undef _POSIX_C_SOURCE
# undef _XOPEN_SOURCE
// Some versions of python also define HAVE_LOCKF
# ifdef HAVE_LOCKF
# define PANDA_HAVE_LOCKF
# undef HAVE_LOCKF
# endif
# include "pyconfig.h"
// Restore our HAVE_LOCKF if python didn't define it
# ifdef PANDA_HAVE_LOCKF
# undef PANDA_HAVE_LOCKF
# ifndef HAVE_LOCKF
# define HAVE_LOCKF 1
# endif
# endif
#endif
#ifndef HAVE_EIGEN