summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-02 07:48:42 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-02 07:48:42 +0000
commit9a46002fc01b1b874d768b2e8372b725a9e8b298 (patch)
tree9e3660449780967673d6a687f00329710e899537 /ruby.c
parent173e2f6636701f7657a0acb3dcba33e9d66b562d (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index ddff163..52c551c 100644
--- a/ruby.c
+++ b/ruby.c
@@ -205,7 +205,7 @@ ruby_incpush(path)
void
ruby_init_loadpath()
{
-#if defined(_WIN32) || defined(DJGPP)
+#if defined(_WIN32) || defined(DJGPP) || defined(__EMX__)
char libpath[FILENAME_MAX+1];
char *p;
size_t rest;
@@ -214,6 +214,8 @@ ruby_init_loadpath()
#elif defined(DJGPP)
extern char *__dos_argv0;
strncpy(libpath, __dos_argv0, FILENAME_MAX);
+#elif defined(__EMX__)
+ _execname(libpath, FILENAME_MAX);
#endif
p = strrchr(libpath, '\\');
if (p) {