[gjs] [importer] Use G_MODULE_SUFFIX



commit d1df9c9a973f6ecf1dd7e372fbdb5734ef0882ac
Author: Johan Dahlin <johan gnome org>
Date:   Tue Jun 8 17:58:49 2010 -0300

    [importer] Use G_MODULE_SUFFIX
    
    Fixes build on cygwin.
    
    Patch by yselkowitz users sourceforge net

 gjs/importer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gjs/importer.c b/gjs/importer.c
index c7902f6..8021340 100644
--- a/gjs/importer.c
+++ b/gjs/importer.c
@@ -509,7 +509,7 @@ do_import(JSContext  *context,
     result = JS_FALSE;
 
     filename = g_strdup_printf("%s.js", name);
-    native_filename = g_strdup_printf("%s.so", name);
+    native_filename = g_strdup_printf("%s."G_MODULE_SUFFIX, name);
     full_path = NULL;
     directories = NULL;
 
@@ -820,7 +820,7 @@ importer_new_enumerate(JSContext  *context,
                 if (g_file_test(full_path, G_FILE_TEST_IS_DIR)) {
                     g_ptr_array_add(iter->elements, g_strdup(filename));
                 } else {
-                    if (g_str_has_suffix(filename, ".so") ||
+                    if (g_str_has_suffix(filename, "."G_MODULE_SUFFIX) ||
                         g_str_has_suffix(filename, ".js")) {
                         g_ptr_array_add(iter->elements,
                                         g_strndup(filename, strlen(filename) - 3));



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