aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-05-02 08:30:50 +0000
committerErlang/OTP <[email protected]>2010-05-02 08:30:50 +0000
commit3a68c36ca7aed71d643ea29460e36fec7e56817d (patch)
tree0899b533f3076b55368ba6aa9710172db8a22a4f /erts/emulator/drivers
parentc7a4c9375a7236826c5c31927f60e72684f6a230 (diff)
parente5c6b79fba89208f0d293ad69f5fd802931c08e2 (diff)
downloadotp-3a68c36ca7aed71d643ea29460e36fec7e56817d.tar.gz
otp-3a68c36ca7aed71d643ea29460e36fec7e56817d.tar.bz2
otp-3a68c36ca7aed71d643ea29460e36fec7e56817d.zip
Merge branch 'bg/remove-stray-ose-support' into dev
* bg/remove-stray-ose-support: configure: Remove stray OSE/Delta support Makefiles: Remove stray OSE/Delta support kernel tests: Remove stray OSE/Delta support system tests: Remove stray OSE/Delta support erl_interface tests: Remove stray OSE/Delta support epmd: Remove stray OSE/Delta support epmd: #ifdef out start_epmd() for other platforms than VxWorks emulator tests: Remove stray OSE/Delta support emulator: Remove stray OSE/Delta support emulator: Eliminate #ifdef for sys_tty_reset() test_server: Remove stray support for OSE/Delta OTP-8585 bg/remove-stray-ose-support
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r--erts/emulator/drivers/common/inet_drv.c82
-rw-r--r--erts/emulator/drivers/common/zlib_drv.c12
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c80
3 files changed, 23 insertions, 151 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index c6e23ee647..e8456cc616 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1997-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1997-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
@@ -41,14 +41,12 @@
#define STRINGIFY_1(b) IDENTITY(#b)
#define STRINGIFY(a) STRINGIFY_1(a)
-#ifndef _OSE_
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
-#endif
/* All platforms fail on malloc errors. */
@@ -186,18 +184,8 @@ static unsigned long one_value = 1;
#include <netdb.h>
#endif
-#ifndef _OSE_
#include <sys/socket.h>
#include <netinet/in.h>
-#else
-/* datatypes and macros from Solaris socket.h */
-struct linger {
- int l_onoff; /* option on/off */
- int l_linger; /* linger time */
-};
-#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
-#define SO_LINGER 0x0080 /* linger on close if data present */
-#endif
#ifdef VXWORKS
#include <rpc/rpctypes.h>
@@ -206,12 +194,10 @@ struct linger {
#include <rpc/types.h>
#endif
-#ifndef _OSE_
#include <netinet/tcp.h>
#include <arpa/inet.h>
-#endif
-#if (!defined(VXWORKS) && !defined(_OSE_))
+#if (!defined(VXWORKS))
#include <sys/param.h>
#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
@@ -226,33 +212,11 @@ struct linger {
#include <sys/ioctl.h>
#endif
-#ifndef _OSE_
#include <net/if.h>
-#else
-#define IFF_MULTICAST 0x00000800
-#endif
-
-#ifdef _OSE_
-#include "inet.h"
-#include "ineterr.h"
-#include "ose_inet_drv.h"
-#include "nameser.h"
-#include "resolv.h"
-#define SET_ASYNC(s) setsockopt((s), SOL_SOCKET, SO_OSEEVENT, (&(s)), sizeof(int))
-
-extern void select_release(void);
-
-#endif /* _OSE_ */
-
-/* Solaris headers, only to be used with SFK */
-#ifdef _OSE_SFK_
-#include <ctype.h>
-#include <string.h>
-#endif
/* SCTP support -- currently for UNIX platforms only: */
#undef HAVE_SCTP
-#if (!defined(VXWORKS) && !defined(_OSE_) && !defined(__WIN32__) && defined(HAVE_SCTP_H))
+#if (!defined(VXWORKS) && !defined(__WIN32__) && defined(HAVE_SCTP_H))
#include <netinet/sctp.h>
@@ -362,20 +326,6 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
#define sock_htons(x) htons((x))
#define sock_htonl(x) htonl((x))
-#ifdef _OSE_
-#define sock_accept(s, addr, len) ose_inet_accept((s), (addr), (len))
-#define sock_send(s,buf,len,flag) ose_inet_send((s),(buf),(len),(flag))
-#define sock_sendto(s,buf,blen,flag,addr,alen) \
- ose_inet_sendto((s),(buf),(blen),(flag),(addr),(alen))
-#define sock_sendv(s, vec, size, np, flag) \
- (*(np) = ose_inet_sendv((s), (SysIOVec*)(vec), (size)))
-#define sock_open(af, type, proto) ose_inet_socket((af), (type), (proto))
-#define sock_close(s) ose_inet_close((s))
-#define sock_hostname(buf, len) ose_gethostname((buf), (len))
-#define sock_getservbyname(name,proto) ose_getservbyname((name), (proto))
-#define sock_getservbyport(port,proto) ose_getservbyport((port), (proto))
-
-#else
#define sock_accept(s, addr, len) accept((s), (addr), (len))
#define sock_send(s,buf,len,flag) send((s),(buf),(len),(flag))
#define sock_sendto(s,buf,blen,flag,addr,alen) \
@@ -391,7 +341,6 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
#define sock_hostname(buf, len) gethostname((buf), (len))
#define sock_getservbyname(name,proto) getservbyname((name), (proto))
#define sock_getservbyport(port,proto) getservbyport((port), (proto))
-#endif /* _OSE_ */
#define sock_recv(s,buf,len,flag) recv((s),(buf),(len),(flag))
#define sock_recvfrom(s,buf,blen,flag,addr,alen) \
@@ -402,13 +351,8 @@ static int my_strncasecmp(const char *s1, const char *s2, size_t n)
#define sock_create_event(d) ((d)->s) /* return file descriptor */
#define sock_close_event(e) /* do nothing */
-#ifdef _OSE_
-#define inet_driver_select(port, e, mode, on) \
- ose_inet_select(port, e, mode, on)
-#else
#define inet_driver_select(port, e, mode, on) \
driver_select(port, e, mode | (on?ERL_DRV_USE:0), on)
-#endif /* _OSE_ */
#define sock_select(d, flags, onoff) do { \
(d)->event_mask = (onoff) ? \
@@ -3480,13 +3424,9 @@ static int inet_init()
INIT_ATOM(scheme);
/* add TCP, UDP and SCTP drivers */
-#ifdef _OSE_
- add_ose_tcp_drv_entry(&tcp_inet_driver_entry);
- add_ose_udp_drv_entry(&udp_inet_driver_entry);
-#else
add_driver_entry(&tcp_inet_driver_entry);
add_driver_entry(&udp_inet_driver_entry);
-# ifdef HAVE_SCTP
+#ifdef HAVE_SCTP
/* Check the size of SCTP AssocID -- currently both this driver and the
Erlang part require 32 bit: */
ASSERT(sizeof(sctp_assoc_t)==ASSOC_ID_LEN);
@@ -3501,8 +3441,8 @@ static int inet_init()
add_driver_entry(&sctp_inet_driver_entry);
}
}
-# endif
-#endif /* _OSE_ */
+#endif
+
/* remove the dummy inet driver */
remove_driver_entry(&inet_driver_entry);
return 0;
@@ -7518,7 +7458,6 @@ static int tcp_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf, int len,
tcp_deliver(desc, 0);
return ctl_reply(INET_REP_OK, NULL, 0, rbuf, rsize);
}
-#ifndef _OSE_
case TCP_REQ_SHUTDOWN: {
int how;
DEBUGF(("tcp_inet_ctl(%ld): FDOPEN\r\n", (long)desc->inet.port));
@@ -7535,7 +7474,6 @@ static int tcp_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf, int len,
return ctl_error(sock_errno(), rbuf, rsize);
}
}
-#endif
default:
DEBUGF(("tcp_inet_ctl(%ld): %u\r\n", (long)desc->inet.port, cmd));
return inet_ctl(INETP(desc), cmd, buf, len, rbuf, rsize);
diff --git a/erts/emulator/drivers/common/zlib_drv.c b/erts/emulator/drivers/common/zlib_drv.c
index 723efeaa13..f50899a730 100644
--- a/erts/emulator/drivers/common/zlib_drv.c
+++ b/erts/emulator/drivers/common/zlib_drv.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2003-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2003-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
@@ -115,7 +115,7 @@ typedef struct {
static int zlib_inflate(ZLibData* d, int flush);
static int zlib_deflate(ZLibData* d, int flush);
-#if defined(_OSE_) || defined(__WIN32__)
+#if defined(__WIN32__)
static int i32(char* buf)
#else
static inline int i32(char* buf)
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index d395b68691..1d094ee613 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1997-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1997-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
/*
@@ -34,17 +34,6 @@
#include <sys/uio.h>
#endif
-#ifdef _OSE_
-#include "efs.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#ifdef _OSE_SFK_
-#include <string.h>
-#endif
-#endif /* _OSE_ */
-
#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
#define DARWIN 1
#endif
@@ -88,23 +77,6 @@ extern STATUS copy(char *, char *);
* Macros for testing file types.
*/
-#ifdef _OSE_
-
-#define ISDIR(st) S_ISDIR(((st).st_mode))
-#define ISREG(st) S_ISREG(((st).st_mode))
-#define ISDEV(st) (S_ISCHR(((st).st_mode)) || S_ISBLK(((st).st_mode)))
-#define ISLNK(st) S_ISLNK(((st).st_mode))
-#ifdef NO_UMASK
-#define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
-#define DIR_MODE (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
-#else
-#define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
-#define DIR_MODE (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | \
- S_IWOTH | S_IXOTH)
-#endif
-
-#else /* !_OSE_ */
-
#define ISDIR(st) (((st).st_mode & S_IFMT) == S_IFDIR)
#define ISREG(st) (((st).st_mode & S_IFMT) == S_IFREG)
#define ISDEV(st) \
@@ -118,8 +90,6 @@ extern STATUS copy(char *, char *);
#define DIR_MODE 0777
#endif
-#endif /* _OSE_ */
-
#ifdef VXWORKS /* Currently only used on vxworks */
#define EF_ALLOC(S) driver_alloc((S))
@@ -361,15 +331,6 @@ path_size(char *pathname)
#endif /* VXWORKS */
-#ifdef _OSE_
-static int
-ose_enotsup(Efile_error *errInfo)
-{
- errInfo->posix_errno = errInfo->os_errno = ENOTSUP;
- return 0;
-}
-#endif /* _OSE_ */
-
int
efile_mkdir(Efile_error* errInfo, /* Where to return error codes. */
char* name) /* Name of directory to create. */
@@ -446,18 +407,12 @@ efile_delete_file(Efile_error* errInfo, /* Where to return error codes. */
char* name) /* Name of file to delete. */
{
CHECK_PATHLEN(name,errInfo);
-#ifdef _OSE_
- if (remove(name) == 0) {
- return 1;
- }
-#else
if (unlink(name) == 0) {
return 1;
}
if (errno == EISDIR) { /* Linux sets the wrong error code. */
errno = EPERM;
}
-#endif
return check_error(-1, errInfo);
}
@@ -524,7 +479,7 @@ efile_rename(Efile_error* errInfo, /* Where to return error codes. */
if (errno == ENOTEMPTY) {
errno = EEXIST;
}
-#if defined (sparc) && !defined(VXWORKS) && !defined(_OSE_)
+#if defined (sparc) && !defined(VXWORKS)
/*
* SunOS 4.1.4 reports overwriting a non-empty directory with a
* directory as EINVAL instead of EEXIST (first rule out the correct
@@ -855,7 +810,7 @@ efile_fileinfo(Efile_error* errInfo, Efile_info* pInfo,
CHECK_PATHLEN(name, errInfo);
if (info_for_link) {
-#if (defined(VXWORKS) || defined(_OSE_))
+#if (defined(VXWORKS))
result = stat(name, &statbuf);
#else
result = lstat(name, &statbuf);
@@ -939,11 +894,7 @@ efile_fileinfo(Efile_error* errInfo, Efile_info* pInfo,
pInfo->mode = statbuf.st_mode;
pInfo->links = statbuf.st_nlink;
pInfo->major_device = statbuf.st_dev;
-#ifdef _OSE_
- pInfo->minor_device = 0;
-#else
pInfo->minor_device = statbuf.st_rdev;
-#endif
pInfo->inode = statbuf.st_ino;
pInfo->uid = statbuf.st_uid;
pInfo->gid = statbuf.st_gid;
@@ -989,11 +940,9 @@ efile_write_info(Efile_error *errInfo, Efile_info *pInfo, char *name)
* you don't try to chown a file to someone besides youself.
*/
-#ifndef _OSE_
if (chown(name, pInfo->uid, pInfo->gid) && errno != EPERM) {
return check_error(-1, errInfo);
}
-#endif
if (pInfo->mode != -1) {
mode_t newMode = pInfo->mode & (S_ISUID | S_ISGID |
@@ -1008,8 +957,6 @@ efile_write_info(Efile_error *errInfo, Efile_info *pInfo, char *name)
#endif /* !VXWORKS */
-#ifndef _OSE_
-
if (pInfo->accessTime.year != -1 && pInfo->modifyTime.year != -1) {
struct utimbuf tval;
struct tm timebuf;
@@ -1041,7 +988,6 @@ efile_write_info(Efile_error *errInfo, Efile_info *pInfo, char *name)
return check_error(utime(name, &tval), errInfo);
#endif
}
-#endif /* !_OSE_ */
return 1;
}
@@ -1451,9 +1397,6 @@ efile_truncate_file(Efile_error* errInfo, int *fd, int flags)
int
efile_readlink(Efile_error* errInfo, char* name, char* buffer, size_t size)
{
-#ifdef _OSE_
- return ose_enotsup(errInfo);
-#else
#ifdef VXWORKS
return vxworks_enotsup(errInfo);
#else
@@ -1466,7 +1409,6 @@ efile_readlink(Efile_error* errInfo, char* name, char* buffer, size_t size)
buffer[len] = '\0';
return 1;
#endif
-#endif
}
int
@@ -1479,27 +1421,19 @@ efile_altname(Efile_error* errInfo, char* name, char* buffer, size_t size)
int
efile_link(Efile_error* errInfo, char* old, char* new)
{
-#ifdef _OSE_
- return ose_enotsup(errInfo);
-#else
#ifdef VXWORKS
return vxworks_enotsup(errInfo);
#else
return check_error(link(old, new), errInfo);
#endif
-#endif
}
int
efile_symlink(Efile_error* errInfo, char* old, char* new)
{
-#ifdef _OSE_
- return ose_enotsup(errInfo);
-#else
#ifdef VXWORKS
return vxworks_enotsup(errInfo);
#else
return check_error(symlink(old, new), errInfo);
#endif
-#endif
}