summaryrefslogtreecommitdiffstats
path: root/missing
diff options
context:
space:
mode:
authorsiena <siena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-21 16:23:07 +0000
committersiena <siena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-21 16:23:07 +0000
commitab22e879635e564a25996989f5ccca1954c2fb4b (patch)
tree305c0ab6dc14ab409424dcbdd0ab0410abcdccda /missing
parentcfb5509f9720a34325cfde1618eab3e72933cd5c (diff)
downloadruby-ab22e879635e564a25996989f5ccca1954c2fb4b.tar.gz
ruby-ab22e879635e564a25996989f5ccca1954c2fb4b.tar.xz
ruby-ab22e879635e564a25996989f5ccca1954c2fb4b.zip
* missing/os2.c (chdir, getcwd):
use _chdir2 and _getcwd2 supporting multiple drives in OS/2 with EMX. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/os2.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/missing/os2.c b/missing/os2.c
index beea824b9..14f663fe5 100644
--- a/missing/os2.c
+++ b/missing/os2.c
@@ -25,6 +25,29 @@ link(char *from, char *to)
}
#endif
+#if defined(EMX_REPLACE_GETCWD) && (EMX_REPLACE_GETCWD) \
+ || defined(EMX_REPLACE_CHDIR) && (EMX_REPLACE_CHDIR)
+#include <unistd.h>
+
+#if defined(EMX_REPLACE_GETCWD) && (EMX_REPLACE_GETCWD)
+/* to handle the drive letter and DBCS characters within a given path */
+char *
+getcwd(char *path, size_t len)
+{
+ return _getcwd2(path, (int)len);
+}
+#endif
+
+#if defined(EMX_REPLACE_CHDIR) && (EMX_REPLACE_CHDIR)
+/* to handle the drive letter and DBCS characters within a given path */
+int
+chdir(__const__ char *path)
+{
+ return _chdir2(path);
+}
+#endif
+#endif
+
typedef char* CHARP;
int