From d0149b9e210450113353e9bc8dc1f151f4563313 Mon Sep 17 00:00:00 2001 From: siena Date: Wed, 21 Jan 2004 16:23:07 +0000 Subject: * missing/os2.c (chdir, getcwd): use _chdir2 and _getcwd2 supporting multiple drives in OS/2 with EMX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/os2.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'missing/os2.c') diff --git a/missing/os2.c b/missing/os2.c index beea824b95..14f663fe53 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 + +#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 -- cgit v1.2.3