diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-04 13:57:06 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-04 13:57:06 +0000 |
commit | e8ee99ff1ae054c4edefb60083b11db5fe1c7429 (patch) | |
tree | fed14f02c23978b6d2edd58b011c1329b9eb99d8 | |
parent | a8c3540b32d7621c183627d7cc198f4b24798387 (diff) | |
download | ruby-e8ee99ff1ae054c4edefb60083b11db5fe1c7429.tar.gz |
* dln.c: Ruby no longer supports VMS.
* error.c: ditto.
* eval.c: ditto.
* eval_intern.h: ditto.
* include/ruby/defines.h: ditto.
* include/ruby/ruby.h: ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* vms/config.h: removed.
* vms/vms.h: ditto.
* vms/vmsruby_private.c: ditto.
* vms/vmsruby_private.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 28 | ||||
-rw-r--r-- | dln.c | 36 | ||||
-rw-r--r-- | error.c | 2 | ||||
-rw-r--r-- | eval.c | 5 | ||||
-rw-r--r-- | eval_intern.h | 8 | ||||
-rw-r--r-- | include/ruby/defines.h | 6 | ||||
-rw-r--r-- | include/ruby/ruby.h | 5 | ||||
-rw-r--r-- | io.c | 6 | ||||
-rw-r--r-- | process.c | 5 | ||||
-rw-r--r-- | ruby.c | 4 | ||||
-rw-r--r-- | vms/config.h | 123 | ||||
-rw-r--r-- | vms/vms.h | 13 | ||||
-rw-r--r-- | vms/vmsruby_private.c | 52 | ||||
-rw-r--r-- | vms/vmsruby_private.h | 7 |
14 files changed, 31 insertions, 269 deletions
@@ -1,3 +1,31 @@ +Sat Oct 4 22:50:14 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * dln.c: Ruby no longer supports VMS. + + * error.c: ditto. + + * eval.c: ditto. + + * eval_intern.h: ditto. + + * include/ruby/defines.h: ditto. + + * include/ruby/ruby.h: ditto. + + * io.c: ditto. + + * process.c: ditto. + + * ruby.c: ditto. + + * vms/config.h: removed. + + * vms/vms.h: ditto. + + * vms/vmsruby_private.c: ditto. + + * vms/vmsruby_private.h: ditto. + Sat Oct 4 22:44:23 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp> * dln.c: Ruby no longer supports Windows CE. @@ -45,7 +45,7 @@ void *xrealloc(); #define free(x) xfree(x) #include <stdio.h> -#if defined(_WIN32) || defined(__VMS) +#if defined(_WIN32) #include "missing/file.h" #endif #include <sys/types.h> @@ -70,11 +70,6 @@ void *xrealloc(); char *getenv(); #endif -#if defined(__VMS) -#pragma builtins -#include <dlfcn.h> -#endif - #if defined(__APPLE__) && defined(__MACH__) /* Mac OS X */ # if defined(HAVE_DLOPEN) /* Mac OS X with dlopen (10.3 or later) */ @@ -1460,35 +1455,6 @@ dln_load(const char *file) } #endif /* __BEOS__*/ -#if defined(__VMS) -#define DLN_DEFINED - { - void *handle, (*init_fct)(); - char *fname, *p1, *p2; - - fname = (char *)__alloca(strlen(file)+1); - strcpy(fname,file); - if (p1 = strrchr(fname,'/')) - fname = p1 + 1; - if (p2 = strrchr(fname,'.')) - *p2 = '\0'; - - if ((handle = (void*)dlopen(fname, 0)) == NULL) { - error = dln_strerror(); - goto failed; - } - - if ((init_fct = (void (*)())dlsym(handle, buf)) == NULL) { - error = DLN_ERROR(); - dlclose(handle); - goto failed; - } - /* Call the init code */ - (*init_fct)(); - return handle; - } -#endif /* __VMS */ - #ifndef DLN_DEFINED rb_notimplement(); #endif @@ -898,7 +898,7 @@ get_syserr(int n) static VALUE syserr_initialize(int argc, VALUE *argv, VALUE self) { -#if !defined(_WIN32) && !defined(__VMS) +#if !defined(_WIN32) char *strerror(); #endif const char *err; @@ -61,11 +61,6 @@ ruby_init(void) PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { rb_call_inits(); - -#if defined(__VMS) - _vmsruby_init(); -#endif - ruby_prog_init(); } POP_TAG(); diff --git a/eval_intern.h b/eval_intern.h index 17d0669a55..a4c4540b65 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -64,10 +64,6 @@ char *strrchr(const char *, const char); #include <net/socket.h> #endif -#ifdef __VMS -#include "vmsruby_private.h" -#endif - #define ruby_setjmp(env) RUBY_SETJMP(env) #define ruby_longjmp(env,val) RUBY_LONGJMP(env,val) #ifdef __CYGWIN__ @@ -78,10 +74,6 @@ int _setjmp(), _longjmp(); #include <signal.h> #include <errno.h> -#if defined(__VMS) -#pragma nostandard -#endif - #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif diff --git a/include/ruby/defines.h b/include/ruby/defines.h index f810d3cb60..0b870db137 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -192,10 +192,6 @@ void xfree(void*); #include "ruby/win32.h" #endif -#if defined(__VMS) -#include "vms/vms.h" -#endif - #if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) #include <net/socket.h> /* intern.h needs fd_set definition */ #endif @@ -255,7 +251,7 @@ void rb_ia64_flushrs(void); #endif #ifndef CASEFOLD_FILESYSTEM -# if defined DOSISH || defined __VMS +# if defined DOSISH # define CASEFOLD_FILESYSTEM 1 # else # define CASEFOLD_FILESYSTEM 0 diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index cdb2522763..1c53777fc9 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -77,11 +77,6 @@ extern "C" { # endif #endif -#if defined(__VMS) -# pragma builtins -# define alloca __alloca -#endif - #if SIZEOF_LONG == SIZEOF_VOIDP typedef unsigned long VALUE; typedef unsigned long ID; @@ -159,16 +159,10 @@ static int max_file_descriptor = NOFILE; # define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND) #elif defined(__BEOS__) # define STDIO_READ_DATA_PENDING(fp) (fp->_state._eof == 0) -#elif defined(__VMS) -# define STDIO_READ_DATA_PENDING(fp) (((unsigned int)(*(fp))->_cnt) > 0) #else # define STDIO_READ_DATA_PENDING(fp) (!feof(fp)) #endif -#if defined(__VMS) -#define open(file_spec, flags, mode) open(file_spec, flags, mode, "rfm=stmlf") -#endif - #define GetWriteIO(io) rb_io_get_write_io(io) #define READ_DATA_PENDING(fptr) ((fptr)->rbuf_len) @@ -2256,15 +2256,10 @@ rb_fork(int *status, int (*chfunc)(void*), void *charg, VALUE fds) int ep[2]; #endif -#ifndef __VMS #define prefork() ( \ rb_io_flush(rb_stdout), \ rb_io_flush(rb_stderr) \ ) -#else -#define prefork() ((void)0) -#endif - prefork(); #ifdef FD_CLOEXEC @@ -1404,10 +1404,6 @@ init_ids(struct cmdline_options *opt) rb_gid_t gid = getgid(); rb_gid_t egid = getegid(); -#ifdef VMS - uid |= gid << 16; - euid |= egid << 16; -#endif if (uid != euid) opt->setids |= 1; if (egid != gid) opt->setids |= 2; if (uid && opt->setids) { diff --git a/vms/config.h b/vms/config.h deleted file mode 100644 index 55b0c36803..0000000000 --- a/vms/config.h +++ /dev/null @@ -1,123 +0,0 @@ -#define HAVE_ACOSH 1 -/* #define HAVE_ALLOCA_H 1 */ -/* #define HAVE_CHROOT 1 */ -#define HAVE_COSH 1 -/* #define HAVE_CRYPT 1 */ -#define HAVE_DAYLIGHT 1 -#define HAVE_DECL_SYS_NERR 1 -#define HAVE_DIRENT_H 1 -#define HAVE_DLOPEN 1 -#define HAVE_DUP2 1 -/* #define HAVE_FCHMOD 1 */ -#define HAVE_FCNTL 1 -#define HAVE_FCNTL_H 1 -#define HAVE_FINITE 1 -#define HAVE_FLOCK 1 -#define HAVE_FMOD 1 -#define HAVE_FREXP 1 -/* #define HAVE_FSEEKO 1 */ -#define HAVE_FSYNC 1 -/* #define HAVE_FTELLO 1 */ -#define HAVE_GETCWD 1 -/* #define HAVE_GETPGID 1 xxxx */ -#define HAVE_GETPGRP 1 -/* #define HAVE_GETPRIORITY 1 */ -/* #define HAVE_GETRLIMIT 1 */ -#define HAVE_PID_T 1 -#define HAVE_GID_T 1 -#define HAVE_UID_T 1 -#define HAVE_HYPOT 1 -#define HAVE_ISASCII 1 -/* #define HAVE_ISINF 1 */ -#define HAVE_ISNAN 1 -/* #define HAVE_LCHMOD 1 */ -/* #define HAVE_LCHOWN 1 */ -#define HAVE_LONG_LONG 1 -/* #define HAVE_LSTAT 1 */ -#define HAVE_MEMCMP 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MKDIR 1 -#define HAVE_MKTIME 1 -#define HAVE_MODF 1 -#define HAVE_OFF_T 1 -#define HAVE_PAUSE 1 -/* #define HAVE_PROTOTYPES 1 */ -/* #define HAVE_PWD_H 1 */ -/* #define HAVE_READLINK 1 */ -#define HAVE_SEEKDIR 1 -/* #define HAVE_SETITIMER 1 */ -/* #define HAVE_SETPGID 1 xxxx */ -/* #define HAVE_SETRESGID 1 */ -/* #define HAVE_SETRESUID 1 */ -/* #define HAVE_SETSID 1 xxxx */ -#define HAVE_SIGPROCMASK 1 -#define HAVE_SINH 1 -#define HAVE_STDARG_PROTOTYPES 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRERROR 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRING_H 1 -#define HAVE_STRNCASECMP 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOD 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRUCT_TM_TM_GMTOFF 1 -/* #define HAVE_ST_BLKSIZE 1 */ -/* #define HAVE_ST_BLOCKS 1 */ -#define HAVE_ST_RDEV 1 -/* #define HAVE_SYMLINK 1 */ -/* #define HAVE_SYSCALL 1 */ -#define HAVE_SYS_FILE_H 1 -/* #define HAVE_SYS_MKDEV_H 1 */ -/* #define HAVE_SYS_PARAM_H 1 */ -#define HAVE_SYS_RESOURCE_H 1 -/* #define HAVE_SYS_SELECT_H 1 */ -#define HAVE_SYS_TIMES_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_WAIT_H 1 -#define HAVE_TANH 1 -#define HAVE_TELLDIR 1 -/* #define HAVE_TIMEGM 1 */ -#define HAVE_TIMES 1 -#define HAVE_TM_ZONE 1 -#define HAVE_TRUNCATE 1 -#define HAVE_TZNAME 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UTIMES 1 -#define HAVE_UTIME_H 1 -/* #define HAVE_VSNPRINTF 1 */ -#define HAVE_WAIT4 1 -#define HAVE_WAITPID 1 - #define HAVE__SETJMP 1 - -#define GETGROUPS_T gid_t -#define RETSIGTYPE void - -#define RSHIFT(x,y) ((x)>>y) -#define DEFAULT_KCODE KCODE_EUC -#define DLEXT ".EXE" -#define DLEXT2 "" -#define RUBY_LIB "/RUBY_LIB" -#define RUBY_SITE_LIB "/RUBY_SYSLIB" -#define RUBY_SITE_LIB2 "/SYS$SHARE" -#define RUBY_ARCHLIB "" -#define RUBY_SITE_ARCHLIB "" -#define SIZEOF_INT 4 -#define SIZEOF_SHORT 2 -#define SIZEOF_LONG 4 -#define SIZEOF_VOIDP 4 -#define SIZEOF_FLOAT 4 -#define SIZEOF_DOUBLE 8 - -#if defined(__vax) -#define RUBY_PLATFORM "vax-vms" -#elif defined(__alpha) -#define RUBY_PLATFORM "alpha-vms" -#elif defined(__ia-64) -#define RUBY_PLATFORM "ia64-vms" -#else -#define RUBY_PLATFORM "vms" -#endif diff --git a/vms/vms.h b/vms/vms.h deleted file mode 100644 index 8eaa88cde3..0000000000 --- a/vms/vms.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __FAST_SETJMP -#define __FAST_SETJMP /* use decc$setjmp/decc$longjmp */ -#endif - -extern int isinf(double); -extern int isnan(double); -extern int flock(int fd, int oper); - -extern int vsnprintf(); -extern int snprintf(); - -#define LONG_LONG long long -#define SIZEOF_LONG_LONG sizeof(long long) diff --git a/vms/vmsruby_private.c b/vms/vmsruby_private.c deleted file mode 100644 index c1cbfcebec..0000000000 --- a/vms/vmsruby_private.c +++ /dev/null @@ -1,52 +0,0 @@ -#include "vmsruby_private.h" -#include <stdio.h> -#include <stdlib.h> - -void _vmsruby_init(void) -{ - _vmsruby_set_switch("DECC$WLS", "TRUE"); -} - - -#include <starlet.h> -#include <string.h> -#include <descrip.h> -#include <lnmdef.h> - -struct item_list_3 { - short buflen; - short itmcod; - void *bufadr; - void *retlen; -}; - -long _vmsruby_set_switch(char *name, char *value) -{ - long status; - struct item_list_3 itemlist[20]; - int i; - - i = 0; - itemlist[i].itmcod = LNM$_STRING; - itemlist[i].buflen = strlen(value); - itemlist[i].bufadr = value; - itemlist[i].retlen = NULL; - i++; - itemlist[i].itmcod = 0; - itemlist[i].buflen = 0; - - $DESCRIPTOR(TABLE_d, "LNM$PROCESS"); - $DESCRIPTOR(lognam_d, ""); - - lognam_d.dsc$a_pointer = name; - lognam_d.dsc$w_length = strlen(name); - - status = sys$crelnm ( - 0, - &TABLE_d, - &lognam_d, - 0, /* usermode */ - itemlist); - - return status; -} diff --git a/vms/vmsruby_private.h b/vms/vmsruby_private.h deleted file mode 100644 index 24703dc7fc..0000000000 --- a/vms/vmsruby_private.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef VMSRUBY_H_INCLUDED -#define VMSRUBY_H_INCLUDED - -void _vmsruby_init(void); -long _vmsruby_set_switch(char *, char *); - -#endif /* VMSRUBY_H_INCLUDED */ |