static const char suffix[] = "_plugin"LIBEXT;
size_t len = strlen (file);
+#ifndef __OS2__
/* Check that file matches the "lib*_plugin"LIBEXT pattern */
if (len > strlen (suffix)
&& !strncmp (file, prefix, strlen (prefix))
&& !strcmp (file + len - strlen (suffix), suffix))
+#else
+ /* We load all the files ending with LIBEXT on OS/2,
+ * because OS/2 has a 8.3 length limitation for DLL name */
+ if (len > strlen (LIBEXT)
+ && !strcasecmp (file + len - strlen (LIBEXT), LIBEXT))
+#endif
AllocatePluginFile (bank, abspath, relpath, &st);
}
else if (S_ISDIR (st.st_mode))
return 0;
}
+#ifdef __OS2__
+# define EXTERN_PREFIX "_"
+#else
+# define EXTERN_PREFIX
+#endif
+
+
/**
* Loads a dynamically-linked plug-in into memory and initialize it.
*
return NULL;
/* Try to resolve the symbol */
- static const char entry_name[] = "vlc_entry" MODULE_SUFFIX;
+ static const char entry_name[] = EXTERN_PREFIX "vlc_entry" MODULE_SUFFIX;
vlc_plugin_cb entry =
(vlc_plugin_cb) module_Lookup (handle, entry_name);
if (entry == NULL)