[gnome-commander] Use G_MODULE_SUFFIX for providing proper shared library suffix



commit 38b46747bba5db415d71d9d6ab4d014dfd3176d2
Author: Yaakov Selkowitz <yselkowitz users sourceforge net>
Date:   Thu May 12 22:22:04 2011 +0200

    Use G_MODULE_SUFFIX for providing proper shared library suffix

 src/plugin_manager.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugin_manager.cc b/src/plugin_manager.cc
index 1602b87..5746ab5 100644
--- a/src/plugin_manager.cc
+++ b/src/plugin_manager.cc
@@ -161,14 +161,14 @@ static void scan_plugins_in_dir (const gchar *dpath)
     {
         struct stat buf;
 
-        if (strcmp (ent->d_name+strlen(ent->d_name)-3, ".so") != 0)
+        if (strcmp (ent->d_name+strlen(ent->d_name)-strlen("." G_MODULE_SUFFIX), "." G_MODULE_SUFFIX) != 0)
             continue;
 
         if (stat (ent->d_name, &buf) == 0)
         {
             if (buf.st_mode & S_IFREG)
             {
-                // the direntry has the .so extension and is a regular file, lets accept it
+                // the direntry has the correct extension and is a regular file, let's accept it
                 PluginData *data = g_new0 (PluginData, 1);
                 data->fname = g_strdup (ent->d_name);
                 data->fpath = g_build_filename (dpath, ent->d_name, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]