mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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
			
			
This commit is contained in:
		
							parent
							
								
									c476b6e05c
								
							
						
					
					
						commit
						b19e36a214
					
				
					 31 changed files with 134 additions and 133 deletions
				
			
		
							
								
								
									
										13
									
								
								ChangeLog
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								ChangeLog
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)\"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								defines.h
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								defines.h
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -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 ","
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										19
									
								
								dir.c
									
										
									
									
									
								
							
							
						
						
									
										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)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								dln.c
									
										
									
									
									
								
							
							
						
						
									
										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,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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								error.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								error.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								eval.c
									
										
									
									
									
								
							
							
						
						
									
										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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										54
									
								
								file.c
									
										
									
									
									
								
							
							
						
						
									
										54
									
								
								file.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -12,7 +12,7 @@
 | 
			
		|||
 | 
			
		||||
**********************************************************************/
 | 
			
		||||
 | 
			
		||||
#if defined NT || defined _WIN32_WCE
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include "missing/file.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -40,21 +40,13 @@ int flock _((int, int));
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#ifdef HAVE_SYS_TIME_H
 | 
			
		||||
# include <sys/time.h>
 | 
			
		||||
#else
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
struct timeval {
 | 
			
		||||
        long    tv_sec;         /* seconds */
 | 
			
		||||
        long    tv_usec;        /* and microseconds */
 | 
			
		||||
};
 | 
			
		||||
#endif /* NT, WINCE */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
VALUE rb_time_new _((time_t, time_t));
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_UTIME_H
 | 
			
		||||
#include <utime.h>
 | 
			
		||||
#elif defined HAVE_SYS_UTIME_H
 | 
			
		||||
#include <sys/utime.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_PWD_H
 | 
			
		||||
| 
						 | 
				
			
			@ -76,11 +68,6 @@ char *strrchr _((const char*,const char));
 | 
			
		|||
#define lstat(path,st) stat(path,st)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef _WIN32_WCE
 | 
			
		||||
#undef CharNext
 | 
			
		||||
#define CharNext CharNextA
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
VALUE rb_cFile;
 | 
			
		||||
VALUE rb_mFileTest;
 | 
			
		||||
static VALUE rb_cStat;
 | 
			
		||||
| 
						 | 
				
			
			@ -115,10 +102,6 @@ rb_file_path(obj)
 | 
			
		|||
    return rb_str_new2(fptr->path);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if defined NT || defined _WIN32_WCE
 | 
			
		||||
#include "missing/file.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
stat_new_0(klass, st)
 | 
			
		||||
    VALUE klass;
 | 
			
		||||
| 
						 | 
				
			
			@ -445,7 +428,7 @@ static int
 | 
			
		|||
group_member(gid)
 | 
			
		||||
    GETGROUPS_T gid;
 | 
			
		||||
{
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
    if (getgid() ==  gid)
 | 
			
		||||
	return Qtrue;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -785,7 +768,7 @@ static VALUE
 | 
			
		|||
test_grpowned(obj, fname)
 | 
			
		||||
    VALUE obj, fname;
 | 
			
		||||
{
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
    struct stat st;
 | 
			
		||||
 | 
			
		||||
    if (rb_stat(fname, &st) < 0) return Qfalse;
 | 
			
		||||
| 
						 | 
				
			
			@ -1120,7 +1103,7 @@ rb_file_chown(obj, owner, group)
 | 
			
		|||
 | 
			
		||||
    rb_secure(2);
 | 
			
		||||
    GetOpenFile(obj, fptr);
 | 
			
		||||
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(NT) || defined(__EMX__) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__)
 | 
			
		||||
    if (!fptr->path) return Qnil;
 | 
			
		||||
    if (chown(fptr->path, NUM2INT(owner), NUM2INT(group)) == -1)
 | 
			
		||||
	rb_sys_fail(fptr->path);
 | 
			
		||||
| 
						 | 
				
			
			@ -1212,22 +1195,11 @@ rb_file_s_utime(argc, argv)
 | 
			
		|||
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
#ifndef HAVE_UTIME_H
 | 
			
		||||
# if defined NT || defined _WIN32_WCE
 | 
			
		||||
#   if defined(__BORLANDC__)
 | 
			
		||||
#     include <utime.h>
 | 
			
		||||
#   else
 | 
			
		||||
#  include <sys/utime.h>
 | 
			
		||||
#   endif
 | 
			
		||||
#   if defined(_MSC_VER) || defined __MINGW32__
 | 
			
		||||
#  define utimbuf _utimbuf
 | 
			
		||||
#   endif
 | 
			
		||||
# else
 | 
			
		||||
#if !defined HAVE_UTIME_H && !defined HAVE_SYS_UTIME_H
 | 
			
		||||
struct utimbuf {
 | 
			
		||||
    long actime;
 | 
			
		||||
    long modtime;
 | 
			
		||||
};
 | 
			
		||||
# endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
| 
						 | 
				
			
			@ -1474,7 +1446,7 @@ rb_file_s_expand_path(argc, argv)
 | 
			
		|||
#endif
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
#if defined DOSISH || defined __CYGWIN__
 | 
			
		||||
#if defined DOSISH_DRIVE_LETTER || defined __CYGWIN__
 | 
			
		||||
    /* skip drive letter */
 | 
			
		||||
    else if (ISALPHA(s[0]) && s[1] == ':' && isdirsep(s[2])) {
 | 
			
		||||
	b = s;
 | 
			
		||||
| 
						 | 
				
			
			@ -1572,7 +1544,7 @@ rb_file_s_expand_path(argc, argv)
 | 
			
		|||
	memcpy(++p, b, s-b);
 | 
			
		||||
	p += s-b;
 | 
			
		||||
    }
 | 
			
		||||
#if defined DOSISH || defined __CYGWIN__
 | 
			
		||||
#if defined DOSISH_DRIVE_LETTER || defined __CYGWIN__
 | 
			
		||||
    else if (ISALPHA(buf[0]) && (buf[1] == ':') && isdirsep(buf[2])) {
 | 
			
		||||
	/* root directory needs a trailing backslash,
 | 
			
		||||
	   otherwise it mean the current directory of the drive */
 | 
			
		||||
| 
						 | 
				
			
			@ -1716,7 +1688,7 @@ rb_file_s_truncate(klass, path, len)
 | 
			
		|||
    {
 | 
			
		||||
	int tmpfd;
 | 
			
		||||
 | 
			
		||||
#  if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#  ifdef _WIN32
 | 
			
		||||
	if ((tmpfd = open(RSTRING(path)->ptr, O_RDWR)) < 0) {
 | 
			
		||||
	    rb_sys_fail(RSTRING(path)->ptr);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -2141,7 +2113,7 @@ static VALUE
 | 
			
		|||
rb_stat_grpowned(obj)
 | 
			
		||||
    VALUE obj;
 | 
			
		||||
{
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
    if (get_stat(obj)->st_gid == getegid()) return Qtrue;
 | 
			
		||||
#endif
 | 
			
		||||
    return Qfalse;
 | 
			
		||||
| 
						 | 
				
			
			@ -2339,8 +2311,10 @@ static int
 | 
			
		|||
is_absolute_path(path)
 | 
			
		||||
    const char *path;
 | 
			
		||||
{
 | 
			
		||||
#if defined DOSISH || defined __CYGWIN__
 | 
			
		||||
#if defined DOSISH_DRIVE_LETTER || defined __CYGWIN__
 | 
			
		||||
    if (ISALPHA(path[0]) && path[1] == ':' && isdirsep(path[2])) return 1;
 | 
			
		||||
#endif
 | 
			
		||||
#if defined DOSISH || defined __CYGWIN__
 | 
			
		||||
    if (isdirsep(path[0]) && isdirsep(path[1])) return 1;
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef DOSISH
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								hash.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								hash.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -942,7 +942,7 @@ rb_hash_update(hash1, hash2)
 | 
			
		|||
static int path_tainted = -1;
 | 
			
		||||
 | 
			
		||||
static char **origenviron;
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#define GET_ENVIRON(e) (e = rb_w32_get_environ())
 | 
			
		||||
#define FREE_ENVIRON(e) rb_w32_free_environ(e)
 | 
			
		||||
static char **my_environ;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										22
									
								
								io.c
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								io.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -24,11 +24,11 @@
 | 
			
		|||
#include <ctype.h>
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
 | 
			
		||||
#if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(NT) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
 | 
			
		||||
# define NO_SAFE_RENAME
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MSDOS) || defined(__CYGWIN__) || defined(NT)
 | 
			
		||||
#if defined(MSDOS) || defined(__CYGWIN__) || defined(_WIN32)
 | 
			
		||||
# define NO_LONG_FNAME
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -41,10 +41,10 @@
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#if !defined(DJGPP) && !defined(NT) && !defined(__human68k__) && !defined(_WIN32_WCE)
 | 
			
		||||
#if !defined(DJGPP) && !defined(_WIN32) && !defined(__human68k__)
 | 
			
		||||
#include <sys/ioctl.h>
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(HAVE_FCNTL_H) || defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(HAVE_FCNTL_H) || defined(_WIN32)
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
#elif defined(HAVE_SYS_FCNTL_H)
 | 
			
		||||
#include <sys/fcntl.h>
 | 
			
		||||
| 
						 | 
				
			
			@ -1561,7 +1561,7 @@ VALUE
 | 
			
		|||
rb_io_binmode(io)
 | 
			
		||||
    VALUE io;
 | 
			
		||||
{
 | 
			
		||||
#if defined(NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__)
 | 
			
		||||
    OpenFile *fptr;
 | 
			
		||||
 | 
			
		||||
    GetOpenFile(io, fptr);
 | 
			
		||||
| 
						 | 
				
			
			@ -1850,7 +1850,7 @@ rb_file_sysopen(fname, flags, mode)
 | 
			
		|||
    return rb_file_sysopen_internal(io, fname, flags, mode);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if defined (NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__VMS) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__VMS)
 | 
			
		||||
static struct pipe_list {
 | 
			
		||||
    OpenFile *fptr;
 | 
			
		||||
    struct pipe_list *next;
 | 
			
		||||
| 
						 | 
				
			
			@ -1892,7 +1892,7 @@ pipe_del_fptr(fptr)
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if defined (NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__VMS) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__VMS)
 | 
			
		||||
static void
 | 
			
		||||
pipe_atexit _((void))
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -1913,7 +1913,7 @@ static void
 | 
			
		|||
pipe_finalize(fptr)
 | 
			
		||||
    OpenFile *fptr;
 | 
			
		||||
{
 | 
			
		||||
#if !defined (__CYGWIN__) && !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#if !defined (__CYGWIN__) && !defined(_WIN32)
 | 
			
		||||
    extern VALUE rb_last_status;
 | 
			
		||||
    int status;
 | 
			
		||||
    if (fptr->f) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1976,7 +1976,7 @@ pipe_open(pname, mode)
 | 
			
		|||
	return (VALUE)port;
 | 
			
		||||
    }
 | 
			
		||||
#else
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
    int pid;
 | 
			
		||||
    FILE *fpr, *fpw;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -3494,7 +3494,7 @@ rb_io_s_pipe()
 | 
			
		|||
    int pipes[2];
 | 
			
		||||
    VALUE r, w;
 | 
			
		||||
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
    if (_pipe(pipes, 1024, O_BINARY) == -1)
 | 
			
		||||
#else
 | 
			
		||||
    if (pipe(pipes) == -1)
 | 
			
		||||
| 
						 | 
				
			
			@ -4054,7 +4054,7 @@ Init_IO()
 | 
			
		|||
 | 
			
		||||
    rb_define_virtual_variable("$-i", opt_i_get, opt_i_set);
 | 
			
		||||
 | 
			
		||||
#if defined (NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__)
 | 
			
		||||
#if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__)
 | 
			
		||||
    atexit(pipe_atexit);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								main.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								main.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -38,7 +38,7 @@ main(argc, argv, envp)
 | 
			
		|||
    int argc;
 | 
			
		||||
    char **argv, **envp;
 | 
			
		||||
{
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
    NtInitialize(&argc, &argv);
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(__MACOS__) && defined(__MWERKS__)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
 | 
			
		||||
#if defined(HAVE_SYS_TIME_H)
 | 
			
		||||
#  include <sys/time.h>
 | 
			
		||||
#elif !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#elif !defined(_WIN32)
 | 
			
		||||
#  define time_t long
 | 
			
		||||
struct timeval {
 | 
			
		||||
    time_t tv_sec;	/* seconds */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,7 +122,7 @@ flock(fd, operation)
 | 
			
		|||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
#elif !defined NT
 | 
			
		||||
#elif !defined _WIN32
 | 
			
		||||
int
 | 
			
		||||
flock(fd, operation)
 | 
			
		||||
    int fd;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -53,7 +53,7 @@
 | 
			
		|||
#include <string.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(TM_IN_SYS_TIME) || ! defined(GAWK)
 | 
			
		||||
#if defined(TM_IN_SYS_TIME) || !defined(GAWK) && !defined(_WIN32_WCE)
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/time.h>
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								process.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								process.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -42,7 +42,7 @@ struct timeval rb_time_interval _((VALUE));
 | 
			
		|||
#include <sys/times.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_TIMES) || defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(HAVE_TIMES) || defined(_WIN32)
 | 
			
		||||
static VALUE S_Tms;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -74,7 +74,7 @@ get_pid()
 | 
			
		|||
static VALUE
 | 
			
		||||
get_ppid()
 | 
			
		||||
{
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
    return INT2FIX(0);
 | 
			
		||||
#else
 | 
			
		||||
    return INT2FIX(getppid());
 | 
			
		||||
| 
						 | 
				
			
			@ -712,7 +712,7 @@ static VALUE
 | 
			
		|||
rb_f_fork(obj)
 | 
			
		||||
    VALUE obj;
 | 
			
		||||
{
 | 
			
		||||
#if !defined(__human68k__) && !defined(NT) && !defined(__MACOS__) && !defined(__EMX__) && !defined(__VMS) && !defined(_WIN32_WCE)
 | 
			
		||||
#if !defined(__human68k__) && !defined(_WIN32) && !defined(__MACOS__) && !defined(__EMX__) && !defined(__VMS)
 | 
			
		||||
    int pid;
 | 
			
		||||
 | 
			
		||||
    rb_secure(2);
 | 
			
		||||
| 
						 | 
				
			
			@ -805,7 +805,7 @@ rb_f_system(argc, argv)
 | 
			
		|||
    int argc;
 | 
			
		||||
    VALUE *argv;
 | 
			
		||||
{
 | 
			
		||||
#if defined(NT) || defined(__EMX__) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(_WIN32) || defined(__EMX__)
 | 
			
		||||
    VALUE cmd;
 | 
			
		||||
    int status;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1295,7 +1295,7 @@ Init_process()
 | 
			
		|||
 | 
			
		||||
    rb_mProcess = rb_define_module("Process");
 | 
			
		||||
 | 
			
		||||
#if !defined(NT) && !defined(DJGPP) && !defined(_WIN32_WCE)
 | 
			
		||||
#if !defined(_WIN32) && !defined(DJGPP)
 | 
			
		||||
#ifdef WNOHANG
 | 
			
		||||
    rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
 | 
			
		||||
#else
 | 
			
		||||
| 
						 | 
				
			
			@ -1371,7 +1371,7 @@ Init_process()
 | 
			
		|||
 | 
			
		||||
    rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0);
 | 
			
		||||
 | 
			
		||||
#if defined(HAVE_TIMES) || defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(HAVE_TIMES) || defined(_WIN32)
 | 
			
		||||
    S_Tms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", 0);
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								ruby.c
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								ruby.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -15,6 +15,9 @@
 | 
			
		|||
#if defined _WIN32 || defined __CYGWIN__
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef _WIN32_WCE
 | 
			
		||||
#include <winsock.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include "ruby.h"
 | 
			
		||||
#include "dln.h"
 | 
			
		||||
#include "node.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,7 @@
 | 
			
		|||
#ifndef SIG_H
 | 
			
		||||
#define SIG_H
 | 
			
		||||
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
typedef LONG rb_atomic_t;
 | 
			
		||||
 | 
			
		||||
# define ATOMIC_TEST(var) InterlockedExchange(&(var), 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								signal.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								signal.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -369,7 +369,7 @@ static RETSIGTYPE
 | 
			
		|||
sighandler(sig)
 | 
			
		||||
    int sig;
 | 
			
		||||
{
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#define IN_MAIN_CONTEXT(f, a) (rb_w32_main_context(a, f) ? (void)0 : f(a))
 | 
			
		||||
#else
 | 
			
		||||
#define IN_MAIN_CONTEXT(f, a) f(a)
 | 
			
		||||
| 
						 | 
				
			
			@ -453,7 +453,7 @@ rb_trap_exec()
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
struct trap_arg {
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
# ifdef HAVE_SIGPROCMASK
 | 
			
		||||
    sigset_t mask;
 | 
			
		||||
# else
 | 
			
		||||
| 
						 | 
				
			
			@ -594,7 +594,7 @@ trap(arg)
 | 
			
		|||
 | 
			
		||||
    trap_list[sig] = command;
 | 
			
		||||
    /* enable at least specified signal. */
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
#ifdef HAVE_SIGPROCMASK
 | 
			
		||||
    sigdelset(&arg->mask, sig);
 | 
			
		||||
#else
 | 
			
		||||
| 
						 | 
				
			
			@ -604,7 +604,7 @@ trap(arg)
 | 
			
		|||
    return old;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
static VALUE
 | 
			
		||||
trap_ensure(arg)
 | 
			
		||||
    struct trap_arg *arg;
 | 
			
		||||
| 
						 | 
				
			
			@ -623,7 +623,7 @@ trap_ensure(arg)
 | 
			
		|||
void
 | 
			
		||||
rb_trap_restore_mask()
 | 
			
		||||
{
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
# ifdef HAVE_SIGPROCMASK
 | 
			
		||||
    sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
 | 
			
		||||
# else
 | 
			
		||||
| 
						 | 
				
			
			@ -655,7 +655,7 @@ sig_trap(argc, argv)
 | 
			
		|||
    if (OBJ_TAINTED(arg.cmd)) {
 | 
			
		||||
	rb_raise(rb_eSecurityError, "Insecure: tainted signal trap");
 | 
			
		||||
    }
 | 
			
		||||
#if !defined(NT) && !defined(_WIN32_WCE)
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
    /* disable interrupt */
 | 
			
		||||
# ifdef HAVE_SIGPROCMASK
 | 
			
		||||
    sigfillset(&arg.mask);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								st.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								st.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -7,7 +7,7 @@
 | 
			
		|||
#include <stdlib.h>
 | 
			
		||||
#include "st.h"
 | 
			
		||||
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include <malloc.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								util.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								util.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -16,7 +16,7 @@
 | 
			
		|||
#include <stdio.h>
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include "missing/file.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -75,11 +75,11 @@ scan_hex(start, len, retlen)
 | 
			
		|||
#   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include "missing/file.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
 | 
			
		||||
/*
 | 
			
		||||
 *  Copyright (c) 1993, Intergraph Corporation
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			@ -173,7 +173,7 @@ ruby_add_suffix(str, suffix)
 | 
			
		|||
        rb_fatal("Cannot do inplace edit on long filename (%ld characters)",
 | 
			
		||||
		 RSTRING(str)->len);
 | 
			
		||||
 | 
			
		||||
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32)
 | 
			
		||||
    /* Style 0 */
 | 
			
		||||
    slen = RSTRING(str)->len;
 | 
			
		||||
    rb_str_cat(str, suffix, extlen);
 | 
			
		||||
| 
						 | 
				
			
			@ -229,7 +229,7 @@ fallback:
 | 
			
		|||
    memcpy(RSTRING(str)->ptr, buf, RSTRING(str)->len);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if defined(__CYGWIN32__) || defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(__CYGWIN32__) || defined(_WIN32)
 | 
			
		||||
static int 
 | 
			
		||||
valid_filename(char *s)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								util.h
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								util.h
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -39,7 +39,7 @@ unsigned long scan_oct _((const char*, int, int*));
 | 
			
		|||
#define scan_hex ruby_scan_hex
 | 
			
		||||
unsigned long scan_hex _((const char*, int, int*));
 | 
			
		||||
 | 
			
		||||
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(NT) || defined(_WIN32_WCE)
 | 
			
		||||
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
 | 
			
		||||
void ruby_add_suffix();
 | 
			
		||||
#define add_suffix ruby_add_suffix
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -78,7 +78,7 @@ prefix = /usr
 | 
			
		|||
DESTDIR = $(prefix)
 | 
			
		||||
!endif
 | 
			
		||||
!if !defined(CFLAGS)
 | 
			
		||||
CFLAGS = -MD -DNT=1 $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
 | 
			
		||||
CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
 | 
			
		||||
!endif
 | 
			
		||||
!if !defined(CPPFLAGS)
 | 
			
		||||
CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -DLIBRUBY_SO=\"$(LIBRUBY_SO)\"
 | 
			
		||||
| 
						 | 
				
			
			@ -265,7 +265,6 @@ config.h: Makefile $(srcdir)/win32/Makefile.sub
 | 
			
		|||
#define DEFAULT_KCODE KCODE_NONE
 | 
			
		||||
#define DLEXT ".so"
 | 
			
		||||
#define DLEXT2 ".dll"
 | 
			
		||||
#define NT 1
 | 
			
		||||
#define RUBY_LIB "/lib/ruby/1.7"
 | 
			
		||||
#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
 | 
			
		||||
#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/1.7"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,6 +33,14 @@
 | 
			
		|||
#include <winsock.h>
 | 
			
		||||
#undef OpenFile
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define NT 1			/* deprecated */
 | 
			
		||||
 | 
			
		||||
#ifdef _WIN32_WCE
 | 
			
		||||
#undef CharNext
 | 
			
		||||
#define CharNext CharNextA
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// We're not using Microsoft's "extensions" to C for
 | 
			
		||||
// Structured Exception Handling (SEH) so we can nuke these
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@ CFG=MIPS
 | 
			
		|||
CESubsystem=windowsce,3.0
 | 
			
		||||
#!MESSAGE CESubsystem not specified. use windowsce,2.11.
 | 
			
		||||
!MESSAGE CESubsystem not specified. use windowsce,3.0.
 | 
			
		||||
!ENDIF 
 | 
			
		||||
!ENDIF
 | 
			
		||||
 | 
			
		||||
!IF "$(CEVersion)" == ""
 | 
			
		||||
#CEVersion=200
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -470,7 +470,6 @@ rb_num_coerce_bin
 | 
			
		|||
rb_num_zerodiv
 | 
			
		||||
rb_obj_alloc
 | 
			
		||||
rb_obj_as_string
 | 
			
		||||
rb_obj_become
 | 
			
		||||
rb_obj_call_init
 | 
			
		||||
rb_obj_class
 | 
			
		||||
rb_obj_clone
 | 
			
		||||
| 
						 | 
				
			
			@ -800,15 +799,15 @@ yyerrflag
 | 
			
		|||
yygindex
 | 
			
		||||
yylen
 | 
			
		||||
yylhs
 | 
			
		||||
yyname
 | 
			
		||||
yynerrs
 | 
			
		||||
yyrindex
 | 
			
		||||
yyrule
 | 
			
		||||
yysindex
 | 
			
		||||
yyss
 | 
			
		||||
yyssp
 | 
			
		||||
yytable
 | 
			
		||||
yyval
 | 
			
		||||
yyvs
 | 
			
		||||
yyvsp
 | 
			
		||||
wce_SetCommandLine
 | 
			
		||||
yyname 
 | 
			
		||||
yynerrs 
 | 
			
		||||
yyrindex 
 | 
			
		||||
yyrule 
 | 
			
		||||
yysindex 
 | 
			
		||||
yyss 
 | 
			
		||||
yyssp 
 | 
			
		||||
yytable 
 | 
			
		||||
yyval 
 | 
			
		||||
yyvs 
 | 
			
		||||
yyvsp 
 | 
			
		||||
wce_SetCommandLine 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue