* autoload.cc (GetModuleHandleExW): Define.

* dlfcn.cc: Throughout mark exported symbols as extern "C".
	(dlopen): Unignore flags argument.  Define ret to NULL.  Fix typo in
	comment.  Support Glibc flags RTLD_NOLOAD and RTLD_NODELETE.
	* include/dlfcn.h:  Clean up comments.
	(RTLD_NODELETE): Define.
	(RTLD_NOLOAD): Define.
	(RTLD_DEEPBIND): Define.
This commit is contained in:
Corinna Vinschen
2011-08-16 14:44:26 +00:00
parent 56c387b1b3
commit 6bc64eac26
4 changed files with 50 additions and 16 deletions

View File

@ -1,6 +1,6 @@
/* dlfcn.h
Copyright 1998, 1999, 2000, 2001, 2010 Red Hat, Inc.
Copyright 1998, 1999, 2000, 2001, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@ -31,10 +31,18 @@ extern void dlfork (int);
#define RTLD_DEFAULT NULL
/* valid values for mode argument to dlopen */
#define RTLD_LOCAL 0 /* symbols in this dlopen'ed obj are not visible to other dlopen'ed objs */
#define RTLD_LAZY 1 /* lazy function call binding */
#define RTLD_NOW 2 /* immediate function call binding */
#define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj are visible to other dlopen'ed objs */
#define RTLD_LOCAL 0 /* Symbols in this dlopen'ed obj are not */
/* visible to other dlopen'ed objs. */
#define RTLD_LAZY 1 /* Lazy function call binding. */
#define RTLD_NOW 2 /* Immediate function call binding. */
#define RTLD_GLOBAL 4 /* Symbols in this dlopen'ed obj are visible */
/* to other dlopen'ed objs. */
/* Non-standard GLIBC extensions */
#define RTLD_NODELETE 8 /* Don't unload lib in dlcose. */
#define RTLD_NOLOAD 16 /* Don't load lib, just return handle if lib */
/* is already loaded, NULL otherwise. */
#define RTLD_DEEPBIND 32 /* Place lookup scope so that this lib is */
/* preferred over global scope. */
#ifdef __cplusplus
}