comparison libpurple/plugin.c @ 29786:f549ad844d54

propagate from branch 'im.pidgin.pidgin.next.minor' (head 42544ec892337510146c931806a95dbf69c2fe30) to branch 'im.pidgin.pidgin' (head 32a27a2c6eebcccdecd7d7cd420b3789c69cbb09)
author Mark Doliner <mark@kingant.net>
date Thu, 18 Feb 2010 09:22:01 +0000
parents 39716f7d2c93
children 4f6b06139734
comparison
equal deleted inserted replaced
29785:4c266d9c17eb 29786:f549ad844d54
252 * We pass G_MODULE_BIND_LOCAL here to prevent symbols from 252 * We pass G_MODULE_BIND_LOCAL here to prevent symbols from
253 * plugins being added to the global name space. 253 * plugins being added to the global name space.
254 * 254 *
255 * G_MODULE_BIND_LOCAL was added in glib 2.3.3. 255 * G_MODULE_BIND_LOCAL was added in glib 2.3.3.
256 */ 256 */
257 #if GLIB_CHECK_VERSION(2,3,3)
258 plugin->handle = g_module_open(filename, G_MODULE_BIND_LOCAL); 257 plugin->handle = g_module_open(filename, G_MODULE_BIND_LOCAL);
259 #else
260 plugin->handle = g_module_open(filename, 0);
261 #endif
262 258
263 if (plugin->handle == NULL) 259 if (plugin->handle == NULL)
264 { 260 {
265 const char *error = g_module_error(); 261 const char *error = g_module_error();
266 if (error != NULL && purple_str_has_prefix(error, filename)) 262 if (error != NULL && purple_str_has_prefix(error, filename))
285 { 281 {
286 plugin->error = g_strdup(error); 282 plugin->error = g_strdup(error);
287 purple_debug_error("plugins", "%s is not loadable: %s\n", 283 purple_debug_error("plugins", "%s is not loadable: %s\n",
288 plugin->path, plugin->error); 284 plugin->path, plugin->error);
289 } 285 }
290 #if GLIB_CHECK_VERSION(2,3,3)
291 plugin->handle = g_module_open(filename, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); 286 plugin->handle = g_module_open(filename, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
292 #else
293 plugin->handle = g_module_open(filename, G_MODULE_BIND_LAZY);
294 #endif
295 287
296 if (plugin->handle == NULL) 288 if (plugin->handle == NULL)
297 { 289 {
298 #ifdef _WIN32 290 #ifdef _WIN32
299 /* Restore the original error mode */ 291 /* Restore the original error mode */