comparison libpurple/plugin.c @ 29476:39716f7d2c93

Kill off unneeded GLIB_CHECK_VERSION checks in libpurple. Refs #10024.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sat, 22 Aug 2009 21:47:20 +0000
parents b131c68822ce
children 4f6b06139734
comparison
equal deleted inserted replaced
29475:299ef6fd1a23 29476:39716f7d2c93
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 */