From c6af6b1b947f8b367c22904bd5b31079784059f6 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 15 Jan 2009 01:53:08 +0000 Subject: * symbian/README.SYMBIAN: symbian support added. great appreciate to . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dln.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'dln.c') diff --git a/dln.c b/dln.c index d3408fb0f6..d27d79e8e5 100644 --- a/dln.c +++ b/dln.c @@ -1268,6 +1268,16 @@ dln_load(const char *file) # define RTLD_GLOBAL 0 #endif +#if defined __SYMBIAN32__ + { /* Need backslash in the path again */ + char *p; + for (p = (char *)file; *p; p++) { + if (*p == '/') { + *p = '\\'; + } + } + } +#endif /* Load file */ if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) { error = dln_strerror(); @@ -1275,6 +1285,10 @@ dln_load(const char *file) } init_fct = (void(*)())dlsym(handle, buf); +#if defined __SYMBIAN32__ + if (init_fct == NULL) + init_fct = (void(*)())dlsym(handle, "1"); /* Some Symbian versions do not support symbol table in DLL, ordinal numbers only */ +#endif if (init_fct == NULL) { error = DLN_ERROR(); dlclose(handle); -- cgit v1.2.1