summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-15 01:53:08 (GMT)
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-15 01:53:08 (GMT)
commitc6af6b1b947f8b367c22904bd5b31079784059f6 (patch)
tree079fc0c321ed4bd793f10b9113a5a6ee96d95c48 /dln.c
parente24346d6c6b4bdf91e1e32bfd53a328086b8d772 (diff)
* symbian/README.SYMBIAN: symbian support added. great appreciate
to <alexandre.zavorine at symbian.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/dln.c b/dln.c
index d3408fb..d27d79e 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);