summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authoruema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-15 03:18:08 +0000
committeruema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-15 03:18:08 +0000
commitb19e36a214a864572baee3643ddb369cfeb94d77 (patch)
tree5bd7fecbef75dd74f4810cda212bf989f43a95a3 /dln.c
parentc476b6e05c1cae6de5d24b823e676566ae27de6c (diff)
* configure.in, defines.h, dir.c, dir.h, dln.c, error.c,
eval.c, file.c, hash.c, io.c, main.c, missing.c, process.c, ruby.c, rubysig.h, signal.c, st.c, util.c, util.h, bcc/Makefile.sub, win32/Makefile.sub, win32/win32.h, ext/Win32API/Win32API.c, ext/socket/getaddrinfo.c, ext/socket/getnameinfo.c, ext/socket/socket.c, ext/tcltklib/stubs.c : replace "NT" with "_WIN32", add DOSISH_DRIVE_LETTER * wince/exe.mak : delete \r at the end of lines. * wince/mswince-ruby17.def : delete rb_obj_become git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/dln.c b/dln.c
index a4034c6854..55b751223b 100644
--- a/dln.c
+++ b/dln.c
@@ -48,7 +48,7 @@ void *xrealloc();
#endif
#include <stdio.h>
-#if defined(NT) || defined(__VMS) || defined(_WIN32_WCE)
+#if defined(_WIN32) || defined(__VMS)
#include "missing/file.h"
#endif
#include <sys/types.h>
@@ -69,7 +69,7 @@ void *xrealloc();
# include <unistd.h>
#endif
-#if !defined(NT) && !defined(_WIN32_WCE)
+#ifndef _WIN32
char *getenv();
#endif
@@ -1598,7 +1598,7 @@ dln_find_exe(fname, path)
}
if (!path) {
-#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(__MACOS__) || defined(_WIN32_WCE)
+#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__MACOS__)
path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;.";
#else
path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
@@ -1669,9 +1669,11 @@ dln_find_1(fname, path, exe_flag)
if (strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0)
return fname;
if (exe_flag && strchr(fname, '/')) return fname;
-#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(__EMX__) || defined(_WIN32_WCE)
+#ifdef DOSISH
if (fname[0] == '\\') return fname;
+# ifdef DOSISH_DRIVE_LETTER
if (strlen(fname) > 2 && fname[1] == ':') return fname;
+# endif
if (strncmp(".\\", fname, 2) == 0 || strncmp("..\\", fname, 3) == 0)
return fname;
if (exe_flag && strchr(fname, '\\')) return fname;
@@ -1701,7 +1703,7 @@ dln_find_1(fname, path, exe_flag)
*/
if (*dp == '~' && (l == 1 ||
-#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(__EMX__) || defined(_WIN32_WCE)
+#if defined(DOSISH)
dp[1] == '\\' ||
#endif
dp[1] == '/')) {
@@ -1759,7 +1761,7 @@ dln_find_1(fname, path, exe_flag)
}
}
#endif
-#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(__EMX__) || defined(_WIN32_WCE)
+#if defined(DOSISH)
if (exe_flag) {
static const char *extension[] = {
#if defined(MSDOS)
@@ -1767,9 +1769,9 @@ dln_find_1(fname, path, exe_flag)
#if defined(DJGPP)
".btm", ".sh", ".ksh", ".pl", ".sed",
#endif
-#elif defined(__EMX__) || defined(NT) || defined(_WIN32_WCE)
+#elif defined(__EMX__) || defined(_WIN32)
".exe", ".com", ".cmd", ".bat",
-/* end of __EMX__ or NT or WINCE */
+/* end of __EMX__ or _WIN32 */
#else
".r", ".R", ".x", ".X", ".bat", ".BAT",
/* __human68k__ */
@@ -1795,7 +1797,7 @@ dln_find_1(fname, path, exe_flag)
#endif
}
}
-#endif /* MSDOS or NT or __human68k__ or __EMX__ */
+#endif /* MSDOS or _WIN32 or __human68k__ or __EMX__ */
/* if not, and no other alternatives, life is bleak */
if (*ep == '\0') {
return NULL;