Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
5021-vxworks-remove-remaining-traces.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5021-vxworks-remove-remaining-traces.patch of Package erlang
From 16ce112924c897a52bac743b683137f5b5dd19e7 Mon Sep 17 00:00:00 2001 From: Maxim Fedorov <maximfca@gmail.com> Date: Tue, 16 Nov 2021 09:46:00 -0800 Subject: [PATCH] vxworks: remove remaining traces Erlang/OTP no longer support VxWorks. Cleanup mentions to avoid confusion. --- HOWTO/INSTALL-CROSS.md | 4 +- HOWTO/INSTALL-WIN32-OLD.md | 2 +- HOWTO/INSTALL-WIN32.md | 2 +- erts/doc/src/inet_cfg.xml | 2 +- erts/emulator/beam/erl_init.c | 6 - erts/emulator/beam/erl_lock_check.c | 3 - erts/emulator/nifs/common/prim_file_nif.h | 2 +- erts/emulator/nifs/unix/unix_prim_file.c | 6 +- erts/epmd/test/epmd.spec.vxworks | 2 - erts/etc/common/heart.c | 2 +- lib/common_test/src/test_server.erl | 4 +- lib/common_test/test_server/ts.hrl | 4 +- lib/erl_interface/configure.ac | 2 - lib/erl_interface/doc/src/ei_users_guide.xml | 2 +- lib/erl_interface/src/README.internal | 4 - lib/erl_interface/src/connect/eirecv.c | 2 +- lib/erl_interface/src/connect/send_exit.c | 2 +- .../test/all_SUITE_data/reclaim.h | 152 ------------------ .../doc/src/jinterface_users_guide.xml | 2 +- .../test/jinterface_SUITE_data/Makefile.src | 3 - .../test/nc_SUITE_data/Makefile.src | 3 - lib/kernel/test/disk_log_SUITE.erl | 8 - lib/stdlib/doc/src/filename.xml | 2 +- 23 files changed, 14 insertions(+), 207 deletions(-) delete mode 100644 erts/epmd/test/epmd.spec.vxworks delete mode 100644 lib/erl_interface/test/all_SUITE_data/reclaim.h diff --git a/HOWTO/INSTALL-CROSS.md b/HOWTO/INSTALL-CROSS.md index c1985f02cb..d603986e34 100644 --- a/HOWTO/INSTALL-CROSS.md +++ b/HOWTO/INSTALL-CROSS.md @@ -57,9 +57,7 @@ cross compiling. The build system, including cross compilation configuration variables used, may be subject to non backward compatible changes without prior notice. Current cross build system has been tested when cross compiling some Linux/GNU -systems, but has only been partly tested for more esoteric platforms. The -VxWorks example file is highly dependent on our environment and is here more -or less only for internal use. +systems, but has only been partly tested for more esoteric platforms. ### Patches ### diff --git a/HOWTO/INSTALL-WIN32-OLD.md b/HOWTO/INSTALL-WIN32-OLD.md index d819fb18aa..d2a0125ac7 100644 --- a/HOWTO/INSTALL-WIN32-OLD.md +++ b/HOWTO/INSTALL-WIN32-OLD.md @@ -47,7 +47,7 @@ to make the Erlang/OTP distribution for Windows better. Please submit any suggestions or patches to our [git project] [2] to let them find their way into the next version of Erlang. If making changes to the build system (like makefiles etc) please bear in mind that the -same makefiles are used on Unix/VxWorks, so that your changes +same makefiles are used on Unix, so that your changes don't break other platforms. That of course goes for C-code too; system specific code resides in the `$ERL_TOP/erts/emulator/sys/win32` and `$ERL_TOP/erts/etc/win32` directories mostly. The diff --git a/HOWTO/INSTALL-WIN32.md b/HOWTO/INSTALL-WIN32.md index a4b01d83a2..4ad0159bcd 100644 --- a/HOWTO/INSTALL-WIN32.md +++ b/HOWTO/INSTALL-WIN32.md @@ -31,7 +31,7 @@ to make the Erlang/OTP distribution for Windows better. Please submit any suggestions or patches to our [git project] [1] to let them find their way into the next version of Erlang. If making changes to the build system (like makefiles etc) please bear in mind that the -same makefiles are used on Unix/VxWorks, so that your changes +same makefiles are used on Unix, so that your changes don't break other platforms. That of course goes for C-code too; system specific code resides in the `$ERL_TOP/erts/emulator/sys/win32` and `$ERL_TOP/erts/etc/win32` directories mostly. The diff --git a/erts/doc/src/inet_cfg.xml b/erts/doc/src/inet_cfg.xml index 635156378e..174e6da00d 100644 --- a/erts/doc/src/inet_cfg.xml +++ b/erts/doc/src/inet_cfg.xml @@ -79,7 +79,7 @@ <c><![CDATA['file']]></c> or <c><![CDATA['dns']]></c>, see below.</p> <p>Native lookup (system calls) is always the default resolver method. - This is true for all platforms, except VxWorks and OSE Delta where + This is true for all platforms, except OSE Delta where <c><![CDATA['file']]></c> or <c><![CDATA['dns']]></c> is used (in that priority order).</p> diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index 58f27f0626..15b8f0460f 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -134,12 +134,6 @@ static int modified_sched_thread_suggested_stack_size = 0; Eterm erts_init_process_id = ERTS_INVALID_PID; -/* - * Note about VxWorks: All variables must be initialized by executable code, - * not by an initializer. Otherwise a new instance of the emulator will - * inherit previous values. - */ - extern void erl_crash_dump_v(char *, int, char *, va_list); #ifdef __WIN32__ extern void ConNormalExit(void); diff --git a/erts/emulator/beam/erl_lock_check.c b/erts/emulator/beam/erl_lock_check.c index f6b6ea1b4c..a9d0b507a9 100644 --- a/erts/emulator/beam/erl_lock_check.c +++ b/erts/emulator/beam/erl_lock_check.c @@ -33,9 +33,6 @@ # include "config.h" #endif -/* Needed for VxWorks va_arg */ -#include "sys.h" - #ifdef ERTS_ENABLE_LOCK_CHECK #include "erl_lock_check.h" diff --git a/erts/emulator/nifs/common/prim_file_nif.h b/erts/emulator/nifs/common/prim_file_nif.h index a375021224..452d6c0658 100644 --- a/erts/emulator/nifs/common/prim_file_nif.h +++ b/erts/emulator/nifs/common/prim_file_nif.h @@ -28,7 +28,7 @@ enum efile_modes_t { EFILE_MODE_SYNC = (1 << 4), EFILE_MODE_SKIP_TYPE_CHECK = (1 << 5), /* Special for device files on Unix. */ - EFILE_MODE_NO_TRUNCATE = (1 << 6), /* Special for reopening on VxWorks. */ + /* EFILE_MODE_RESERVED = (1 << 6), - Reserved, previously used for reopening on VxWorks. */ EFILE_MODE_DIRECTORY = (1 << 7), diff --git a/erts/emulator/nifs/unix/unix_prim_file.c b/erts/emulator/nifs/unix/unix_prim_file.c index 6d51ccd83b..afd87e5d14 100644 --- a/erts/emulator/nifs/unix/unix_prim_file.c +++ b/erts/emulator/nifs/unix/unix_prim_file.c @@ -139,11 +139,7 @@ static int get_flags(enum efile_modes_t modes) { if(modes & EFILE_MODE_READ && !(modes & EFILE_MODE_WRITE)) { flags |= O_RDONLY; } else if(modes & EFILE_MODE_WRITE && !(modes & EFILE_MODE_READ)) { - if(!(modes & EFILE_MODE_NO_TRUNCATE)) { - flags |= O_TRUNC; - } - - flags |= O_WRONLY | O_CREAT; + flags |= O_TRUNC | O_WRONLY | O_CREAT; } else if(modes & EFILE_MODE_READ_WRITE) { flags |= O_RDWR | O_CREAT; } else { diff --git a/erts/epmd/test/epmd.spec.vxworks b/erts/epmd/test/epmd.spec.vxworks deleted file mode 100644 index 476308b481..0000000000 --- a/erts/epmd/test/epmd.spec.vxworks +++ /dev/null @@ -1,2 +0,0 @@ -{topcase, {dir, "../epmd_test"}}. -{skip,{epmd_rx_SUITE,"EPMD RX does simply not work on VxWorks"}}. diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c index b0770125b6..2443ccd98f 100644 --- a/erts/etc/common/heart.c +++ b/erts/etc/common/heart.c @@ -674,7 +674,7 @@ do_terminate(int erlin_fd, int reason) { case R_ERROR: default: { -#if defined(__WIN32__) /* Not VxWorks */ +#if defined(__WIN32__) if(!cmd[0]) { char *command = get_env(HEART_COMMAND_ENV); if(!command) diff --git a/lib/common_test/src/test_server.erl b/lib/common_test/src/test_server.erl index 69e970f033..6979b67556 100644 --- a/lib/common_test/src/test_server.erl +++ b/lib/common_test/src/test_server.erl @@ -2581,9 +2581,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, for instance VxWorks, -%% where all nodes are started on a remote host). +%% the node will be started on the local host. %% {args, Arguments} - Arguments passed directly to the node. %% {cleanup, false} - Nodes started with this option will not be killed %% by the test server after completion of the test case diff --git a/lib/common_test/test_server/ts.hrl b/lib/common_test/test_server/ts.hrl index 403c62d22e..6cf8476ceb 100644 --- a/lib/common_test/test_server/ts.hrl +++ b/lib/common_test/test_server/ts.hrl @@ -30,9 +30,7 @@ -define(cover_total,"total_cover.log"). -define(variables, "variables"). -define(cross_variables, "variables-cross"). --define(LF, [10]). % Newline in VxWorks script --define(CHAR_PER_LINE, 60). % Characters per VxWorks script building line -define(CROSS_COOKIE, "cross"). % cookie used when cross platform testing -define(TS_PORT, 7887). --define(TEST_SERVER_SCRIPT, "test_server_vx.script"). + diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in index e929073d88..ad1e0dfb57 100644 --- a/lib/erl_interface/configure.in +++ b/lib/erl_interface/configure.in @@ -20,8 +20,6 @@ # Process this file with autoconf to produce a configure script. # The starting point for this file was the output from 'autoscan'. -# Strange, VxWorks HAVE_SENS not set here, see "ei_resolve.h" - # Find the erl_interface version number and set m4 macro to it. # We do this because AC_INIT can't handle shell variables. Still broken. dnl m4_define(EI_VERSION,`grep EI_VSN ../vsn.mk | sed 's/^.*=[ ]*//'`) diff --git a/lib/erl_interface/doc/src/ei_users_guide.xml b/lib/erl_interface/doc/src/ei_users_guide.xml index 5c9452b516..20cbc941e2 100644 --- a/lib/erl_interface/doc/src/ei_users_guide.xml +++ b/lib/erl_interface/doc/src/ei_users_guide.xml @@ -298,7 +298,7 @@ pub = ei_publish(ec, port); ]]></code> explicitly close the descriptor or if your node fails, it becomes unregistered from <c>epmd</c>.</p> - <p>Notice that on some systems (such as VxWorks), a failed node is + <p>Notice that on some systems a failed node is not detected by this mechanism, as the operating system does not automatically close descriptors that were left open when the node failed. If a node has failed in this way, <c>epmd</c> diff --git a/lib/erl_interface/src/README.internal b/lib/erl_interface/src/README.internal index 51be1159d3..c8f7ac9501 100644 --- a/lib/erl_interface/src/README.internal +++ b/lib/erl_interface/src/README.internal @@ -12,10 +12,6 @@ Ei should be "reentrant" or "async safe", i.e. no locks should be set so that if an ei function is called inside an signal handler there could be a deadlock. -VxWorks call the operating processes "tasks". These are to be handled the -same way as Unix threads, i.e. there can only be one C node for all tasks -using the old interface. - Try to keep the documented functions, variables and symbols in sync between diff --git a/lib/erl_interface/src/connect/eirecv.c b/lib/erl_interface/src/connect/eirecv.c index b69e0649cf..b9ee05a436 100644 --- a/lib/erl_interface/src/connect/eirecv.c +++ b/lib/erl_interface/src/connect/eirecv.c @@ -21,7 +21,7 @@ # include <winsock2.h> # include <windows.h> # include <winbase.h> -#else /* Unix/VxWorks */ +#else /* Unix */ # include <unistd.h> #endif diff --git a/lib/erl_interface/src/connect/send_exit.c b/lib/erl_interface/src/connect/send_exit.c index 231aad0ae0..5a85946f52 100644 --- a/lib/erl_interface/src/connect/send_exit.c +++ b/lib/erl_interface/src/connect/send_exit.c @@ -21,7 +21,7 @@ # include <winsock2.h> # include <windows.h> # include <winbase.h> -#else /* Unix/VxWorks */ +#else /* Unix */ #include <unistd.h> #endif diff --git a/lib/erl_interface/test/all_SUITE_data/reclaim.h b/lib/erl_interface/test/all_SUITE_data/reclaim.h deleted file mode 100644 index fe99bb0afc..0000000000 --- a/lib/erl_interface/test/all_SUITE_data/reclaim.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * %CopyrightBegin% - * - * Copyright Ericsson AB 2001-2016. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * %CopyrightEnd% - * - - */ -#ifndef _RECLAIM_H -#define _RECLAIM_H - - -/* The Erlang release for VxWorks includes a simple mechanism for - "resource reclamation" at task exit - it allows replacement of the - functions that open/close "files" and malloc/free memory with versions - that keep track, to be able to "reclaim" file descriptors and memory - when a task exits (regardless of *how* it exits). - - The interface to this mechanism is made available via this file, - with the following caveats: - - - The interface may change (or perhaps even be removed, though that - isn't likely until VxWorks itself provides similar functionality) - in future releases - i.e. you must always use the version of this - file that comes with the Erlang release you are using. - - - Disaster is guaranteed if you use the mechanism incorrectly (see - below for the correct way), e.g. allocate memory with the "tracking" - version of malloc() and free it with the "standard" version of free(). - - - The mechanism (of course) incurs some performance penalty - thus - for a simple program you may be better off with careful programming, - making sure that you do whatever close()/free()/etc calls that are - appropriate at all exit points (though if you need to guard against - taskDelete() etc, things get messy...). - - To use the mechanism, simply program your application normally, i.e. - use open()/close()/malloc()/free() etc as usual, but #include this - file before any usage of the relevant functions. NOTE: To avoid the - "disaster" mentioned above, you *must* #include it in *all* (or none) - of the files that manipulate a particular file descriptor, allocated - memory area, etc. - - Before any task that uses this utility is loaded (which includes the - erlang emulator), the reclaim.o object file has to be loaded and - the function reclaim_init() has to be called. reclaim_init should be called - only _ONCE_ in a systems lifetime and has only a primitive guard - against multiple calls (i.e. a global variable is checked). Therefore - the initialization should occur either in the start script of the system - or (even better) in the usrInit() part of system initialization. The - object file itself should be loaded only once, so linking it with the - kernel is a good idea, linking with each application is an extremely bad - dito. Make really sure that it's loaded _before_ any application that - uses it if You want to load it in the startup script. - - If You dont want to have #define's for the posix/stdio names - of the file/memory operations (i.e. no #define malloc save_malloc etc), - #define RECLAIM_NO_ALIAS in Your source before reclaim.h is included. -*/ - -#include <vxWorks.h> /* STATUS, size_t */ -#include <sockLib.h> /* struct sockaddr */ -#include <stdio.h> /* FILE */ - -#if defined(__STDC__) -#define _RECLAIM_DECL_FUN(RetType, FunName, ParamList) \ -extern RetType FunName##ParamList -#define _RECLAIM_VOID_PTR void * -#define _RECLAIM_VOID_PARAM void -#define _RECLAIM_VOID_RETURN void -#elif defined(__cplusplus) -#define _RECLAIM_DECL_FUN(RetType, FunName, ParamList) \ -extern "C" RetType FunName##ParamList -#define _RECLAIM_VOID_PTR void * -#define _RECLAIM_VOID_PARAM -#define _RECLAIM_VOID_RETURN void -#else -#define _RECLAIM_DECL_FUN(RetType, FunName, Ignore) extern RetType FunName() -#define DECLARE_FUNCTION_TYPE(RetType, Type, PList) typedef RetType (* Type)() -#define _RECLAIM_VOID_PTR char * -#define _RECLAIM_VOID_PARAM -#define _RECLAIM_VOID_RETURN -#endif /* __STDC__ / __cplusplus */ - -/* Initialize the facility, on a per system basis. */ -_RECLAIM_DECL_FUN(STATUS, reclaim_init, (_RECLAIM_VOID_PARAM)); - -/* File descriptor operations */ -_RECLAIM_DECL_FUN(int,save_open,(char *, int, ...)); -_RECLAIM_DECL_FUN(int,save_creat,(char *, int)); -_RECLAIM_DECL_FUN(int,save_socket,(int, int, int)); -_RECLAIM_DECL_FUN(int,save_accept,(int, struct sockaddr *, int *)); -_RECLAIM_DECL_FUN(int,save_close,(int)); -/* Interface to add an fd to what's reclaimed even though it's not open with - one of the above functions */ -_RECLAIM_DECL_FUN(_RECLAIM_VOID_RETURN, save_fd, (int fd)); -#ifndef RECLAIM_NO_ALIAS -#define open save_open -#define creat save_creat -#define socket save_socket -#define accept save_accept -#define close save_close -#endif -/* Stdio file operations */ -_RECLAIM_DECL_FUN(FILE *, save_fopen, (char *, char *)); -_RECLAIM_DECL_FUN(FILE *, save_fdopen, (int, char *)); -_RECLAIM_DECL_FUN(FILE *, save_freopen, (char *, char *, FILE *)); -_RECLAIM_DECL_FUN(int, save_fclose, (FILE *)); -/* XXX Should do opendir/closedir too... */ -#ifndef RECLAIM_NO_ALIAS -#define fopen save_fopen -#define fdopen save_fdopen -#define freopen save_freopen -#define fclose save_fclose -#endif -/* Memory allocation */ -_RECLAIM_DECL_FUN(_RECLAIM_VOID_PTR, save_malloc, (size_t)); -_RECLAIM_DECL_FUN(_RECLAIM_VOID_PTR, save_calloc, (size_t, size_t)); -_RECLAIM_DECL_FUN(_RECLAIM_VOID_PTR, save_realloc, - (_RECLAIM_VOID_PTR, size_t)); -_RECLAIM_DECL_FUN(void, save_free, (_RECLAIM_VOID_PTR)); -_RECLAIM_DECL_FUN(void, save_cfree, (_RECLAIM_VOID_PTR)); -#ifndef RECLAIM_NO_ALIAS -#define malloc save_malloc -#define calloc save_calloc -#define realloc save_realloc -#define free save_free -#define cfree save_cfree -#endif -/* Generic interfaces to malloc etc... */ -_RECLAIM_DECL_FUN(_RECLAIM_VOID_PTR, plain_malloc, (size_t)); -_RECLAIM_DECL_FUN(_RECLAIM_VOID_PTR, plain_realloc, - (_RECLAIM_VOID_PTR, size_t)); -_RECLAIM_DECL_FUN(void, plain_free, (_RECLAIM_VOID_PTR)); -#endif /* _RECLAIM_H */ - - - - diff --git a/lib/jinterface/doc/src/jinterface_users_guide.xml b/lib/jinterface/doc/src/jinterface_users_guide.xml index c3794e8dbe..e9eccc3663 100644 --- a/lib/jinterface/doc/src/jinterface_users_guide.xml +++ b/lib/jinterface/doc/src/jinterface_users_guide.xml @@ -373,7 +373,7 @@ OtpNode node = new OtpNode("gurka"); </code> <p>Java nodes can also register themselves with epmd if they want other nodes in the system to be able to find and connect to them. This is done by call to method <seefile marker="java/com/ericsson/otp/erlang/OtpEpmd#publishPort(com.ericsson.otp.erlang.OtpLocalNode)">OtpEpmd.publishPort()</seefile>.</p> - <p>Be aware that on some systems (such as VxWorks), a failed node will + <p>Be aware that on some systems a failed node will not be detected by this mechanism since the operating system does not automatically close descriptors that were left open when the node failed. If a node has failed in this way, epmd will prevent you from diff --git a/lib/jinterface/test/jinterface_SUITE_data/Makefile.src b/lib/jinterface/test/jinterface_SUITE_data/Makefile.src index 19c2157f7a..f390ef29cc 100644 --- a/lib/jinterface/test/jinterface_SUITE_data/Makefile.src +++ b/lib/jinterface/test/jinterface_SUITE_data/Makefile.src @@ -23,9 +23,6 @@ # We use both `rm' (Unix) and `del' (Windows) for removing files, but # with a `-' in front so that the error in not finding `rm' (`del') on # Windows (Unix) is ignored. -# -# VxWorks? XXX -# .SUFFIXES: .SUFFIXES: .java diff --git a/lib/jinterface/test/nc_SUITE_data/Makefile.src b/lib/jinterface/test/nc_SUITE_data/Makefile.src index 94e2c1fa47..94671460d5 100644 --- a/lib/jinterface/test/nc_SUITE_data/Makefile.src +++ b/lib/jinterface/test/nc_SUITE_data/Makefile.src @@ -24,9 +24,6 @@ # We use both `rm' (Unix) and `del' (Windows) for removing files, but # with a `-' in front so that the error in not finding `rm' (`del') on # Windows (Unix) is ignored. -# -# VxWorks? XXX -# .SUFFIXES: .SUFFIXES: .java diff --git a/lib/kernel/test/disk_log_SUITE.erl b/lib/kernel/test/disk_log_SUITE.erl index 35335b2d06..105c5f0fd0 100644 --- a/lib/kernel/test/disk_log_SUITE.erl +++ b/lib/kernel/test/disk_log_SUITE.erl @@ -120,14 +120,6 @@ open_change_size, change_attribute, otp_6278, otp_10131, otp_16768, otp_16809]). -%% These tests should be skipped if the VxWorks card is configured *with* -%% nfs cache. --define(SKIP_LARGE_CACHE,[inc_wrap_file, halt_ext, wrap_ext, read_mode, - head, wrap_notif, open_size, error_log, - error_index, chunk, - change_size_before, change_size_during, - change_size_after, default_size]). - suite() -> [{ct_hooks,[ts_install_cth]}, diff --git a/lib/stdlib/doc/src/filename.xml b/lib/stdlib/doc/src/filename.xml index 168be3a4dd..d5c6c53bc3 100644 --- a/lib/stdlib/doc/src/filename.xml +++ b/lib/stdlib/doc/src/filename.xml @@ -136,7 +136,7 @@ <p>Joins an absolute directory with a relative filename. Similar to <seemfa marker="#join/2"><c>join/2</c></seemfa>, but on platforms with tight restrictions on raw filename length and no support for - symbolic links (read: VxWorks), leading parent directory components + symbolic links, leading parent directory components in <c><anno>Filename</anno></c> are matched against trailing directory components in <c><anno>Dir</anno></c> so they can be removed from the result - minimizing its length.</p> -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor