diff options
author | marha <marha@users.sourceforge.net> | 2014-10-12 13:48:53 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-12 13:48:53 +0200 |
commit | 9480392b8817f8bfa79cbc694ff039a73fc0a57f (patch) | |
tree | 97ef021d0b664b2459dedee4e7e7775f73caf017 /xorg-server/hw/xfree86/loader | |
parent | f308aa9cf1ab2ec9e0086e98f07a20aaa79148a1 (diff) | |
download | vcxsrv-9480392b8817f8bfa79cbc694ff039a73fc0a57f.tar.gz vcxsrv-9480392b8817f8bfa79cbc694ff039a73fc0a57f.tar.bz2 vcxsrv-9480392b8817f8bfa79cbc694ff039a73fc0a57f.zip |
plink fontconfig libxcb xserver mesa pixman git update 12 Oct 2014
plink 10285
xserver commit 61a292adf45405641de1c522a04c148e0a152acd
libxcb commit 382d306d6c44a9ece5551c210a932773b5cb94a5
libxcb/xcb-proto commit dc0c544fe044ddeb4917bba0c2fed66c70e6db43
xkeyboard-config commit 73aa90ce32967747c84a1b5fe32cee329bc3bbcf
libX11 commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68
libXdmcp commit fe8eab93e9bcdbe8bb8052434bb5e676e3a0ee8f
libXext commit efdcbb7634501e1117d422636a0a75d7ea84b16b
libfontenc commit 0037a42107b952c9d903719615747e760e4e7247
libXinerama commit edd95182b26eb5d576d4878c559e0f17dddaa909
libXau commit 1e4635be11154dd8262f37b379511bd627defa2a
xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18
pixman commit a8669137b9b95b5a6f78c880a51c016a1dd439b4
xextproto commit 66afec3f49e8eb0d4c2e9af7088fc3116d4bafd7
randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6
glproto commit bd3d751e1eb17efb39f65093271bb4ac071aa9e0
mkfontscale commit 47908fd7a0d061fdcd21e3498da4e223ca9136d9
xwininfo commit 017b3736489985999d8dcf4d9e473e1fd6dd3647
libXft commit 214f9b5306d833e2787c75fe41dfdc9228fcb738
libXmu commit 22d9c590901e121936f50dee97dc60c4f7defb63
libxtrans commit 7cbad9fe2e61cd9d5caeaf361826a6f4bd320f03
fontconfig commit e7121de237a1873c3241a5b8451e7d00a3d41524
mesa commit 2286edce16e4f78500ccda77da99c30185d9c58f
Diffstat (limited to 'xorg-server/hw/xfree86/loader')
-rw-r--r-- | xorg-server/hw/xfree86/loader/loader.c | 22 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/loader/loadmod.c | 113 |
2 files changed, 50 insertions, 85 deletions
diff --git a/xorg-server/hw/xfree86/loader/loader.c b/xorg-server/hw/xfree86/loader/loader.c index cc41dcb4c..31329846a 100644 --- a/xorg-server/hw/xfree86/loader/loader.c +++ b/xorg-server/hw/xfree86/loader/loader.c @@ -71,24 +71,6 @@ #include <dlfcn.h> #include <X11/Xos.h> -#if defined(DL_LAZY) -#define DLOPEN_LAZY DL_LAZY -#elif defined(RTLD_LAZY) -#define DLOPEN_LAZY RTLD_LAZY -#elif defined(__FreeBSD__) -#define DLOPEN_LAZY 1 -#else -#define DLOPEN_LAZY 0 -#endif - -#if defined(LD_GLOBAL) -#define DLOPEN_GLOBAL LD_GLOBAL -#elif defined(RTLD_GLOBAL) -#define DLOPEN_GLOBAL RTLD_GLOBAL -#else -#define DLOPEN_GLOBAL 0 -#endif - #else #error i have no dynamic linker and i must scream #endif @@ -128,7 +110,7 @@ LoaderOpen(const char *module, int *errmaj, int *errmin) xf86Msg(X_INFO, "Loading %s\n", module); - if (!(ret = dlopen(module, DLOPEN_LAZY | DLOPEN_GLOBAL))) { + if (!(ret = dlopen(module, RTLD_LAZY | RTLD_GLOBAL))) { xf86Msg(X_ERROR, "Failed to load %s: %s\n", module, dlerror()); if (errmaj) *errmaj = LDR_NOLOAD; @@ -151,7 +133,7 @@ LoaderSymbol(const char *name) return p; if (!global_scope) - global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); + global_scope = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (global_scope) return dlsym(global_scope, name); diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c index 21ccb1bf9..7021bdd4c 100644 --- a/xorg-server/hw/xfree86/loader/loadmod.c +++ b/xorg-server/hw/xfree86/loader/loadmod.c @@ -77,12 +77,8 @@ typedef struct _pattern { static char *FindModule(const char *, const char *, const char **, PatternPtr); static Bool CheckVersion(const char *, XF86ModuleVersionInfo *, const XF86ModReqInfo *); -static void UnloadModuleOrDriver(ModuleDescPtr mod); static char *LoaderGetCanonicalName(const char *, PatternPtr); static void RemoveChild(ModuleDescPtr); -static ModuleDescPtr doLoadModule(const char *, const char *, const char **, - const char **, void *, - const XF86ModReqInfo *, int *, int *); const ModuleVersions LoaderVersionInfo = { XORG_VERSION_CURRENT, @@ -754,8 +750,8 @@ LoadSubModule(void *_parent, const char *module, return NULL; } - submod = doLoadModule(module, NULL, subdirlist, patternlist, options, - modreq, errmaj, errmin); + submod = LoadModule(module, NULL, subdirlist, patternlist, options, + modreq, errmaj, errmin); if (submod && submod != (ModuleDescPtr) 1) { parent->child = AddSibling(parent->child, submod); submod->parent = parent; @@ -818,10 +814,47 @@ static const char *compiled_in_modules[] = { NULL }; -static ModuleDescPtr -doLoadModule(const char *module, const char *path, const char **subdirlist, - const char **patternlist, void *options, - const XF86ModReqInfo * modreq, int *errmaj, int *errmin) +/* + * LoadModule: load a module + * + * module The module name. Normally this is not a filename but the + * module's "canonical name. A full pathname is, however, + * also accepted. + * path A comma separated list of module directories. + * subdirlist A NULL terminated list of subdirectories to search. When + * NULL, the default "stdSubdirs" list is used. The default + * list is also substituted for entries with value DEFAULT_LIST. + * patternlist A NULL terminated list of regular expressions used to find + * module filenames. Each regex should contain exactly one + * subexpression that corresponds to the canonical module name. + * When NULL, the default "stdPatterns" list is used. The + * default list is also substituted for entries with value + * DEFAULT_LIST. + * options A NULL terminated list of Options that are passed to the + * module's SetupProc function. + * modreq An optional XF86ModReqInfo* containing + * version/ABI/vendor-ABI requirements to check for when + * loading the module. The following fields of the + * XF86ModReqInfo struct are checked: + * majorversion - must match the module's majorversion exactly + * minorversion - the module's minorversion must be >= this + * patchlevel - the module's minorversion.patchlevel must be + * >= this. Patchlevel is ignored when + * minorversion is not set. + * abiclass - (string) must match the module's abiclass + * abiversion - must be consistent with the module's + * abiversion (major equal, minor no older) + * moduleclass - string must match the module's moduleclass + * string + * "don't care" values are ~0 for numbers, and NULL for strings + * errmaj Major error return. + * errmin Minor error return. + * + */ +ModuleDescPtr +LoadModule(const char *module, const char *path, const char **subdirlist, + const char **patternlist, void *options, + const XF86ModReqInfo * modreq, int *errmaj, int *errmin) { XF86ModuleData *initdata = NULL; char **pathlist = NULL; @@ -1009,61 +1042,11 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, return ret; } -/* - * LoadModule: load a module - * - * module The module name. Normally this is not a filename but the - * module's "canonical name. A full pathname is, however, - * also accepted. - * path A comma separated list of module directories. - * subdirlist A NULL terminated list of subdirectories to search. When - * NULL, the default "stdSubdirs" list is used. The default - * list is also substituted for entries with value DEFAULT_LIST. - * patternlist A NULL terminated list of regular expressions used to find - * module filenames. Each regex should contain exactly one - * subexpression that corresponds to the canonical module name. - * When NULL, the default "stdPatterns" list is used. The - * default list is also substituted for entries with value - * DEFAULT_LIST. - * options A NULL terminated list of Options that are passed to the - * module's SetupProc function. - * modreq An optional XF86ModReqInfo* containing - * version/ABI/vendor-ABI requirements to check for when - * loading the module. The following fields of the - * XF86ModReqInfo struct are checked: - * majorversion - must match the module's majorversion exactly - * minorversion - the module's minorversion must be >= this - * patchlevel - the module's minorversion.patchlevel must be - * >= this. Patchlevel is ignored when - * minorversion is not set. - * abiclass - (string) must match the module's abiclass - * abiversion - must be consistent with the module's - * abiversion (major equal, minor no older) - * moduleclass - string must match the module's moduleclass - * string - * "don't care" values are ~0 for numbers, and NULL for strings - * errmaj Major error return. - * errmin Minor error return. - * - */ -ModuleDescPtr -LoadModule(const char *module, const char *path, const char **subdirlist, - const char **patternlist, void *options, - const XF86ModReqInfo * modreq, int *errmaj, int *errmin) -{ - return doLoadModule(module, path, subdirlist, patternlist, options, - modreq, errmaj, errmin); -} - void -UnloadModule(void *mod) +UnloadModule(void *_mod) { - UnloadModuleOrDriver((ModuleDescPtr) mod); -} + ModuleDescPtr mod = _mod; -static void -UnloadModuleOrDriver(ModuleDescPtr mod) -{ if (mod == (ModuleDescPtr) 1) return; @@ -1083,9 +1066,9 @@ UnloadModuleOrDriver(ModuleDescPtr mod) } if (mod->child) - UnloadModuleOrDriver(mod->child); + UnloadModule(mod->child); if (mod->sib) - UnloadModuleOrDriver(mod->sib); + UnloadModule(mod->sib); free(mod->path); free(mod->name); free(mod); @@ -1100,7 +1083,7 @@ UnloadSubModule(void *_mod) if (mod == (ModuleDescPtr) 1) return; RemoveChild(mod); - UnloadModuleOrDriver(mod); + UnloadModule(mod); } static void |