зеркало из https://github.com/github/ruby.git
* dln.c: Ruby no longer supports MS-DOS.
* ext/sdbm/_sdbm.c: ditto. * ext/sdbm/sdbm.h: ditto. * gc.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/util.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * strftime.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8dd118c0db
Коммит
ae7ea3332b
26
ChangeLog
26
ChangeLog
|
@ -1,3 +1,29 @@
|
|||
Sat Oct 4 22:30:28 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||
|
||||
* dln.c: Ruby no longer supports MS-DOS.
|
||||
|
||||
* ext/sdbm/_sdbm.c: ditto.
|
||||
|
||||
* ext/sdbm/sdbm.h: ditto.
|
||||
|
||||
* gc.c: ditto.
|
||||
|
||||
* hash.c: ditto.
|
||||
|
||||
* include/ruby/defines.h: ditto.
|
||||
|
||||
* include/ruby/util.h: ditto.
|
||||
|
||||
* io.c: ditto.
|
||||
|
||||
* process.c: ditto.
|
||||
|
||||
* ruby.c: ditto.
|
||||
|
||||
* strftime.c: ditto.
|
||||
|
||||
* util.c: ditto.
|
||||
|
||||
Sat Oct 4 22:14:15 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||
|
||||
* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
|
||||
|
|
8
dln.c
8
dln.c
|
@ -1581,7 +1581,7 @@ dln_find_exe_r(const char *fname, const char *path, char *buf, int size)
|
|||
}
|
||||
|
||||
if (!path) {
|
||||
#if defined(MSDOS) || defined(_WIN32) || defined(__MACOS__)
|
||||
#if defined(_WIN32) || defined(__MACOS__)
|
||||
path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;.";
|
||||
#else
|
||||
path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
|
||||
|
@ -1713,9 +1713,7 @@ dln_find_1(const char *fname, const char *path, char *fbuf, int size,
|
|||
#if defined(DOSISH)
|
||||
if (exe_flag) {
|
||||
static const char extension[][5] = {
|
||||
#if defined(MSDOS)
|
||||
".com", ".exe", ".bat",
|
||||
#elif defined(__EMX__) || defined(_WIN32)
|
||||
#if defined(__EMX__) || defined(_WIN32)
|
||||
".exe", ".com", ".cmd", ".bat",
|
||||
/* end of __EMX__ or _WIN32 */
|
||||
#endif
|
||||
|
@ -1741,7 +1739,7 @@ dln_find_1(const char *fname, const char *path, char *fbuf, int size,
|
|||
}
|
||||
goto next;
|
||||
}
|
||||
#endif /* MSDOS or _WIN32 or __EMX__ */
|
||||
#endif /* _WIN32 or __EMX__ */
|
||||
|
||||
#ifndef __MACOS__
|
||||
if (stat(fbuf, &st) == 0) {
|
||||
|
|
|
@ -103,7 +103,7 @@ static int duppair proto((char *, datum));
|
|||
/*
|
||||
* externals
|
||||
*/
|
||||
#if !defined sun && !defined MSDOS && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno)
|
||||
#if !defined sun && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno)
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
|
@ -338,7 +338,7 @@ makroom(register DBM *db, long int hash, int need)
|
|||
{
|
||||
long newp;
|
||||
char twin[PBLKSIZ];
|
||||
#if defined MSDOS || (defined _WIN32 && !defined __CYGWIN__)
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
char zer[PBLKSIZ];
|
||||
long oldtail;
|
||||
#endif
|
||||
|
@ -365,7 +365,7 @@ makroom(register DBM *db, long int hash, int need)
|
|||
* here, as sdbm_store will do so, after it inserts the incoming pair.
|
||||
*/
|
||||
|
||||
#if defined MSDOS || (defined _WIN32 && !defined __CYGWIN__)
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
/*
|
||||
* Fill hole with 0 if made it.
|
||||
* (hole is NOT read as 0)
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef struct {
|
|||
|
||||
extern datum nullitem;
|
||||
|
||||
#if defined(__STDC__) || defined(MSDOS)
|
||||
#if defined(__STDC__)
|
||||
#define proto(p) p
|
||||
#else
|
||||
#define proto(p) ()
|
||||
|
|
4
gc.c
4
gc.c
|
@ -75,12 +75,8 @@ void *alloca ();
|
|||
#endif /* __GNUC__ */
|
||||
|
||||
#ifndef GC_MALLOC_LIMIT
|
||||
#if defined(MSDOS)
|
||||
#define GC_MALLOC_LIMIT 200000
|
||||
#else
|
||||
#define GC_MALLOC_LIMIT 8000000
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define nomem_error GET_VM()->special_exceptions[ruby_error_nomemory]
|
||||
|
||||
|
|
11
hash.c
11
hash.c
|
@ -2015,18 +2015,7 @@ ruby_setenv(const char *name, const char *value)
|
|||
}
|
||||
len = strlen(name) + strlen(value) + 2;
|
||||
environ[i] = ALLOC_N(char, len);
|
||||
#ifndef MSDOS
|
||||
snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
|
||||
#else
|
||||
/* MS-DOS requires environment variable names to be in uppercase */
|
||||
/* [Tom Dinger, 27 August 1990: Well, it doesn't _require_ it, but
|
||||
* some utilities and applications may break because they only look
|
||||
* for upper case strings. (Fixed strupr() bug here.)]
|
||||
*/
|
||||
strcpy(environ[i],name); strupr(environ[i]);
|
||||
sprintf(environ[i] + strlen(name),"=%s", value);
|
||||
#endif /* MSDOS */
|
||||
|
||||
#endif /* WIN32 */
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ void xfree(void*);
|
|||
#undef _WIN32
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(_WIN32) || defined(__EMX__)
|
||||
#if defined(_WIN32) || defined(__EMX__)
|
||||
#define DOSISH 1
|
||||
#ifndef _WIN32_WCE
|
||||
# define DOSISH_DRIVE_LETTER
|
||||
|
|
|
@ -45,7 +45,7 @@ unsigned long ruby_scan_oct(const char *, int, int *);
|
|||
#define scan_hex ruby_scan_hex
|
||||
unsigned long ruby_scan_hex(const char *, int, int *);
|
||||
|
||||
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
|
||||
#if defined(__CYGWIN32__) || defined(_WIN32)
|
||||
void ruby_add_suffix(VALUE str, const char *suffix);
|
||||
#endif
|
||||
|
||||
|
|
11
io.c
11
io.c
|
@ -29,11 +29,11 @@
|
|||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__EMX__) || defined(__BEOS__)
|
||||
#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__EMX__) || defined(__BEOS__)
|
||||
# define NO_SAFE_RENAME
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(__CYGWIN__) || defined(_WIN32)
|
||||
#if defined(__CYGWIN__) || defined(_WIN32)
|
||||
# define NO_LONG_FNAME
|
||||
#endif
|
||||
|
||||
|
@ -6397,7 +6397,6 @@ rb_f_select(int argc, VALUE *argv, VALUE obj)
|
|||
|
||||
}
|
||||
|
||||
#if !defined(MSDOS)
|
||||
static int
|
||||
io_cntl(int fd, int cmd, long narg, int io_p)
|
||||
{
|
||||
|
@ -6417,12 +6416,10 @@ io_cntl(int fd, int cmd, long narg, int io_p)
|
|||
#endif
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VALUE
|
||||
rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p)
|
||||
{
|
||||
#if !defined(MSDOS)
|
||||
int cmd = NUM2ULONG(req);
|
||||
rb_io_t *fptr;
|
||||
long len = 0;
|
||||
|
@ -6488,10 +6485,6 @@ rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p)
|
|||
}
|
||||
|
||||
return INT2NUM(retval);
|
||||
#else
|
||||
rb_notimplement();
|
||||
return Qnil; /* not reached */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
25
process.c
25
process.c
|
@ -1001,14 +1001,9 @@ proc_exec_v(char **argv, const char *prog)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#if defined(MSDOS) || defined(__EMX__) || defined(OS2)
|
||||
#if defined(__EMX__) || defined(OS2)
|
||||
{
|
||||
#if defined(__EMX__) || defined(OS2) /* OS/2 emx */
|
||||
#define COMMAND "cmd.exe"
|
||||
#endif
|
||||
#if defined(MSDOS)
|
||||
#define COMMAND "command.com"
|
||||
#endif
|
||||
char *extension;
|
||||
|
||||
if ((extension = strrchr(prog, '.')) != NULL && STRCASECMP(extension, ".bat") == 0) {
|
||||
|
@ -1034,7 +1029,7 @@ proc_exec_v(char **argv, const char *prog)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif /* MSDOS or __EMX__ */
|
||||
#endif /* __EMX__ */
|
||||
before_exec();
|
||||
execv(prog, argv);
|
||||
preserving_errno(after_exec());
|
||||
|
@ -1085,14 +1080,7 @@ rb_proc_exec(const char *str)
|
|||
if (nl) s = nl;
|
||||
}
|
||||
if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
|
||||
#if defined(MSDOS)
|
||||
int status;
|
||||
before_exec();
|
||||
status = system(str);
|
||||
after_exec();
|
||||
if (status != -1)
|
||||
exit(status);
|
||||
#elif defined(__CYGWIN32__) || defined(__EMX__)
|
||||
#if defined(__CYGWIN32__) || defined(__EMX__)
|
||||
char fbuf[MAXPATHLEN];
|
||||
char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf));
|
||||
int status = -1;
|
||||
|
@ -1663,10 +1651,9 @@ rb_exec_arg_fixup(struct rb_exec_arg *e)
|
|||
* expansion. If +command+ is a two-element array, the first
|
||||
* element is the command to be executed, and the second argument is
|
||||
* used as the <code>argv[0]</code> value, which may show up in process
|
||||
* listings. In MSDOS environments, the command is executed in a
|
||||
* subshell; otherwise, one of the <code>exec(2)</code> system calls is
|
||||
* used, so the running command may inherit some of the environment of
|
||||
* the original program (including open file descriptors).
|
||||
* listings. In order to execute the command, one of the <code>exec(2)</code>
|
||||
* system calls is used, so the running command may inherit some of the environment
|
||||
* of the original program (including open file descriptors).
|
||||
*
|
||||
* The hash arguments, env and options, are same as
|
||||
* <code>system</code> and <code>spawn</code>.
|
||||
|
|
9
ruby.c
9
ruby.c
|
@ -1471,15 +1471,6 @@ ruby_prog_init(void)
|
|||
rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);
|
||||
|
||||
rb_define_global_const("ARGV", rb_argv);
|
||||
|
||||
#ifdef MSDOS
|
||||
/*
|
||||
* There is no way we can refer to them from ruby, so close them to save
|
||||
* space.
|
||||
*/
|
||||
(void)fclose(stdaux);
|
||||
(void)fclose(stdprn);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -126,7 +126,7 @@ extern char *strchr();
|
|||
#ifndef DLL_IMPORT
|
||||
#define DLL_IMPORT
|
||||
#endif
|
||||
#if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
|
||||
#if !defined(OS2) && defined(HAVE_TZNAME)
|
||||
extern DLL_IMPORT char *tzname[2];
|
||||
#ifdef HAVE_DAYLIGHT
|
||||
extern DLL_IMPORT int daylight;
|
||||
|
|
2
util.c
2
util.c
|
@ -191,7 +191,7 @@ ruby_strtoul(const char *str, char **endptr, int base)
|
|||
# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
|
||||
#if defined(__CYGWIN32__) || defined(_WIN32)
|
||||
/*
|
||||
* Copyright (c) 1993, Intergraph Corporation
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче