Branch data Line data Source code
1 : : #include "config.h" 2 : : 3 : : /* 4 : : * This is the only way to disable deprecation warnings for macros, and we need 5 : : * to continue using G_MODULE_SUFFIX in the implementation of 6 : : * g_module_build_path() which is also deprecated API. 7 : : */ 8 : : #ifndef GLIB_DISABLE_DEPRECATION_WARNINGS 9 : : #define GLIB_DISABLE_DEPRECATION_WARNINGS 10 : : #endif 11 : : 12 : : #include <glib.h> 13 : : 14 : : #if (G_MODULE_IMPL == G_MODULE_IMPL_AR) || (G_MODULE_IMPL == G_MODULE_IMPL_DL) 15 : : G_GNUC_INTERNAL gchar* _g_module_build_path (const gchar *directory, 16 : : const gchar *module_name); 17 : : 18 : : gchar* 19 : 0 : _g_module_build_path (const gchar *directory, 20 : : const gchar *module_name) 21 : : { 22 [ # # # # ]: 0 : if (directory && *directory) { 23 [ # # ]: 0 : if (strncmp (module_name, "lib", 3) == 0) 24 : 0 : return g_strconcat (directory, "/", module_name, NULL); 25 : : else 26 : 0 : return g_strconcat (directory, "/lib", module_name, "." G_MODULE_SUFFIX, NULL); 27 [ # # ]: 0 : } else if (strncmp (module_name, "lib", 3) == 0) 28 : 0 : return g_strdup (module_name); 29 : : else 30 : 0 : return g_strconcat ("lib", module_name, "." G_MODULE_SUFFIX, NULL); 31 : : } 32 : : #endif