Issue #26932: Fixed support of RTLD_* constants defined as enum values,

not via macros (in particular on Android).  Patch by Chi Hsuan Yen.
This commit is contained in:
Serhiy Storchaka 2016-05-04 09:44:44 +03:00
parent 0e120525f0
commit c2f7d87897
8 changed files with 124 additions and 12 deletions

View file

@ -25,7 +25,7 @@ to avoid the expense of doing their own locking).
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#ifndef RTLD_LAZY
#if !HAVE_DECL_RTLD_LAZY
#define RTLD_LAZY 1
#endif
#endif
@ -91,7 +91,7 @@ PyInterpreterState_New(void)
interp->fscodec_initialized = 0;
interp->importlib = NULL;
#ifdef HAVE_DLOPEN
#ifdef RTLD_NOW
#if HAVE_DECL_RTLD_NOW
interp->dlopenflags = RTLD_NOW;
#else
interp->dlopenflags = RTLD_LAZY;