Permalink
Browse files

* 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: http://svn.ruby-lang.org/repos/ruby/trunk@3148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent b0306c7 commit 8a5578cf1a055823550a70c91ff4e8386f12e371 uema2 committed Dec 15, 2002
Showing with 134 additions and 133 deletions.
  1. +13 −0 ChangeLog
  2. +1 −1 bcc32/Makefile.sub
  3. +2 −2 configure.in
  4. +13 −7 defines.h
  5. +8 −11 dir.c
  6. +11 −9 dln.c
  7. +1 −1 error.c
  8. +1 −1 eval.c
  9. +1 −1 ext/Win32API/Win32API.c
  10. +1 −1 ext/socket/getaddrinfo.c
  11. +2 −2 ext/socket/getnameinfo.c
  12. +3 −3 ext/socket/socket.c
  13. +2 −2 ext/tcltklib/stubs.c
  14. +14 −40 file.c
  15. +1 −1 hash.c
  16. +11 −11 io.c
  17. +1 −1 main.c
  18. +1 −1 missing.h
  19. +1 −1 missing/flock.c
  20. +1 −1 missing/strftime.c
  21. +6 −6 process.c
  22. +3 −0 ruby.c
  23. +1 −1 rubysig.h
  24. +6 −6 signal.c
  25. +1 −1 st.c
  26. +5 −5 util.c
  27. +1 −1 util.h
  28. +1 −2 win32/Makefile.sub
  29. +8 −0 win32/win32.h
  30. +1 −1 wince/exe.mak
  31. +12 −13 wince/mswince-ruby17.def
View
@@ -1,3 +1,16 @@
+Sat Dec 15 12:15:00 2002 Takaaki Uematsu <mail@uema2.cjb.net>
+
+ * 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
+
Sun Dec 15 11:43:26 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* parse.y (dispose_string): dispose String object.
View
@@ -87,7 +87,7 @@ prefix = /usr
DESTDIR = $(prefix)
!endif
!ifndef CFLAGS
-CFLAGS = -q -DNT=1 $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w-
+CFLAGS = -q $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w-
!endif
!ifndef CPPFLAGS
CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)missing -DLIBRUBY_SO=\"$(LIBRUBY_SO)\"
View
@@ -354,7 +354,7 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h\
fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\
syscall.h pwd.h a.out.h utime.h memory.h direct.h sys/resource.h \
- sys/mkdev.h)
+ sys/mkdev.h sys/utime.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
@@ -1156,7 +1156,7 @@ case "$target_os" in
COMMON_LIBS=m
COMMON_MACROS="WIN32_LEAN_AND_MEAN="
COMMON_HEADERS="windows.h winsock.h"
- CFLAGS="-DNT -D__NO_ISOCEXT $CFLAGS"
+ CFLAGS="-D__NO_ISOCEXT $CFLAGS"
CCDLFLAGS=-DIMPORT ;;
esac
if test x"$enable_shared" = xyes; then
View
@@ -86,9 +86,16 @@ void xfree _((void*));
# define BDIGIT_DBL_SIGNED long
#endif
+#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
+#define DOSISH 1
+#ifndef _WIN32_WCE
+# define DOSISH_DRIVE_LETTER
+#endif
+#endif
+
/* define RUBY_USE_EUC/SJIS for default kanji-code */
#ifndef DEFAULT_KCODE
-#if defined(MSDOS) || defined(__CYGWIN__) || defined(__human68k__) || defined(__MACOS__) || defined(__EMX__) || defined(OS2) || defined(NT) || defined(_WIN32_WCE)
+#if defined(DOSISH) || defined(__CYGWIN__) || defined(__MACOS__) || defined(OS2)
#define DEFAULT_KCODE KCODE_SJIS
#else
#define DEFAULT_KCODE KCODE_EUC
@@ -106,7 +113,10 @@ void xfree _((void*));
#define HAVE_SYS_WAIT_H /* configure fails to find this */
#endif /* NeXT */
-#if defined(NT) || defined(_WIN32_WCE)
+#ifdef __CYGWIN__
+#undef _WIN32
+#endif
+#ifdef _WIN32
#include "win32/win32.h"
#endif
@@ -137,11 +147,7 @@ void xfree _((void*));
#define FLUSH_REGISTER_WINDOWS /* empty -- nothing to do here */
#endif
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
-#define DOSISH 1
-#endif
-
-#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(OS2) || defined(_WIN32_WCE)
+#if defined(DOSISH)
#define PATH_SEP ";"
#elif defined(riscos)
#define PATH_SEP ","
View
19 dir.c
@@ -21,10 +21,10 @@
#include <unistd.h>
#endif
-#if defined HAVE_DIRENT_H && !defined NT && !defined _WIN32_WCE
+#if defined HAVE_DIRENT_H && !defined _WIN32
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
-#elif defined HAVE_DIRECT_H && !defined NT && !defined _WIN32_WCE
+#elif defined HAVE_DIRECT_H && !defined _WIN32
# include <direct.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
@@ -39,7 +39,7 @@
# if HAVE_NDIR_H
# include <ndir.h>
# endif
-# if defined(NT) || defined(_WIN32_WCE)
+# ifdef _WIN32
# include "win32/dir.h"
# endif
#endif
@@ -79,10 +79,7 @@ char *strchr _((char*,char));
# define CharNext(p) ((p) + 1)
# endif
#endif
-#ifdef _WIN32_WCE
-#undef CharNext
-#define CharNext CharNextA
-#endif
+
#if defined DOSISH
#define isdirsep(c) ((c) == '/' || (c) == '\\')
static char *
@@ -538,7 +535,7 @@ dir_s_mkdir(argc, argv, obj)
SafeStringValue(path);
rb_secure(2);
-#if !defined(NT) && !defined(_WIN32_WCE)
+#ifndef _WIN32
if (mkdir(RSTRING(path)->ptr, mode) == -1)
rb_sys_fail(RSTRING(path)->ptr);
#else
@@ -607,7 +604,7 @@ extract_path(p, pend)
alloc = ALLOC_N(char, len+1);
memcpy(alloc, p, len);
if (len > 1 && pend[-1] == '/'
-#if defined DOSISH
+#if defined DOSISH_DRIVE_LETTER
&& pend[-2] != ':'
#endif
) {
@@ -766,10 +763,10 @@ glob_helper(path, sub, flags, func, arg)
break;
}
-#if defined DOSISH
+#if defined DOSISH_DRIVE_LETTER
#define BASE (*base && !((isdirsep(*base) && !base[1]) || (base[1] == ':' && isdirsep(base[2]) && !base[3])))
#else
-#define BASE (*base && !(*base == '/' && !base[1]))
+#define BASE (*base && !(isdirsep(*base) && !base[1]))
#endif
for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
View
20 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,17 +1761,17 @@ 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)
".com", ".exe", ".bat",
#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;
View
@@ -645,7 +645,7 @@ void
rb_sys_fail(mesg)
const char *mesg;
{
-#if !defined(NT) && !defined(__VMS) && !defined(_WIN32_WCE)
+#if !defined(_WIN32) && !defined(__VMS)
char *strerror();
#endif
char *err;
View
2 eval.c
@@ -1050,7 +1050,7 @@ error_print()
#if defined(__APPLE__)
#define environ (*_NSGetEnviron())
-#elif !defined(NT) && !defined(__MACOS__)
+#elif !defined(_WIN32) && !defined(__MACOS__) || defined(_WIN32_WCE)
extern char **environ;
#endif
char **rb_origenviron;
View
@@ -2,7 +2,7 @@
Win32API - Ruby Win32 API Import Facility
*/
-#if !defined _MSC_VER && !defined NT
+#if !defined _MSC_VER && !defined _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
View
@@ -40,7 +40,7 @@
#include "config.h"
#include <sys/types.h>
-#ifndef NT
+#ifndef _WIN32
#include <sys/param.h>
#if defined(__BEOS__)
# include <net/socket.h>
View
@@ -36,7 +36,7 @@
#include "config.h"
#include <sys/types.h>
-#ifndef NT
+#ifndef _WIN32
#if defined(__BEOS__)
# include <net/socket.h>
#else
@@ -54,7 +54,7 @@
#include <resolv.h>
#endif
#endif
-#ifdef NT
+#ifdef _WIN32
#include <winsock2.h>
#include <stdio.h>
#define snprintf _snprintf
View
@@ -24,7 +24,7 @@
#include <sys/uio.h>
#endif
-#ifndef NT
+#ifndef _WIN32
#if defined(__BEOS__)
# include <net/socket.h>
#else
@@ -903,7 +903,7 @@ init_inetsock_internal(arg)
}
arg->fd = fd;
if (type == INET_SERVER) {
-#ifndef NT
+#ifndef _WIN32
status = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
(char*)&status, sizeof(status));
@@ -1816,7 +1816,7 @@ static VALUE
sock_s_socketpair(klass, domain, type, protocol)
VALUE klass, domain, type, protocol;
{
-#if !defined(NT) && !defined(__BEOS__) && !defined(__EMX__) && !defined(__QNXNTO__)
+#if !defined(_WIN32) && !defined(__BEOS__) && !defined(__EMX__) && !defined(__QNXNTO__)
int d, t, sp[2];
setup_domain_and_type(domain, &d, type, &t);
View
@@ -41,7 +41,7 @@ ruby_tcltk_stubs()
char tk_name[20];
ruby_tcl_dll = getenv("RUBY_TCL_DLL");
-#if defined NT
+#if defined _WIN32
if (ruby_tcl_dll) ruby_tcl_dll = ruby_strdup(ruby_tcl_dll);
#endif
ruby_tk_dll = getenv("RUBY_TK_DLL");
@@ -62,7 +62,7 @@ ruby_tcltk_stubs()
}
}
-#if defined NT
+#if defined _WIN32
if (ruby_tcl_dll) ruby_xfree(ruby_tcl_dll);
#endif
Oops, something went wrong.

0 comments on commit 8a5578c

Please sign in to comment.