diff options
author | akiyoshi <akiyoshi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-09 08:15:24 +0000 |
---|---|---|
committer | akiyoshi <akiyoshi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-09 08:15:24 +0000 |
commit | 14173ed0b5107d9cc04ce47ffb3384b88cfe8e6b (patch) | |
tree | c61465402d430e2a8adc109935b1ed9070be4bb2 | |
parent | c7f388aec91f229ab26e934f882dbd56636dd3f1 (diff) |
Port socket library to VMS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/socket/getaddrinfo.c | 7 | ||||
-rw-r--r-- | ext/socket/socket.c | 6 | ||||
-rw-r--r-- | vms/config.h_in | 61 |
4 files changed, 15 insertions, 63 deletions
@@ -1,3 +1,7 @@ +Thu Dec 9 17:00:00 2004 Akiyoshi, Masamichi <akiyoshi@hp.com> + + * ext/socket/socket.c, ext/socket/getaddrinfo.c: port to VMS + Thu Dec 9 16:31:02 2004 NAKAMURA Usaku <usa@ruby-lang.org> * ext/sdbm/init.c (GetDBM): typo. diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index 14bedb2e9b..5145982320 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -40,7 +40,7 @@ #include "config.h" #include <sys/types.h> -#ifndef _WIN32 +#if !defined(__WIN32) && !defined(__VMS) #include <sys/param.h> #if defined(__BEOS__) # include <net/socket.h> @@ -62,6 +62,11 @@ #include <resolv.h> #endif #include <unistd.h> +#elif defined(__VMS ) +#include <socket.h> +#include <inet.h> +#include <in.h> +#include <netdb.h> #else #include <winsock2.h> #include <io.h> diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 975c0525e3..c2f5dfdbbe 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -64,6 +64,10 @@ #endif #include "sockport.h" +#if defined(__vms) +#include <tcp.h> +#endif + static int do_not_reverse_lookup = 0; VALUE rb_cBasicSocket; @@ -1856,7 +1860,7 @@ static VALUE sock_s_socketpair(klass, domain, type, protocol) VALUE klass, domain, type, protocol; { -#if !defined(_WIN32) && !defined(__BEOS__) && !defined(__EMX__) && !defined(__QNXNTO__) +#if !defined(_WIN32) && !defined(__BEOS__) && !defined(__EMX__) && !defined(__QNXNTO__) && !defined(__VMS) int d, t, sp[2]; setup_domain_and_type(domain, &d, type, &t); diff --git a/vms/config.h_in b/vms/config.h_in deleted file mode 100644 index aeba9d359c..0000000000 --- a/vms/config.h_in +++ /dev/null @@ -1,61 +0,0 @@ -/* config.h for OpenVMS Alpha */ - -/* #define HAVE_PROTOTYPES 1 */ -#define HAVE_STDARG_PROTOTYPES 1 -/* #define HAVE_ATTR_NORETURN 1 */ -/* #define inline __inline */ -#define HAVE_DIRENT_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_LIMITS_H 1 - -#define HAVE_SYS_FILE_H 1 -#define HAVE_FCNTL_H 1 -/* #define HAVE_PWD_H 1 */ -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TIMES_H 1 -/* #define HAVE_SYS_PARAM_H 1 */ -#define HAVE_SYS_WAIT_H 1 -#define HAVE_STRING_H 1 -#define HAVE_UTIME_H 1 -#define HAVE_MEMORY_H 1 -/* #define HAVE_ST_BLKSIZE 1 */ -#define HAVE_ST_RDEV 1 -/* #define GETGROUPS_T gid_t */ -#define GETGROUPS_T int -#define RETSIGTYPE void -/* #define HAVE_ALLOCA 1 */ -/* #define vfork fork */ -#define HAVE_FMOD 1 -#define HAVE_RANDOM 1 -#define HAVE_WAITPID 1 -#define HAVE_GETCWD 1 -#define HAVE_TRUNCATE 1 -/* #define HAVE_CHSIZE 1 */ -#define HAVE_TIMES 1 -/* #define HAVE_UTIMES 1 */ -#define HAVE_FCNTL 1 -/* #define HAVE_SETITIMER 1 */ -/* #define HAVE_GETGROUPS 1 */ -#define HAVE_SIGPROCMASK 1 -/* #define HAVE_GETLOGIN 1 */ -#define HAVE_TELLDIR 1 -#define HAVE_SEEKDIR 1 - -#define RSHIFT(x,y) ((x)>>y) -#define DEFAULT_KCODE KCODE_NONE -#define DLEXT ".EXE" -/* #define DLEXT2 "" */ -#define RUBY_LIB "/RUBY_LIB" -#define RUBY_SITE_LIB "/RUBY_SYSLIB" -#define RUBY_SITE_LIB2 "/SYS$SHARE" -#define RUBY_PLATFORM "alpha-vms" -#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 |