зеркало из https://github.com/github/ruby.git
* 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:
Родитель
c476b6e05c
Коммит
b19e36a214
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>
|
Sun Dec 15 11:43:26 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* parse.y (dispose_string): dispose String object.
|
* parse.y (dispose_string): dispose String object.
|
||||||
|
|
|
@ -87,7 +87,7 @@ prefix = /usr
|
||||||
DESTDIR = $(prefix)
|
DESTDIR = $(prefix)
|
||||||
!endif
|
!endif
|
||||||
!ifndef CFLAGS
|
!ifndef CFLAGS
|
||||||
CFLAGS = -q -DNT=1 $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w-
|
CFLAGS = -q $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w-
|
||||||
!endif
|
!endif
|
||||||
!ifndef CPPFLAGS
|
!ifndef CPPFLAGS
|
||||||
CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)missing -DLIBRUBY_SO=\"$(LIBRUBY_SO)\"
|
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\
|
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\
|
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 \
|
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.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_TYPE_UID_T
|
AC_TYPE_UID_T
|
||||||
|
@ -1156,7 +1156,7 @@ case "$target_os" in
|
||||||
COMMON_LIBS=m
|
COMMON_LIBS=m
|
||||||
COMMON_MACROS="WIN32_LEAN_AND_MEAN="
|
COMMON_MACROS="WIN32_LEAN_AND_MEAN="
|
||||||
COMMON_HEADERS="windows.h winsock.h"
|
COMMON_HEADERS="windows.h winsock.h"
|
||||||
CFLAGS="-DNT -D__NO_ISOCEXT $CFLAGS"
|
CFLAGS="-D__NO_ISOCEXT $CFLAGS"
|
||||||
CCDLFLAGS=-DIMPORT ;;
|
CCDLFLAGS=-DIMPORT ;;
|
||||||
esac
|
esac
|
||||||
if test x"$enable_shared" = xyes; then
|
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
|
# define BDIGIT_DBL_SIGNED long
|
||||||
#endif
|
#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 */
|
/* define RUBY_USE_EUC/SJIS for default kanji-code */
|
||||||
#ifndef DEFAULT_KCODE
|
#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
|
#define DEFAULT_KCODE KCODE_SJIS
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_KCODE KCODE_EUC
|
#define DEFAULT_KCODE KCODE_EUC
|
||||||
|
@ -106,7 +113,10 @@ void xfree _((void*));
|
||||||
#define HAVE_SYS_WAIT_H /* configure fails to find this */
|
#define HAVE_SYS_WAIT_H /* configure fails to find this */
|
||||||
#endif /* NeXT */
|
#endif /* NeXT */
|
||||||
|
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef __CYGWIN__
|
||||||
|
#undef _WIN32
|
||||||
|
#endif
|
||||||
|
#ifdef _WIN32
|
||||||
#include "win32/win32.h"
|
#include "win32/win32.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -137,11 +147,7 @@ void xfree _((void*));
|
||||||
#define FLUSH_REGISTER_WINDOWS /* empty -- nothing to do here */
|
#define FLUSH_REGISTER_WINDOWS /* empty -- nothing to do here */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
|
#if defined(DOSISH)
|
||||||
#define DOSISH 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(OS2) || defined(_WIN32_WCE)
|
|
||||||
#define PATH_SEP ";"
|
#define PATH_SEP ";"
|
||||||
#elif defined(riscos)
|
#elif defined(riscos)
|
||||||
#define PATH_SEP ","
|
#define PATH_SEP ","
|
||||||
|
|
19
dir.c
19
dir.c
|
@ -21,10 +21,10 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined HAVE_DIRENT_H && !defined NT && !defined _WIN32_WCE
|
#if defined HAVE_DIRENT_H && !defined _WIN32
|
||||||
# include <dirent.h>
|
# include <dirent.h>
|
||||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
# 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>
|
# include <direct.h>
|
||||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||||
#else
|
#else
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
# if HAVE_NDIR_H
|
# if HAVE_NDIR_H
|
||||||
# include <ndir.h>
|
# include <ndir.h>
|
||||||
# endif
|
# endif
|
||||||
# if defined(NT) || defined(_WIN32_WCE)
|
# ifdef _WIN32
|
||||||
# include "win32/dir.h"
|
# include "win32/dir.h"
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -79,10 +79,7 @@ char *strchr _((char*,char));
|
||||||
# define CharNext(p) ((p) + 1)
|
# define CharNext(p) ((p) + 1)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32_WCE
|
|
||||||
#undef CharNext
|
|
||||||
#define CharNext CharNextA
|
|
||||||
#endif
|
|
||||||
#if defined DOSISH
|
#if defined DOSISH
|
||||||
#define isdirsep(c) ((c) == '/' || (c) == '\\')
|
#define isdirsep(c) ((c) == '/' || (c) == '\\')
|
||||||
static char *
|
static char *
|
||||||
|
@ -538,7 +535,7 @@ dir_s_mkdir(argc, argv, obj)
|
||||||
|
|
||||||
SafeStringValue(path);
|
SafeStringValue(path);
|
||||||
rb_secure(2);
|
rb_secure(2);
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
if (mkdir(RSTRING(path)->ptr, mode) == -1)
|
if (mkdir(RSTRING(path)->ptr, mode) == -1)
|
||||||
rb_sys_fail(RSTRING(path)->ptr);
|
rb_sys_fail(RSTRING(path)->ptr);
|
||||||
#else
|
#else
|
||||||
|
@ -607,7 +604,7 @@ extract_path(p, pend)
|
||||||
alloc = ALLOC_N(char, len+1);
|
alloc = ALLOC_N(char, len+1);
|
||||||
memcpy(alloc, p, len);
|
memcpy(alloc, p, len);
|
||||||
if (len > 1 && pend[-1] == '/'
|
if (len > 1 && pend[-1] == '/'
|
||||||
#if defined DOSISH
|
#if defined DOSISH_DRIVE_LETTER
|
||||||
&& pend[-2] != ':'
|
&& pend[-2] != ':'
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
@ -766,10 +763,10 @@ glob_helper(path, sub, flags, func, arg)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined DOSISH
|
#if defined DOSISH_DRIVE_LETTER
|
||||||
#define BASE (*base && !((isdirsep(*base) && !base[1]) || (base[1] == ':' && isdirsep(base[2]) && !base[3])))
|
#define BASE (*base && !((isdirsep(*base) && !base[1]) || (base[1] == ':' && isdirsep(base[2]) && !base[3])))
|
||||||
#else
|
#else
|
||||||
#define BASE (*base && !(*base == '/' && !base[1]))
|
#define BASE (*base && !(isdirsep(*base) && !base[1]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
|
for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
|
||||||
|
|
20
dln.c
20
dln.c
|
@ -48,7 +48,7 @@ void *xrealloc();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if defined(NT) || defined(__VMS) || defined(_WIN32_WCE)
|
#if defined(_WIN32) || defined(__VMS)
|
||||||
#include "missing/file.h"
|
#include "missing/file.h"
|
||||||
#endif
|
#endif
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -69,7 +69,7 @@ void *xrealloc();
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
char *getenv();
|
char *getenv();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1598,7 +1598,7 @@ dln_find_exe(fname, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!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;.";
|
path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;.";
|
||||||
#else
|
#else
|
||||||
path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
|
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)
|
if (strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0)
|
||||||
return fname;
|
return fname;
|
||||||
if (exe_flag && strchr(fname, '/')) 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;
|
if (fname[0] == '\\') return fname;
|
||||||
|
# ifdef DOSISH_DRIVE_LETTER
|
||||||
if (strlen(fname) > 2 && fname[1] == ':') return fname;
|
if (strlen(fname) > 2 && fname[1] == ':') return fname;
|
||||||
|
# endif
|
||||||
if (strncmp(".\\", fname, 2) == 0 || strncmp("..\\", fname, 3) == 0)
|
if (strncmp(".\\", fname, 2) == 0 || strncmp("..\\", fname, 3) == 0)
|
||||||
return fname;
|
return fname;
|
||||||
if (exe_flag && strchr(fname, '\\')) 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 (*dp == '~' && (l == 1 ||
|
||||||
#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(__EMX__) || defined(_WIN32_WCE)
|
#if defined(DOSISH)
|
||||||
dp[1] == '\\' ||
|
dp[1] == '\\' ||
|
||||||
#endif
|
#endif
|
||||||
dp[1] == '/')) {
|
dp[1] == '/')) {
|
||||||
|
@ -1759,7 +1761,7 @@ dln_find_1(fname, path, exe_flag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(__EMX__) || defined(_WIN32_WCE)
|
#if defined(DOSISH)
|
||||||
if (exe_flag) {
|
if (exe_flag) {
|
||||||
static const char *extension[] = {
|
static const char *extension[] = {
|
||||||
#if defined(MSDOS)
|
#if defined(MSDOS)
|
||||||
|
@ -1767,9 +1769,9 @@ dln_find_1(fname, path, exe_flag)
|
||||||
#if defined(DJGPP)
|
#if defined(DJGPP)
|
||||||
".btm", ".sh", ".ksh", ".pl", ".sed",
|
".btm", ".sh", ".ksh", ".pl", ".sed",
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__EMX__) || defined(NT) || defined(_WIN32_WCE)
|
#elif defined(__EMX__) || defined(_WIN32)
|
||||||
".exe", ".com", ".cmd", ".bat",
|
".exe", ".com", ".cmd", ".bat",
|
||||||
/* end of __EMX__ or NT or WINCE */
|
/* end of __EMX__ or _WIN32 */
|
||||||
#else
|
#else
|
||||||
".r", ".R", ".x", ".X", ".bat", ".BAT",
|
".r", ".R", ".x", ".X", ".bat", ".BAT",
|
||||||
/* __human68k__ */
|
/* __human68k__ */
|
||||||
|
@ -1795,7 +1797,7 @@ dln_find_1(fname, path, exe_flag)
|
||||||
#endif
|
#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 not, and no other alternatives, life is bleak */
|
||||||
if (*ep == '\0') {
|
if (*ep == '\0') {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
2
error.c
2
error.c
|
@ -645,7 +645,7 @@ void
|
||||||
rb_sys_fail(mesg)
|
rb_sys_fail(mesg)
|
||||||
const char *mesg;
|
const char *mesg;
|
||||||
{
|
{
|
||||||
#if !defined(NT) && !defined(__VMS) && !defined(_WIN32_WCE)
|
#if !defined(_WIN32) && !defined(__VMS)
|
||||||
char *strerror();
|
char *strerror();
|
||||||
#endif
|
#endif
|
||||||
char *err;
|
char *err;
|
||||||
|
|
2
eval.c
2
eval.c
|
@ -1050,7 +1050,7 @@ error_print()
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#define environ (*_NSGetEnviron())
|
#define environ (*_NSGetEnviron())
|
||||||
#elif !defined(NT) && !defined(__MACOS__)
|
#elif !defined(_WIN32) && !defined(__MACOS__) || defined(_WIN32_WCE)
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
#endif
|
#endif
|
||||||
char **rb_origenviron;
|
char **rb_origenviron;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Win32API - Ruby Win32 API Import Facility
|
Win32API - Ruby Win32 API Import Facility
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined _MSC_VER && !defined NT
|
#if !defined _MSC_VER && !defined _WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifndef NT
|
#ifndef _WIN32
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#if defined(__BEOS__)
|
#if defined(__BEOS__)
|
||||||
# include <net/socket.h>
|
# include <net/socket.h>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifndef NT
|
#ifndef _WIN32
|
||||||
#if defined(__BEOS__)
|
#if defined(__BEOS__)
|
||||||
# include <net/socket.h>
|
# include <net/socket.h>
|
||||||
#else
|
#else
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
#include <resolv.h>
|
#include <resolv.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef NT
|
#ifdef _WIN32
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NT
|
#ifndef _WIN32
|
||||||
#if defined(__BEOS__)
|
#if defined(__BEOS__)
|
||||||
# include <net/socket.h>
|
# include <net/socket.h>
|
||||||
#else
|
#else
|
||||||
|
@ -903,7 +903,7 @@ init_inetsock_internal(arg)
|
||||||
}
|
}
|
||||||
arg->fd = fd;
|
arg->fd = fd;
|
||||||
if (type == INET_SERVER) {
|
if (type == INET_SERVER) {
|
||||||
#ifndef NT
|
#ifndef _WIN32
|
||||||
status = 1;
|
status = 1;
|
||||||
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
|
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
|
||||||
(char*)&status, sizeof(status));
|
(char*)&status, sizeof(status));
|
||||||
|
@ -1816,7 +1816,7 @@ static VALUE
|
||||||
sock_s_socketpair(klass, domain, type, protocol)
|
sock_s_socketpair(klass, domain, type, protocol)
|
||||||
VALUE 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];
|
int d, t, sp[2];
|
||||||
|
|
||||||
setup_domain_and_type(domain, &d, type, &t);
|
setup_domain_and_type(domain, &d, type, &t);
|
||||||
|
|
|
@ -41,7 +41,7 @@ ruby_tcltk_stubs()
|
||||||
char tk_name[20];
|
char tk_name[20];
|
||||||
|
|
||||||
ruby_tcl_dll = getenv("RUBY_TCL_DLL");
|
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);
|
if (ruby_tcl_dll) ruby_tcl_dll = ruby_strdup(ruby_tcl_dll);
|
||||||
#endif
|
#endif
|
||||||
ruby_tk_dll = getenv("RUBY_TK_DLL");
|
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);
|
if (ruby_tcl_dll) ruby_xfree(ruby_tcl_dll);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
54
file.c
54
file.c
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#if defined NT || defined _WIN32_WCE
|
#ifdef _WIN32
|
||||||
#include "missing/file.h"
|
#include "missing/file.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -40,21 +40,13 @@ int flock _((int, int));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#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));
|
VALUE rb_time_new _((time_t, time_t));
|
||||||
|
|
||||||
#ifdef HAVE_UTIME_H
|
#ifdef HAVE_UTIME_H
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
|
#elif defined HAVE_SYS_UTIME_H
|
||||||
|
#include <sys/utime.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
|
@ -76,11 +68,6 @@ char *strrchr _((const char*,const char));
|
||||||
#define lstat(path,st) stat(path,st)
|
#define lstat(path,st) stat(path,st)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32_WCE
|
|
||||||
#undef CharNext
|
|
||||||
#define CharNext CharNextA
|
|
||||||
#endif
|
|
||||||
|
|
||||||
VALUE rb_cFile;
|
VALUE rb_cFile;
|
||||||
VALUE rb_mFileTest;
|
VALUE rb_mFileTest;
|
||||||
static VALUE rb_cStat;
|
static VALUE rb_cStat;
|
||||||
|
@ -115,10 +102,6 @@ rb_file_path(obj)
|
||||||
return rb_str_new2(fptr->path);
|
return rb_str_new2(fptr->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined NT || defined _WIN32_WCE
|
|
||||||
#include "missing/file.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
stat_new_0(klass, st)
|
stat_new_0(klass, st)
|
||||||
VALUE klass;
|
VALUE klass;
|
||||||
|
@ -445,7 +428,7 @@ static int
|
||||||
group_member(gid)
|
group_member(gid)
|
||||||
GETGROUPS_T gid;
|
GETGROUPS_T gid;
|
||||||
{
|
{
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
if (getgid() == gid)
|
if (getgid() == gid)
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
|
|
||||||
|
@ -785,7 +768,7 @@ static VALUE
|
||||||
test_grpowned(obj, fname)
|
test_grpowned(obj, fname)
|
||||||
VALUE obj, fname;
|
VALUE obj, fname;
|
||||||
{
|
{
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
if (rb_stat(fname, &st) < 0) return Qfalse;
|
if (rb_stat(fname, &st) < 0) return Qfalse;
|
||||||
|
@ -1120,7 +1103,7 @@ rb_file_chown(obj, owner, group)
|
||||||
|
|
||||||
rb_secure(2);
|
rb_secure(2);
|
||||||
GetOpenFile(obj, fptr);
|
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 (!fptr->path) return Qnil;
|
||||||
if (chown(fptr->path, NUM2INT(owner), NUM2INT(group)) == -1)
|
if (chown(fptr->path, NUM2INT(owner), NUM2INT(group)) == -1)
|
||||||
rb_sys_fail(fptr->path);
|
rb_sys_fail(fptr->path);
|
||||||
|
@ -1212,22 +1195,11 @@ rb_file_s_utime(argc, argv)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef HAVE_UTIME_H
|
#if !defined HAVE_UTIME_H && !defined HAVE_SYS_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
|
|
||||||
struct utimbuf {
|
struct utimbuf {
|
||||||
long actime;
|
long actime;
|
||||||
long modtime;
|
long modtime;
|
||||||
};
|
};
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1474,7 +1446,7 @@ rb_file_s_expand_path(argc, argv)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined DOSISH || defined __CYGWIN__
|
#if defined DOSISH_DRIVE_LETTER || defined __CYGWIN__
|
||||||
/* skip drive letter */
|
/* skip drive letter */
|
||||||
else if (ISALPHA(s[0]) && s[1] == ':' && isdirsep(s[2])) {
|
else if (ISALPHA(s[0]) && s[1] == ':' && isdirsep(s[2])) {
|
||||||
b = s;
|
b = s;
|
||||||
|
@ -1572,7 +1544,7 @@ rb_file_s_expand_path(argc, argv)
|
||||||
memcpy(++p, b, s-b);
|
memcpy(++p, b, s-b);
|
||||||
p += 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])) {
|
else if (ISALPHA(buf[0]) && (buf[1] == ':') && isdirsep(buf[2])) {
|
||||||
/* root directory needs a trailing backslash,
|
/* root directory needs a trailing backslash,
|
||||||
otherwise it mean the current directory of the drive */
|
otherwise it mean the current directory of the drive */
|
||||||
|
@ -1716,7 +1688,7 @@ rb_file_s_truncate(klass, path, len)
|
||||||
{
|
{
|
||||||
int tmpfd;
|
int tmpfd;
|
||||||
|
|
||||||
# if defined(NT) || defined(_WIN32_WCE)
|
# ifdef _WIN32
|
||||||
if ((tmpfd = open(RSTRING(path)->ptr, O_RDWR)) < 0) {
|
if ((tmpfd = open(RSTRING(path)->ptr, O_RDWR)) < 0) {
|
||||||
rb_sys_fail(RSTRING(path)->ptr);
|
rb_sys_fail(RSTRING(path)->ptr);
|
||||||
}
|
}
|
||||||
|
@ -2141,7 +2113,7 @@ static VALUE
|
||||||
rb_stat_grpowned(obj)
|
rb_stat_grpowned(obj)
|
||||||
VALUE obj;
|
VALUE obj;
|
||||||
{
|
{
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
if (get_stat(obj)->st_gid == getegid()) return Qtrue;
|
if (get_stat(obj)->st_gid == getegid()) return Qtrue;
|
||||||
#endif
|
#endif
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
|
@ -2339,8 +2311,10 @@ static int
|
||||||
is_absolute_path(path)
|
is_absolute_path(path)
|
||||||
const char *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;
|
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;
|
if (isdirsep(path[0]) && isdirsep(path[1])) return 1;
|
||||||
#endif
|
#endif
|
||||||
#ifndef DOSISH
|
#ifndef DOSISH
|
||||||
|
|
2
hash.c
2
hash.c
|
@ -942,7 +942,7 @@ rb_hash_update(hash1, hash2)
|
||||||
static int path_tainted = -1;
|
static int path_tainted = -1;
|
||||||
|
|
||||||
static char **origenviron;
|
static char **origenviron;
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
#define GET_ENVIRON(e) (e = rb_w32_get_environ())
|
#define GET_ENVIRON(e) (e = rb_w32_get_environ())
|
||||||
#define FREE_ENVIRON(e) rb_w32_free_environ(e)
|
#define FREE_ENVIRON(e) rb_w32_free_environ(e)
|
||||||
static char **my_environ;
|
static char **my_environ;
|
||||||
|
|
22
io.c
22
io.c
|
@ -24,11 +24,11 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.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
|
# define NO_SAFE_RENAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MSDOS) || defined(__CYGWIN__) || defined(NT)
|
#if defined(MSDOS) || defined(__CYGWIN__) || defined(_WIN32)
|
||||||
# define NO_LONG_FNAME
|
# define NO_LONG_FNAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -41,10 +41,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#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>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_FCNTL_H) || defined(NT) || defined(_WIN32_WCE)
|
#if defined(HAVE_FCNTL_H) || defined(_WIN32)
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#elif defined(HAVE_SYS_FCNTL_H)
|
#elif defined(HAVE_SYS_FCNTL_H)
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
|
@ -1561,7 +1561,7 @@ VALUE
|
||||||
rb_io_binmode(io)
|
rb_io_binmode(io)
|
||||||
VALUE 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;
|
OpenFile *fptr;
|
||||||
|
|
||||||
GetOpenFile(io, fptr);
|
GetOpenFile(io, fptr);
|
||||||
|
@ -1850,7 +1850,7 @@ rb_file_sysopen(fname, flags, mode)
|
||||||
return rb_file_sysopen_internal(io, 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 {
|
static struct pipe_list {
|
||||||
OpenFile *fptr;
|
OpenFile *fptr;
|
||||||
struct pipe_list *next;
|
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
|
static void
|
||||||
pipe_atexit _((void))
|
pipe_atexit _((void))
|
||||||
{
|
{
|
||||||
|
@ -1913,7 +1913,7 @@ static void
|
||||||
pipe_finalize(fptr)
|
pipe_finalize(fptr)
|
||||||
OpenFile *fptr;
|
OpenFile *fptr;
|
||||||
{
|
{
|
||||||
#if !defined (__CYGWIN__) && !defined(NT) && !defined(_WIN32_WCE)
|
#if !defined (__CYGWIN__) && !defined(_WIN32)
|
||||||
extern VALUE rb_last_status;
|
extern VALUE rb_last_status;
|
||||||
int status;
|
int status;
|
||||||
if (fptr->f) {
|
if (fptr->f) {
|
||||||
|
@ -1976,7 +1976,7 @@ pipe_open(pname, mode)
|
||||||
return (VALUE)port;
|
return (VALUE)port;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
int pid;
|
int pid;
|
||||||
FILE *fpr, *fpw;
|
FILE *fpr, *fpw;
|
||||||
|
|
||||||
|
@ -3494,7 +3494,7 @@ rb_io_s_pipe()
|
||||||
int pipes[2];
|
int pipes[2];
|
||||||
VALUE r, w;
|
VALUE r, w;
|
||||||
|
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
if (_pipe(pipes, 1024, O_BINARY) == -1)
|
if (_pipe(pipes, 1024, O_BINARY) == -1)
|
||||||
#else
|
#else
|
||||||
if (pipe(pipes) == -1)
|
if (pipe(pipes) == -1)
|
||||||
|
@ -4054,7 +4054,7 @@ Init_IO()
|
||||||
|
|
||||||
rb_define_virtual_variable("$-i", opt_i_get, opt_i_set);
|
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);
|
atexit(pipe_atexit);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
2
main.c
2
main.c
|
@ -38,7 +38,7 @@ main(argc, argv, envp)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv, **envp;
|
char **argv, **envp;
|
||||||
{
|
{
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
NtInitialize(&argc, &argv);
|
NtInitialize(&argc, &argv);
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MACOS__) && defined(__MWERKS__)
|
#if defined(__MACOS__) && defined(__MWERKS__)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#if defined(HAVE_SYS_TIME_H)
|
#if defined(HAVE_SYS_TIME_H)
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
#elif !defined(NT) && !defined(_WIN32_WCE)
|
#elif !defined(_WIN32)
|
||||||
# define time_t long
|
# define time_t long
|
||||||
struct timeval {
|
struct timeval {
|
||||||
time_t tv_sec; /* seconds */
|
time_t tv_sec; /* seconds */
|
||||||
|
|
|
@ -122,7 +122,7 @@ flock(fd, operation)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif !defined NT
|
#elif !defined _WIN32
|
||||||
int
|
int
|
||||||
flock(fd, operation)
|
flock(fd, operation)
|
||||||
int fd;
|
int fd;
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#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/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
12
process.c
12
process.c
|
@ -42,7 +42,7 @@ struct timeval rb_time_interval _((VALUE));
|
||||||
#include <sys/times.h>
|
#include <sys/times.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_TIMES) || defined(NT) || defined(_WIN32_WCE)
|
#if defined(HAVE_TIMES) || defined(_WIN32)
|
||||||
static VALUE S_Tms;
|
static VALUE S_Tms;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ get_pid()
|
||||||
static VALUE
|
static VALUE
|
||||||
get_ppid()
|
get_ppid()
|
||||||
{
|
{
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
return INT2FIX(0);
|
return INT2FIX(0);
|
||||||
#else
|
#else
|
||||||
return INT2FIX(getppid());
|
return INT2FIX(getppid());
|
||||||
|
@ -712,7 +712,7 @@ static VALUE
|
||||||
rb_f_fork(obj)
|
rb_f_fork(obj)
|
||||||
VALUE 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;
|
int pid;
|
||||||
|
|
||||||
rb_secure(2);
|
rb_secure(2);
|
||||||
|
@ -805,7 +805,7 @@ rb_f_system(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
{
|
{
|
||||||
#if defined(NT) || defined(__EMX__) || defined(_WIN32_WCE)
|
#if defined(_WIN32) || defined(__EMX__)
|
||||||
VALUE cmd;
|
VALUE cmd;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
@ -1295,7 +1295,7 @@ Init_process()
|
||||||
|
|
||||||
rb_mProcess = rb_define_module("Process");
|
rb_mProcess = rb_define_module("Process");
|
||||||
|
|
||||||
#if !defined(NT) && !defined(DJGPP) && !defined(_WIN32_WCE)
|
#if !defined(_WIN32) && !defined(DJGPP)
|
||||||
#ifdef WNOHANG
|
#ifdef WNOHANG
|
||||||
rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
|
rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
|
||||||
#else
|
#else
|
||||||
|
@ -1371,7 +1371,7 @@ Init_process()
|
||||||
|
|
||||||
rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0);
|
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);
|
S_Tms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
3
ruby.c
3
ruby.c
|
@ -15,6 +15,9 @@
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "dln.h"
|
#include "dln.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#ifndef SIG_H
|
#ifndef SIG_H
|
||||||
#define SIG_H
|
#define SIG_H
|
||||||
|
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
typedef LONG rb_atomic_t;
|
typedef LONG rb_atomic_t;
|
||||||
|
|
||||||
# define ATOMIC_TEST(var) InterlockedExchange(&(var), 0)
|
# define ATOMIC_TEST(var) InterlockedExchange(&(var), 0)
|
||||||
|
|
12
signal.c
12
signal.c
|
@ -369,7 +369,7 @@ static RETSIGTYPE
|
||||||
sighandler(sig)
|
sighandler(sig)
|
||||||
int 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))
|
#define IN_MAIN_CONTEXT(f, a) (rb_w32_main_context(a, f) ? (void)0 : f(a))
|
||||||
#else
|
#else
|
||||||
#define IN_MAIN_CONTEXT(f, a) f(a)
|
#define IN_MAIN_CONTEXT(f, a) f(a)
|
||||||
|
@ -453,7 +453,7 @@ rb_trap_exec()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct trap_arg {
|
struct trap_arg {
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
# ifdef HAVE_SIGPROCMASK
|
# ifdef HAVE_SIGPROCMASK
|
||||||
sigset_t mask;
|
sigset_t mask;
|
||||||
# else
|
# else
|
||||||
|
@ -594,7 +594,7 @@ trap(arg)
|
||||||
|
|
||||||
trap_list[sig] = command;
|
trap_list[sig] = command;
|
||||||
/* enable at least specified signal. */
|
/* enable at least specified signal. */
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
#ifdef HAVE_SIGPROCMASK
|
#ifdef HAVE_SIGPROCMASK
|
||||||
sigdelset(&arg->mask, sig);
|
sigdelset(&arg->mask, sig);
|
||||||
#else
|
#else
|
||||||
|
@ -604,7 +604,7 @@ trap(arg)
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
static VALUE
|
static VALUE
|
||||||
trap_ensure(arg)
|
trap_ensure(arg)
|
||||||
struct trap_arg *arg;
|
struct trap_arg *arg;
|
||||||
|
@ -623,7 +623,7 @@ trap_ensure(arg)
|
||||||
void
|
void
|
||||||
rb_trap_restore_mask()
|
rb_trap_restore_mask()
|
||||||
{
|
{
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
# ifdef HAVE_SIGPROCMASK
|
# ifdef HAVE_SIGPROCMASK
|
||||||
sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
|
sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
|
||||||
# else
|
# else
|
||||||
|
@ -655,7 +655,7 @@ sig_trap(argc, argv)
|
||||||
if (OBJ_TAINTED(arg.cmd)) {
|
if (OBJ_TAINTED(arg.cmd)) {
|
||||||
rb_raise(rb_eSecurityError, "Insecure: tainted signal trap");
|
rb_raise(rb_eSecurityError, "Insecure: tainted signal trap");
|
||||||
}
|
}
|
||||||
#if !defined(NT) && !defined(_WIN32_WCE)
|
#ifndef _WIN32
|
||||||
/* disable interrupt */
|
/* disable interrupt */
|
||||||
# ifdef HAVE_SIGPROCMASK
|
# ifdef HAVE_SIGPROCMASK
|
||||||
sigfillset(&arg.mask);
|
sigfillset(&arg.mask);
|
||||||
|
|
2
st.c
2
st.c
|
@ -7,7 +7,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "st.h"
|
#include "st.h"
|
||||||
|
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
10
util.c
10
util.c
|
@ -16,7 +16,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
#include "missing/file.h"
|
#include "missing/file.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -75,11 +75,11 @@ scan_hex(start, len, retlen)
|
||||||
# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
|
# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(NT) || defined(_WIN32_WCE)
|
#ifdef _WIN32
|
||||||
#include "missing/file.h"
|
#include "missing/file.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(NT) || defined(_WIN32_WCE)
|
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1993, Intergraph Corporation
|
* 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)",
|
rb_fatal("Cannot do inplace edit on long filename (%ld characters)",
|
||||||
RSTRING(str)->len);
|
RSTRING(str)->len);
|
||||||
|
|
||||||
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(NT) || defined(_WIN32_WCE)
|
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32)
|
||||||
/* Style 0 */
|
/* Style 0 */
|
||||||
slen = RSTRING(str)->len;
|
slen = RSTRING(str)->len;
|
||||||
rb_str_cat(str, suffix, extlen);
|
rb_str_cat(str, suffix, extlen);
|
||||||
|
@ -229,7 +229,7 @@ fallback:
|
||||||
memcpy(RSTRING(str)->ptr, buf, RSTRING(str)->len);
|
memcpy(RSTRING(str)->ptr, buf, RSTRING(str)->len);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__CYGWIN32__) || defined(NT) || defined(_WIN32_WCE)
|
#if defined(__CYGWIN32__) || defined(_WIN32)
|
||||||
static int
|
static int
|
||||||
valid_filename(char *s)
|
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
|
#define scan_hex ruby_scan_hex
|
||||||
unsigned long scan_hex _((const char*, int, int*));
|
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();
|
void ruby_add_suffix();
|
||||||
#define add_suffix ruby_add_suffix
|
#define add_suffix ruby_add_suffix
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -78,7 +78,7 @@ prefix = /usr
|
||||||
DESTDIR = $(prefix)
|
DESTDIR = $(prefix)
|
||||||
!endif
|
!endif
|
||||||
!if !defined(CFLAGS)
|
!if !defined(CFLAGS)
|
||||||
CFLAGS = -MD -DNT=1 $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
||||||
!endif
|
!endif
|
||||||
!if !defined(CPPFLAGS)
|
!if !defined(CPPFLAGS)
|
||||||
CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -DLIBRUBY_SO=\"$(LIBRUBY_SO)\"
|
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 DEFAULT_KCODE KCODE_NONE
|
||||||
#define DLEXT ".so"
|
#define DLEXT ".so"
|
||||||
#define DLEXT2 ".dll"
|
#define DLEXT2 ".dll"
|
||||||
#define NT 1
|
|
||||||
#define RUBY_LIB "/lib/ruby/1.7"
|
#define RUBY_LIB "/lib/ruby/1.7"
|
||||||
#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
|
#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
|
||||||
#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/1.7"
|
#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/1.7"
|
||||||
|
|
|
@ -33,6 +33,14 @@
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#undef OpenFile
|
#undef OpenFile
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define NT 1 /* deprecated */
|
||||||
|
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
|
#undef CharNext
|
||||||
|
#define CharNext CharNextA
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// We're not using Microsoft's "extensions" to C for
|
// We're not using Microsoft's "extensions" to C for
|
||||||
// Structured Exception Handling (SEH) so we can nuke these
|
// Structured Exception Handling (SEH) so we can nuke these
|
||||||
|
|
|
@ -9,7 +9,7 @@ CFG=MIPS
|
||||||
CESubsystem=windowsce,3.0
|
CESubsystem=windowsce,3.0
|
||||||
#!MESSAGE CESubsystem not specified. use windowsce,2.11.
|
#!MESSAGE CESubsystem not specified. use windowsce,2.11.
|
||||||
!MESSAGE CESubsystem not specified. use windowsce,3.0.
|
!MESSAGE CESubsystem not specified. use windowsce,3.0.
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IF "$(CEVersion)" == ""
|
!IF "$(CEVersion)" == ""
|
||||||
#CEVersion=200
|
#CEVersion=200
|
||||||
|
|
|
@ -470,7 +470,6 @@ rb_num_coerce_bin
|
||||||
rb_num_zerodiv
|
rb_num_zerodiv
|
||||||
rb_obj_alloc
|
rb_obj_alloc
|
||||||
rb_obj_as_string
|
rb_obj_as_string
|
||||||
rb_obj_become
|
|
||||||
rb_obj_call_init
|
rb_obj_call_init
|
||||||
rb_obj_class
|
rb_obj_class
|
||||||
rb_obj_clone
|
rb_obj_clone
|
||||||
|
@ -800,15 +799,15 @@ yyerrflag
|
||||||
yygindex
|
yygindex
|
||||||
yylen
|
yylen
|
||||||
yylhs
|
yylhs
|
||||||
yyname
|
yyname
|
||||||
yynerrs
|
yynerrs
|
||||||
yyrindex
|
yyrindex
|
||||||
yyrule
|
yyrule
|
||||||
yysindex
|
yysindex
|
||||||
yyss
|
yyss
|
||||||
yyssp
|
yyssp
|
||||||
yytable
|
yytable
|
||||||
yyval
|
yyval
|
||||||
yyvs
|
yyvs
|
||||||
yyvsp
|
yyvsp
|
||||||
wce_SetCommandLine
|
wce_SetCommandLine
|
||||||
|
|
Загрузка…
Ссылка в новой задаче