NaCl runtime fixes
[mono.git] / eglib / src / gmodule-unix.c
index 87eb27aef2a4e5465ac29c180cf7cd4f0d9ca785..9dd5eaa3d543be12f59583fe0d439bfbaece2b32 100644 (file)
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
+#include <config.h>
+
 #include <glib.h>
 #include <gmodule.h>
 
-#if defined(__native_client__)
-GModule *
-g_module_open (const gchar *file, GModuleFlags flags)
-{
-       printf("dlopen() not supported on Native Client.\n");
-       return NULL;
-}
-
-
-gboolean
-g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
-{
-       return FALSE;
-}
-
-
-const gchar*
-g_module_error(void)
-{
-       return "dlopen not supported on Native Client.";
-}
-
-gboolean
-g_module_close (GModule *module)
-{
-       return FALSE;
-}
-
-gchar*
-g_module_build_path (const gchar *directory, const gchar *module_name)
-{
-       return NULL;
-}
-
-#else
-
-#ifdef G_OS_UNIX
+#if defined(G_OS_UNIX) && defined(HAVE_DLFCN_H)
 #include <dlfcn.h>
 
 /* For Linux and Solaris, need to add others as we port this */
@@ -322,5 +288,3 @@ g_module_build_path (const gchar *directory, const gchar *module_name)
        return g_strdup_printf ("%s%s" LIBSUFFIX, lib_prefix, module_name); 
 }
 
-#endif /* __native_client__ */
-