diff options
33 files changed, 143 insertions, 549 deletions
diff --git a/Makefile.in b/Makefile.in index 30aab6add1..ac2015f8e4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -357,13 +357,9 @@ all_bootstraps: emulator \ # binaries in your PATH instead of those created from the # pre-compiled Erlang modules under bootstrap/. # -ifeq ($(findstring ose,$(TARGET)),ose) -noboot: - $(MAKE) BOOT_PREFIX= emulator libs -else noboot: $(MAKE) BOOT_PREFIX= emulator libs local_setup -endif + noboot_install: $(MAKE) BOOT_PREFIX= install diff --git a/erts/configure.in b/erts/configure.in index e5202b75cb..a14b10adbf 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -2910,7 +2910,7 @@ case $enable_hybrid_heap-$host_os in no-*) AC_MSG_RESULT([no; disabled by user]) ERTS_BUILD_HYBRID_EMU=no;; - *-win32|*-vxworks|*-ose) # vxworks and ose have their own "configure scripts"... + *-win32|*-vxworks) # vxworks have their own "configure scripts"... AC_MSG_RESULT([no; default on this platform]) ERTS_BUILD_HYBRID_EMU=no;; *) diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in index a81ab28847..9f10a0ffaa 100644 --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in @@ -61,11 +61,7 @@ ifeq ($(TYPE),quantify) PURIFY = quantify $(QUANTIFY_BUILD_OPTIONS) TYPEMARKER = .quantify ENABLE_ALLOC_TYPE_VARS += quantify -ifeq ($(findstring ose,$(TARGET)),ose) - TYPE_FLAGS = @CFLAGS@ -DQUANTIFY -else TYPE_FLAGS = @CFLAGS@ -g -O2 -DQUANTIFY -DNO_JUMP_TABLE -endif else ifeq ($(TYPE),purecov) @@ -423,12 +419,6 @@ RELEASE_INCLUDES = beam/erl_driver.h sys/$(ERLANG_OSTYPE)/driver_int.h beam/erl_ ifeq ($(TARGET),win32) RELEASE_INCLUDES += sys/$(ERLANG_OSTYPE)/erl_win_dyn_driver.h endif -ifeq ($(findstring ose,$(TARGET)),ose) -RELEASE_INCLUDES += sys/$(ERLANG_OSTYPE)/erl_port_signals.sig \ - sys/$(ERLANG_OSTYPE)/ose_erl_port_prog.h \ - drivers/$(ERLANG_OSTYPE)/ose_erl_driver.h - -endif ifeq ($(TYPE)-@HAVE_VALGRIND@,valgrind-no) release_spec: @@ -480,8 +470,6 @@ endif ifeq ($(findstring vxworks,$(TARGET)),vxworks) else -ifeq ($(findstring ose,$(TARGET)),ose) -else ifdef HIPE_ENABLED GENERATE += $(TTF_DIR)/hipe_x86_asm.h \ $(TTF_DIR)/hipe_amd64_asm.h \ @@ -492,7 +480,6 @@ GENERATE += $(TTF_DIR)/hipe_x86_asm.h \ $(BINDIR)/hipe_mkliterals$(TF_MARKER) endif endif -endif ifeq ($(FLAVOR)-@ERTS_BUILD_SMP_EMU@,smp-no) GENERATE= @@ -592,7 +579,6 @@ ifeq ($(findstring vxworks,$(TARGET)),vxworks) INCLUDES += -I$(ERL_TOP)/erts/etc/vxworks endif -ifneq ($(findstring ose,$(TARGET)),ose) ifeq ($(TARGET),win32) # Usually the same as the default rule, but certain platforms (i.e. win32) mix # different compilers @@ -618,33 +604,6 @@ endif $(OBJDIR)/%.o: beam/%.c $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ -else - -INCLUDES += -Idrivers/ose - -ifeq ($(TYPE),debug) -$(OBJDIR)/%.o: beam/%.c - $(CC) $(CFLAGS) -DNO_JUMP_TABLE $(INCLUDES) -c $< -o $@ -else - -VXCC=@VXCC@ -VXCFLAGS=@VXCFLAGS@ -CFLAGS_NOOPT=@CFLAGS_NOOPT@ @DEFS@ $(WFLAGS) $(THR_DEFS) $(ARCHCFLAGS) - -# we want to use jump table -$(OBJDIR)/beam_emu.o: beam/beam_emu.c - $(VXCC) $(VXCFLAGS) $(INCLUDES) -c $< -o $@ - -# erl_process does not work properly with DIAB's -XO option, -# we'll compile it with gcc instead -$(OBJDIR)/erl_process.o: beam/erl_process.c - $(VXCC) $(VXCFLAGS) $(INCLUDES) -c $< -o $@ - -$(OBJDIR)/%.o: beam/%.c - $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ -endif -endif - $(OBJDIR)/%.o: $(TARGET)/%.c $(CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ @@ -663,15 +622,11 @@ $(OBJDIR)/%.o: drivers/common/%.c $(OBJDIR)/%.o: drivers/$(ERLANG_OSTYPE)/%.c $(CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -Idrivers/$(ERLANG_OSTYPE) -I../etc/$(ERLANG_OSTYPE) -c $< -o $@ -# VxWorks and OSE uses unix drivers too... +# VxWorks uses unix drivers too... ifeq ($(findstring vxworks,$(TARGET)),vxworks) $(OBJDIR)/%.o: drivers/unix/%.c $(CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ endif -ifeq ($(findstring ose,$(TARGET)),ose) -$(OBJDIR)/%.o: drivers/unix/%.c - $(CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ -endif # ---------------------------------------------------------------------- # Specials @@ -810,18 +765,12 @@ OS_OBJS = \ $(OBJDIR)/elib_malloc.o \ $(OBJDIR)/elib_memmove.o -ifeq ($(findstring ose,$(TARGET)),ose) - OS_OBJS += $(OBJDIR)/erl_port_init.o \ - $(OBJDIR)/ose_inet_sock_select.o \ - $(OBJDIR)/ose_sfp.o -else ifeq ($(findstring vxworks,$(TARGET)),vxworks) OS_OBJS += $(OBJDIR)/int64.o else OS_OBJS += $(OBJDIR)/sys_float.o \ $(OBJDIR)/sys_time.o endif -endif DRV_OBJS = \ $(OBJDIR)/efile_drv.o \ $(OBJDIR)/inet_drv.o \ @@ -830,11 +779,7 @@ DRV_OBJS = \ endif ifneq ($(findstring vxworks,$(TARGET)),vxworks) - ifeq ($(findstring ose,$(TARGET)),ose) - DRV_OBJS += $(OBJDIR)/ose_inet_drv.o - else DRV_OBJS += $(OBJDIR)/ttsl_drv.o - endif endif ifeq ($(ERTS_ENABLE_KERNEL_POLL),yes) @@ -968,33 +913,6 @@ $(TARGET)/int64.c: endif -ifeq ($(findstring ose,$(TARGET)),ose) -# Extract soft float functions from libgcc.a (for beam_emu) -VXCC=@VXCC@ -VXCFLAGS=@VXCFLAGS@ -VXLD=@VXLD@ -VXLDFLAGS=@VXLDFLAGS@ -VXCCLIBFLAGS=@VXCCLIBFLAGS@ -STRIP=@STRIP@ -SYMPREFIX=@SYMPREFIX@ - -NEEDFUNCTIONS=__floatsidf __adddf3 __negdf2 __muldf3 __divdf3 __subdf3 -KEEPSYMS=$(NEEDFUNCTIONS:%=-K $(SYMPREFIX)%) - -$(OBJDIR)/ose_sfp.o: $(TARGET)/ose_sfp.c - $(VXCC) $(VXCFLAGS) -o $(OBJDIR)/ose_sfp_tmp.o -c $(TARGET)/ose_sfp.c - $(VXLD) -o $(OBJDIR)/ose_sfp.o $(OBJDIR)/ose_sfp_tmp.o $(VXLDFLAGS) $(VXCCLIBFLAGS) - $(STRIP) $(KEEPSYMS) $(OBJDIR)/ose_sfp.o - -$(TARGET)/ose_sfp.c: - echo 'void dummy(void); void dummy(void) {' > $(TARGET)/ose_sfp.c - for x in $(NEEDFUNCTIONS); do echo 'extern void '$$x'();' \ - >> $(TARGET)/ose_sfp.c; done - for x in $(NEEDFUNCTIONS); do echo $$x'();' >> $(TARGET)/ose_sfp.c; done - echo '}' >> $(TARGET)/ose_sfp.c - -endif - # ---------------------------------------------------------------------- # The emulator itself diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index b21fd3038f..5b2f032afc 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -1003,14 +1003,14 @@ static BeamInstr* call_fun(Process* p, int arity, Eterm* reg, Eterm args); static BeamInstr* apply_fun(Process* p, Eterm fun, Eterm args, Eterm* reg); static Eterm new_fun(Process* p, Eterm* reg, ErlFunEntry* fe, int num_free); -#if defined(_OSE_) || defined(VXWORKS) +#if defined(VXWORKS) static int init_done; #endif void init_emulator(void) { -#if defined(_OSE_) || defined(VXWORKS) +#if defined(VXWORKS) init_done = 0; #endif process_main(); @@ -1049,7 +1049,7 @@ init_emulator(void) */ void process_main(void) { -#if !defined(_OSE_) && !defined(VXWORKS) +#if !defined(VXWORKS) static int init_done = 0; #endif Process* c_p = NULL; diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c index dbe864f941..5cb1481a3a 100644 --- a/erts/emulator/beam/break.c +++ b/erts/emulator/beam/break.c @@ -38,10 +38,6 @@ #include "erl_instrument.h" #include "erl_bif_timer.h" -#ifdef _OSE_ -#include "time.h" -#endif - /* Forward declarations -- should really appear somewhere else */ static void process_killer(void); void do_break(void); diff --git a/erts/emulator/beam/erl_bif_port.c b/erts/emulator/beam/erl_bif_port.c index 2ba9dc00b7..9b56ddd4f8 100644 --- a/erts/emulator/beam/erl_bif_port.c +++ b/erts/emulator/beam/erl_bif_port.c @@ -21,10 +21,6 @@ # include "config.h" #endif -#ifdef _OSE_ -# include "ose.h" -#endif - #include <ctype.h> #define ERTS_WANT_EXTERNAL_TAGS diff --git a/erts/emulator/beam/erl_debug.c b/erts/emulator/beam/erl_debug.c index 9c7a47da0a..58d3f92f56 100644 --- a/erts/emulator/beam/erl_debug.c +++ b/erts/emulator/beam/erl_debug.c @@ -207,11 +207,7 @@ pdisplay1(int to, void *to_arg, Process* p, Eterm obj) case FLOAT_DEF: { FloatDef ff; GET_DOUBLE(obj, ff); -#ifdef _OSE_ - erts_print(to, to_arg, "%e", ff.fd); -#else erts_print(to, to_arg, "%.20e", ff.fd); -#endif } break; case BINARY_DEF: diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index 41cfcd74aa..e63ec8a3cc 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -292,9 +292,6 @@ erl_init(void) #ifdef HIPE hipe_mode_switch_init(); /* Must be after init_load/beam_catches/init */ #endif -#ifdef _OSE_ - erl_sys_init_final(); -#endif packet_parser_init(); erl_nif_init(); } @@ -1453,13 +1450,7 @@ __decl_noreturn void erl_exit0(char *file, int line, int n, char *fmt,...) if (fmt != NULL && *fmt != '\0') erl_error(fmt, args); /* Print error message. */ va_end(args); -#ifdef __WIN32__ - if(n > 0) ConWaitForExit(); - else ConNormalExit(); -#endif -#if !defined(__WIN32__) && !defined(VXWORKS) && !defined(_OSE_) - sys_tty_reset(); -#endif + sys_tty_reset(n); if (n == ERTS_INTR_EXIT) exit(0); @@ -1499,13 +1490,7 @@ __decl_noreturn void erl_exit(int n, char *fmt,...) if (fmt != NULL && *fmt != '\0') erl_error(fmt, args); /* Print error message. */ va_end(args); -#ifdef __WIN32__ - if(n > 0) ConWaitForExit(); - else ConNormalExit(); -#endif -#if !defined(__WIN32__) && !defined(VXWORKS) && !defined(_OSE_) - sys_tty_reset(); -#endif + sys_tty_reset(n); if (n == ERTS_INTR_EXIT) exit(0); diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h index a86bcb80dd..a1955235b7 100644 --- a/erts/emulator/beam/sys.h +++ b/erts/emulator/beam/sys.h @@ -58,8 +58,6 @@ # include "erl_win_sys.h" #elif defined (VXWORKS) # include "erl_vxworks_sys.h" -#elif defined (_OSE_) -# include "erl_ose_sys.h" #else # include "erl_unix_sys.h" #ifndef UNIX @@ -458,13 +456,6 @@ extern volatile int erts_writing_erl_crash_dump; in non-blocking mode - and ioctl FIONBIO on AIX *doesn't* work for pipes or ttys (O_NONBLOCK does)!!! For now, we'll use FIONBIO for AIX. */ -# ifdef _OSE_ -static const int zero_value = 0, one_value = 1; -# define SET_BLOCKING(fd) ioctl((fd), FIONBIO, (char*)&zero_value) -# define SET_NONBLOCKING(fd) ioctl((fd), FIONBIO, (char*)&one_value) -# define ERRNO_BLOCK EWOULDBLOCK -# else - # ifdef __WIN32__ static unsigned long zero_value = 0, one_value = 1; @@ -505,7 +496,6 @@ static const int zero_value = 0, one_value = 1; # endif /* !NB_FIONBIO */ # endif /* _WXWORKS_ */ # endif /* !__WIN32__ */ -# endif /* _OSE_ */ #endif /* WANT_NONBLOCKING */ extern erts_cpu_info_t *erts_cpuinfo; /* erl_init.c */ @@ -583,8 +573,6 @@ typedef struct preload { * None of the drivers use all of the fields. */ -/* OSE: Want process_type and priority in here as well! Needs updates in erl_bif_ports.c! */ - typedef struct _SysDriverOpts { int ifd; /* Input file descriptor (fd driver). */ int ofd; /* Outputfile descriptor (fd driver). */ @@ -601,12 +589,6 @@ typedef struct _SysDriverOpts { char *wd; /* Working directory. */ unsigned spawn_type; /* Bitfield of ERTS_SPAWN_DRIVER | ERTS_SPAWN_EXTERNAL | both*/ - -#ifdef _OSE_ - enum PROCESS_TYPE process_type; - OSPRIORITY priority; -#endif /* _OSE_ */ - } SysDriverOpts; extern char *erts_default_arg0; @@ -683,11 +665,7 @@ extern void erts_sys_pre_init(void); extern void erl_sys_init(void); extern void erl_sys_args(int *argc, char **argv); extern void erl_sys_schedule(int); -#ifdef _OSE_ -extern void erl_sys_init_final(void); -#else -void sys_tty_reset(void); -#endif +void sys_tty_reset(int); EXTERN_FUNCTION(int, sys_max_files, (_VOID_)); void sys_init_io(void); @@ -1152,7 +1130,7 @@ extern int erts_use_kernel_poll; void elib_ensure_initialized(void); -#if (defined(VXWORKS) || defined(_OSE_)) +#if defined(VXWORKS) /* NOTE! sys_calloc2 does not exist on other platforms than VxWorks and OSE */ EXTERN_FUNCTION(void*, sys_calloc2, (Uint, Uint)); 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 } diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c index 31ab5d03de..267f7d07aa 100644 --- a/erts/emulator/sys/unix/sys.c +++ b/erts/emulator/sys/unix/sys.c @@ -367,7 +367,7 @@ erts_sys_misc_mem_sz(void) /* * reset the terminal to the original settings on exit */ -void sys_tty_reset(void) +void sys_tty_reset(int exit_code) { if (using_oldshell && !replace_intr) { SET_BLOCKING(0); diff --git a/erts/emulator/sys/vxworks/sys.c b/erts/emulator/sys/vxworks/sys.c index abddc7e107..411b4b37cf 100644 --- a/erts/emulator/sys/vxworks/sys.c +++ b/erts/emulator/sys/vxworks/sys.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% */ /* @@ -143,6 +143,14 @@ volatile int erts_break_requested; /********************* General functions ****************************/ +/* + * Reset the terminal to the original settings on exit + * (nothing to do for WxWorks). + */ +void sys_tty_reset(int exit_code) +{ +} + Uint erts_sys_misc_mem_sz(void) { diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c index 3194493ac8..46dee826f0 100644 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -1,19 +1,19 @@ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 1996-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 1996-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% */ /* @@ -187,6 +187,17 @@ erts_sys_misc_mem_sz(void) return res; } +/* + * Reset the terminal to the original settings on exit + */ +void sys_tty_reset(int exit_code) +{ + if (exit_code > 0) + ConWaitForExit(); + else + ConNormalExit(); +} + void erl_sys_args(int* argc, char** argv) { char *event_name; diff --git a/erts/emulator/test/driver_SUITE_data/chkio_drv.c b/erts/emulator/test/driver_SUITE_data/chkio_drv.c index 9e1e5e72c2..b571cb30e6 100644 --- a/erts/emulator/test/driver_SUITE_data/chkio_drv.c +++ b/erts/emulator/test/driver_SUITE_data/chkio_drv.c @@ -17,7 +17,7 @@ */ #ifndef UNIX -#if !defined(__WIN32__) && !defined(_OSE_) && !defined(VXWORKS) +#if !defined(__WIN32__) && !defined(VXWORKS) #define UNIX 1 #endif #endif diff --git a/erts/emulator/test/driver_SUITE_data/io_ready_exit_drv.c b/erts/emulator/test/driver_SUITE_data/io_ready_exit_drv.c index 25d4b17001..6afa46b3a2 100644 --- a/erts/emulator/test/driver_SUITE_data/io_ready_exit_drv.c +++ b/erts/emulator/test/driver_SUITE_data/io_ready_exit_drv.c @@ -17,7 +17,7 @@ */ #ifndef UNIX -#if !defined(__WIN32__) && !defined(_OSE_) && !defined(VXWORKS) +#if !defined(__WIN32__) && !defined(VXWORKS) #define UNIX 1 #endif #endif diff --git a/erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c b/erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c index c7a42aa687..e49de388b4 100644 --- a/erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c +++ b/erts/emulator/test/driver_SUITE_data/ioq_exit_drv.c @@ -29,7 +29,7 @@ */ #ifndef UNIX -#if !defined(__WIN32__) && !defined(_OSE_) && !defined(VXWORKS) +#if !defined(__WIN32__) && !defined(VXWORKS) #define UNIX 1 #endif #endif diff --git a/erts/emulator/test/driver_SUITE_data/missing_callback_drv.c b/erts/emulator/test/driver_SUITE_data/missing_callback_drv.c index c80e492e3f..e7d9a294fa 100644 --- a/erts/emulator/test/driver_SUITE_data/missing_callback_drv.c +++ b/erts/emulator/test/driver_SUITE_data/missing_callback_drv.c @@ -17,7 +17,7 @@ */ #ifndef UNIX -#if !defined(__WIN32__) && !defined(_OSE_) && !defined(VXWORKS) +#if !defined(__WIN32__) && !defined(VXWORKS) #define UNIX 1 #endif #endif diff --git a/erts/emulator/test/driver_SUITE_data/peek_non_existing_queue_drv.c b/erts/emulator/test/driver_SUITE_data/peek_non_existing_queue_drv.c index 2ac86b1ec2..ac86211c82 100644 --- a/erts/emulator/test/driver_SUITE_data/peek_non_existing_queue_drv.c +++ b/erts/emulator/test/driver_SUITE_data/peek_non_existing_queue_drv.c @@ -28,7 +28,7 @@ */ #ifndef UNIX -#if !defined(__WIN32__) && !defined(_OSE_) && !defined(VXWORKS) +#if !defined(__WIN32__) && !defined(VXWORKS) #define UNIX 1 #endif #endif diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c index 23ac421446..c509c49b39 100644 --- a/erts/epmd/src/epmd.c +++ b/erts/epmd/src/epmd.c @@ -1,20 +1,20 @@ /* -*- c-indent-level: 2; c-continued-statement-offset: 2 -*- */ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 1998-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 1998-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% */ @@ -24,11 +24,6 @@ #include "epmd.h" /* Renamed from 'epmd_r4.h' */ #include "epmd_int.h" -#ifdef _OSE_ -# include "ose.h" -# include "efs.h" -#endif - #ifdef HAVE_STDLIB_H # include <stdlib.h> #endif @@ -82,86 +77,7 @@ static char *mystrdup(char *s) return r; } -#ifdef _OSE_ - -struct args_sig { - SIGSELECT sig_no; - int argc ; - char argv[20][20]; -}; - -union SIGNAL { - SIGSELECT sig_no; - struct args_sig args; -}; - -/* Start function. It may be called from the start script as well as from - the OSE shell directly (using late start hooks). It spawns epmd as an - OSE process which calls the epmd main function. */ -int start_ose_epmd(int argc, char **argv) { - union SIGNAL *sig; - PROCESS epmd_; - OSENTRYPOINT ose_epmd; - int i; - - if(hunt("epmd", 0, &epmd_, NULL)) { - fprintf(stderr, "Warning! EPMD already exists (%u).\n", epmd_); - return 0; - } - else { - /* copy start args to signal */ - sig = alloc(sizeof(struct args_sig), 0); - sig->args.argc = argc; - for(i=0; i<argc; i++) { - strcpy((sig->args.argv)[i], argv[i]); - } - /* start epmd and send signal */ - epmd_ = create_process(OS_BG_PROC, /* processtype */ - "epmd", /* name */ - ose_epmd, /* entrypoint */ - 16383, /* stacksize */ - 20, /* priority */ - 0, /* timeslice */ - 0, /* block */ - NULL,0,0); /* not used */ - efs_clone(epmd_); - start(epmd_); - send(&sig, epmd_); -#ifdef DEBUG - printf("EPMD ID: %li\n", epmd_); -#endif - } - return 0; -} - -OS_PROCESS(ose_epmd) { - union SIGNAL *sig; - static const SIGSELECT rec_any_sig[] = { 0 }; - int i, argc; - char **argv; - - sig = receive((SIGSELECT*)rec_any_sig); - - argc = sig->args.argc; - argv = (char **)malloc((argc+1)*sizeof(char *)); - for(i=0; i<argc; i++) { - argv[i] = (char *)malloc(strlen((sig->args.argv)[i])+1); - strcpy(argv[i], (sig->args.argv)[i]); - } - argv[argc] = NULL; - free_buf(&sig); - - epmd(argc, argv); - - for(i=0; i<argc; i++) { - free(argv[i]); - } - free(argv); -} - -#else /* ifdef _OSE_ */ - -/* VxWorks start function */ +#ifdef VXWORKS int start_epmd(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) char *a0, *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9; { @@ -200,10 +116,7 @@ char *a0, *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9; argc,(int) argv,1, 0,0,0,0,0,0,0); } - -#endif /* _OSE_ */ - - +#endif /* WxWorks */ int epmd(int argc, char **argv) @@ -453,7 +366,7 @@ static void run_daemon(EpmdVars *g) } #endif -#if (defined(VXWORKS) || defined(_OSE_)) +#if defined(VXWORKS) static void run_daemon(EpmdVars *g) { run(g); diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h index 0e432e2cb0..84578c72f8 100644 --- a/erts/epmd/src/epmd_int.h +++ b/erts/epmd/src/epmd_int.h @@ -37,19 +37,6 @@ #define DONT_USE_MAIN #endif -#ifdef _OSE_ -#define NO_SYSLOG -#define NO_SYSCONF -#define NO_DAEMON -#define DONT_USE_MAIN -#ifndef HAVE_SYS_TIME_H -#define HAVE_SYS_TIME_H -#endif -#ifndef HAVE_UNISTD_H -#define HAVE_UNISTD_H -#endif -#endif - /* ************************************************************************ */ /* Standard includes */ @@ -92,7 +79,7 @@ #endif #endif /* ! VXWORKS */ -#if (!defined(__WIN32__) && !defined(_OSE_)) +#if !defined(__WIN32__) # include <netinet/in.h> # include <sys/socket.h> # include <sys/stat.h> @@ -105,10 +92,8 @@ # include <netinet/tcp.h> #endif /* ! WIN32 */ -#ifndef _OSE_ #include <ctype.h> #include <signal.h> -#endif #include <errno.h> @@ -126,13 +111,6 @@ #include <stdarg.h> -#ifdef _OSE_ -# include "ose.h" -# include "inet.h" -# include "sys/stat.h" -#endif - - /* ************************************************************************ */ /* Replace some functions by others by making the function name a macro */ @@ -148,10 +126,6 @@ #define sleep(n) taskDelay((n) * sysClkRateGet()) #endif /* VXWORKS */ -#ifdef _OSE_ -#define sleep(n) delay((n)) -#endif - #ifdef USE_BCOPY # define memcpy(a, b, c) bcopy((b), (a), (c)) # define memcmp(a, b, c) bcmp((a), (b), (c)) diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c index a033fab244..021f8207eb 100644 --- a/erts/epmd/src/epmd_srv.c +++ b/erts/epmd/src/epmd_srv.c @@ -138,7 +138,7 @@ void run(EpmdVars *g) * because addresses will be reused even if they are still in use. */ -#if (!defined(__WIN32__) && !defined(_OSE_)) +#if !defined(__WIN32__) /* We ignore the SIGPIPE signal that is raised when we call write twice on a socket closed by the other end. */ signal(SIGPIPE, SIG_IGN); @@ -156,10 +156,6 @@ void run(EpmdVars *g) accept function is called. We set the listen socket to be non blocking to prevent us from being hanging in accept() waiting for the next request. */ -#ifdef _OSE_ - opt = 1; - if (ioctl(listensock, FIONBIO, (char*)&opt) != 0) -#else #if (defined(__WIN32__) || defined(NO_FCNTL)) opt = 1; if (ioctl(listensock, FIONBIO, &opt) != 0) /* Gives warning in VxWorks */ @@ -167,7 +163,6 @@ void run(EpmdVars *g) opt = fcntl(listensock, F_GETFL, 0); if (fcntl(listensock, F_SETFL, opt | O_NONBLOCK) == -1) #endif /* __WIN32__ || VXWORKS */ -#endif /* _OSE_ */ dbg_perror(g,"failed to set non-blocking mode of listening socket %d", listensock); @@ -176,18 +171,6 @@ void run(EpmdVars *g) SET_ADDR_ANY(iserv_addr, FAMILY, sport); } -#ifdef _OSE_ - { - int optlen = sizeof(opt); - opt = 1; - if(getsockopt(listensock, SOL_SOCKET, SO_REUSEADDR, - (void*)&opt, &optlen) < 0) - fprintf(stderr, "\n\nGETSOCKOPT FAILS! %d\n\n", errno); - else if(opt == 1) - fprintf(stderr, "SO_REUSEADDR is set!\n"); - } -#endif - if(bind(listensock,(struct sockaddr*) &iserv_addr, sizeof(iserv_addr)) < 0 ) { if (errno == EADDRINUSE) diff --git a/erts/test/erlexec_SUITE_data/erlexec_tests.c b/erts/test/erlexec_SUITE_data/erlexec_tests.c index a49a0b21a8..1d1ca881d9 100644 --- a/erts/test/erlexec_SUITE_data/erlexec_tests.c +++ b/erts/test/erlexec_SUITE_data/erlexec_tests.c @@ -1,19 +1,19 @@ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 2008-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 2008-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% */ /* Used by test case otp_7461 to spawn a child process with a given @@ -22,7 +22,7 @@ * Author: Sverker Eriksson */ -#if defined (__WIN32__) || defined(VXWORKS) || defined(_OSE_) +#if defined (__WIN32__) || defined(VXWORKS) int main() {return 0;} #else /* UNIX only */ diff --git a/lib/erl_interface/test/ei_tmo_SUITE_data/ei_tmo_test.c b/lib/erl_interface/test/ei_tmo_SUITE_data/ei_tmo_test.c index 2cc9af975d..db90b1810e 100644 --- a/lib/erl_interface/test/ei_tmo_SUITE_data/ei_tmo_test.c +++ b/lib/erl_interface/test/ei_tmo_SUITE_data/ei_tmo_test.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% */ @@ -65,7 +65,7 @@ static void debugf_open(int number) { char filename[1024]; sprintf(filename,"ei_tmo_test%d.debug",number); -#if !defined(VXWORKS) && !defined(__WIN32__) && !defined(_OSE_) +#if !defined(VXWORKS) && !defined(__WIN32__) close(2); #endif debugfile = fopen(filename,"a"); diff --git a/lib/kernel/test/inet_sockopt_SUITE_data/sockopt_helper.c b/lib/kernel/test/inet_sockopt_SUITE_data/sockopt_helper.c index fb3c622909..f24c93edf5 100644 --- a/lib/kernel/test/inet_sockopt_SUITE_data/sockopt_helper.c +++ b/lib/kernel/test/inet_sockopt_SUITE_data/sockopt_helper.c @@ -1,4 +1,4 @@ -#if defined(VXWORKS) || defined(__OSE__) +#if defined(VXWORKS) #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/lib/test_server/doc/src/test_server_ctrl.xml b/lib/test_server/doc/src/test_server_ctrl.xml index 4a778bcaf7..8b60849b61 100644 --- a/lib/test_server/doc/src/test_server_ctrl.xml +++ b/lib/test_server/doc/src/test_server_ctrl.xml @@ -538,9 +538,6 @@ Optional, if not given the test server controller node test server controller node. The log must be formatted using <c>ttb:format/1/2</c>. </p> - <p>This is valid for all targets except the OSE/Delta target - for which all nodes will be logged and automatically formatted - in one single text file called <c>allnodes-test_server</c>.</p> </desc> </func> <func> diff --git a/lib/test_server/doc/src/ts.xml b/lib/test_server/doc/src/ts.xml index 0f91d3eea2..f60c79aadd 100644 --- a/lib/test_server/doc/src/ts.xml +++ b/lib/test_server/doc/src/ts.xml @@ -250,7 +250,7 @@ running test suites. If a remote host is to be used, the <c>TargetSystem</c> argument must be given so that "cross installation" can be done. This should be used for testing on - VxWorks or OSE/Delta. Installation is required for any of the + VxWorks. Installation is required for any of the functions in <c>ts</c> to work. </p> <p>Opts may be one or more of @@ -275,7 +275,7 @@ strings. </item> <item><c>{slavetargets, SlaveTarges}</c><br></br> - For VxWorks and OSE/Delta only. This is a list of + For VxWorks only. This is a list of available hosts where slave nodes can be started. This is necessary because only one node can run per host in the VxWorks environment. This is not the same as diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl index f918f47415..7db103a4c6 100644 --- a/lib/test_server/src/test_server.erl +++ b/lib/test_server/src/test_server.erl @@ -1763,7 +1763,7 @@ call_crash(Time,Crash,M,F,A) -> %% Slave and Peer: %% {remote, true} - Start the node on a remote host. If not specified, %% the node will be started on the local host (with -%% some exceptions, as for the case of VxWorks and OSE, +%% some exceptions, for instance VxWorks, %% where all nodes are started on a remote host). %% {args, Arguments} - Arguments passed directly to the node. %% {cleanup, false} - Nodes started with this option will not be killed @@ -2014,14 +2014,8 @@ temp_name(Stem) -> app_test(App) -> app_test(App, pedantic). app_test(App, Mode) -> - case os:type() of - {ose,_} -> - Comment = "Skipping app_test on OSE", - comment(Comment), % in case user ignores the return value - {skip,Comment}; - _other -> - test_server_sup:app_test(App, Mode) - end. + test_server_sup:app_test(App, Mode). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/test_server/src/test_server_internal.hrl b/lib/test_server/src/test_server_internal.hrl index 6fa5ef75b1..c9c52854e3 100644 --- a/lib/test_server/src/test_server_internal.hrl +++ b/lib/test_server/src/test_server_internal.hrl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2002-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 2002-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% %% @@ -37,7 +37,7 @@ username, % string() cookie, % string(); Cookie for target node naming, % string(); "-name" | "-sname" - master, % string(); For OSE this is the master + master, % string(); Was used for OSE's master % node for main target and slave nodes. % For other platforms the target node % itself is master for slave nodes diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl index 1b750c3858..e23b891392 100644 --- a/lib/test_server/src/ts.erl +++ b/lib/test_server/src/ts.erl @@ -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% %% @@ -112,7 +112,7 @@ " Mandatory for remote targets\n" " {master, {MasterHost, MasterCookie}}\n" " - Master host and cookie for targets which are\n" - " started as slave nodes (i.e. OSE/Delta targets\n" + " started as slave nodes.\n" " erl_boot_server must be started on master before\n" " test is run.\n" " Optional, default is controller host and then\n" diff --git a/lib/test_server/src/ts_erl_config.erl b/lib/test_server/src/ts_erl_config.erl index 4fc46fc5d6..5cdbf0fbb8 100644 --- a/lib/test_server/src/ts_erl_config.erl +++ b/lib/test_server/src/ts_erl_config.erl @@ -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% %% @@ -161,7 +161,6 @@ system_include(Root, Vars) -> case ts_lib:var(os, Vars) of "Windows" ++ _T -> "sys/win32"; "VxWorks" -> "sys.vxworks"; - "OSE" -> "sys/ose"; _ -> "sys/unix" end, " -I" ++ filename:nativename(filename:join([Root, "erts", "emulator", SysDir])). @@ -219,7 +218,7 @@ erl_interface(Vars,OsType) -> {unix,_} -> "-lpthread"; _ -> - "" % VxWorks or OSE + "" % VxWorks end, CrossCompile = case OsType of vxworks -> "true"; diff --git a/lib/test_server/src/ts_run.erl b/lib/test_server/src/ts_run.erl index 1d611f501c..888ac98973 100644 --- a/lib/test_server/src/ts_run.erl +++ b/lib/test_server/src/ts_run.erl @@ -198,8 +198,6 @@ get_spec_filename_1(Vars, TestDir, File) -> case ts_lib:var(os, Vars) of "VxWorks" -> check_spec_filename(TestDir, File, ".spec.vxworks"); - "OSE" -> - check_spec_filename(TestDir, File, ".spec.ose"); "Windows"++_ -> check_spec_filename(TestDir, File, ".spec.win"); _Other -> @@ -306,53 +304,36 @@ make_make(Vars, Spec, State) -> add_make_testcase(Vars, Spec, St) -> Makefile = St#state.makefile, Dir = filename:dirname(Makefile), - case ts_lib:var(os, Vars) of - "OSE" -> - %% For OSE, C code in datadir must be linked in the image file, - %% and erlang code is sent as binaries from test_server_ctrl - %% Making erlang code here because the Makefile.src probably won't - %% work. - Erl_flags=[{i, "../../test_server"}|ts_lib:var(erl_flags,Vars)], - {ok, Cwd} = file:get_cwd(), - ok = file:set_cwd(Dir), - Result = (catch make:all(Erl_flags)), - ok = file:set_cwd(Cwd), - case Result of - up_to_date -> {ok, Vars, Spec, St}; - _error -> {error, {erlang_make_failed,Dir}} - end; + Shortname = filename:basename(Makefile), + Suite = filename:basename(Dir, "_data"), + Config = [{data_dir,Dir},{makefile,Shortname}], + MakeModule = Suite ++ "_make", + MakeModuleSrc = filename:join(filename:dirname(Dir), + MakeModule ++ ".erl"), + MakeMod = list_to_atom(MakeModule), + case filelib:is_file(MakeModuleSrc) of + true -> ok; + false -> generate_make_module(ts_lib:var(make_command, Vars), + MakeModuleSrc, + MakeModule) + end, + case Suite of + "all_SUITE" -> + {ok,Vars,Spec,St#state{all={MakeMod,Config}}}; _ -> - Shortname = filename:basename(Makefile), - Suite = filename:basename(Dir, "_data"), - Config = [{data_dir,Dir},{makefile,Shortname}], - MakeModule = Suite ++ "_make", - MakeModuleSrc = filename:join(filename:dirname(Dir), - MakeModule ++ ".erl"), - MakeMod = list_to_atom(MakeModule), - case filelib:is_file(MakeModuleSrc) of - true -> ok; - false -> generate_make_module(ts_lib:var(make_command, Vars), - MakeModuleSrc, - MakeModule) - end, - case Suite of - "all_SUITE" -> - {ok,Vars,Spec,St#state{all={MakeMod,Config}}}; - _ -> - %% Avoid duplicates of testcases. There is no longer - %% a check for this in test_server_ctrl. - TestCase = {list_to_atom(Suite),all}, - TopCase0 = case St#state.topcase of - List when is_list(List) -> - List -- [TestCase]; - Top -> - [Top] -- [TestCase] - end, - TopCase = [{make,{MakeMod,make,[Config]}, - TestCase, - {MakeMod,unmake,[Config]}}|TopCase0], - {ok,Vars,Spec,St#state{topcase=TopCase}} - end + %% Avoid duplicates of testcases. There is no longer + %% a check for this in test_server_ctrl. + TestCase = {list_to_atom(Suite),all}, + TopCase0 = case St#state.topcase of + List when is_list(List) -> + List -- [TestCase]; + Top -> + [Top] -- [TestCase] + end, + TopCase = [{make,{MakeMod,make,[Config]}, + TestCase, + {MakeMod,unmake,[Config]}}|TopCase0], + {ok,Vars,Spec,St#state{topcase=TopCase}} end. generate_make_module(MakeCmd, Name, ModuleString) -> @@ -629,9 +610,6 @@ make_test_server_args(Args0,Options,Vars) -> "VxWorks" -> F = write_parameterfile(vxworks,Vars), " PARAMETERS " ++ F; - "OSE" -> - F = write_parameterfile(ose,Vars), - " PARAMETERS " ++ F; _ -> "" end, |