summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-25 11:34:04 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-25 11:34:04 (GMT)
commit8b905bd9d40f0545e054737b8796a18366546ffc (patch)
treeb2b62946432510b703420013a926d7a5155ade25 /Modules
parente0be4232971edca23438cc3d79761141f2de124f (diff)
downloadcpython-8b905bd9d40f0545e054737b8796a18366546ffc.zip
cpython-8b905bd9d40f0545e054737b8796a18366546ffc.tar.gz
cpython-8b905bd9d40f0545e054737b8796a18366546ffc.tar.bz2
Issue #13226: Add RTLD_xxx constants to the os module. These constants can by
used with sys.setdlopenflags().
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index fa50296..f4476b7 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -121,6 +121,10 @@ corresponding Unix manual entries for more information on calls.");
#endif
#endif
+#ifdef HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
/* Various compilers have only certain posix functions */
/* XXX Gosh I wish these were all moved into pyconfig.h */
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
@@ -11423,6 +11427,28 @@ all_ins(PyObject *d)
if (ins(d, "XATTR_SIZE_MAX", (long)XATTR_SIZE_MAX)) return -1;
#endif
+#ifdef RTLD_LAZY
+ if (PyModule_AddIntMacro(d, RTLD_LAZY)) return -1;
+#endif
+#ifdef RTLD_NOW
+ if (PyModule_AddIntMacro(d, RTLD_NOW)) return -1;
+#endif
+#ifdef RTLD_GLOBAL
+ if (PyModule_AddIntMacro(d, RTLD_GLOBAL)) return -1;
+#endif
+#ifdef RTLD_LOCAL
+ if (PyModule_AddIntMacro(d, RTLD_LOCAL)) return -1;
+#endif
+#ifdef RTLD_NODELETE
+ if (PyModule_AddIntMacro(d, RTLD_NODELETE)) return -1;
+#endif
+#ifdef RTLD_NOLOAD
+ if (PyModule_AddIntMacro(d, RTLD_NOLOAD)) return -1;
+#endif
+#ifdef RTLD_DEEPBIND
+ if (PyModule_AddIntMacro(d, RTLD_DEEPBIND)) return -1;
+#endif
+
#if defined(PYOS_OS2)
if (insertvalues(d)) return -1;
#endif