From 00fa7a8def826d2a4c8fb9e2c38208103bf04341 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Sat, 23 Feb 2019 18:59:06 +0100 Subject: Document deprecations and removals --- erts/autoconf/configure.vxworks | 2 + lib/common_test/test_server/ts_erl_config.erl | 36 ++-- lib/erl_interface/configure.in | 11 +- lib/erl_interface/doc/src/ei.xml | 3 + lib/erl_interface/doc/src/ei_connect.xml | 3 + lib/erl_interface/doc/src/ei_users_guide.xml | 12 ++ lib/erl_interface/doc/src/erl_connect.xml | 9 + lib/erl_interface/doc/src/erl_eterm.xml | 9 + lib/erl_interface/doc/src/erl_global.xml | 9 + lib/erl_interface/doc/src/erl_interface.xml | 12 ++ lib/erl_interface/doc/src/erl_malloc.xml | 8 + lib/erl_interface/doc/src/erl_marshal.xml | 8 + lib/erl_interface/doc/src/ref_man.xml | 8 + lib/erl_interface/doc/src/ref_man_ei.xml | 10 +- .../doc/src/ref_man_erl_interface.xml | 8 + lib/erl_interface/include/ei.h | 14 ++ lib/erl_interface/include/ei_config.h.in | 3 + lib/erl_interface/include/erl_interface.h | 213 +++++++++++---------- lib/erl_interface/src/Makefile.in | 7 +- lib/erl_interface/src/misc/eidef.h | 1 + lib/erl_interface/test/all_SUITE_data/Makefile.src | 4 +- .../test/ei_accept_SUITE_data/Makefile.src | 2 +- .../test/ei_connect_SUITE_data/Makefile.src | 2 +- .../test/ei_decode_SUITE_data/Makefile.src | 2 +- .../test/ei_decode_encode_SUITE_data/Makefile.src | 2 +- .../test/ei_encode_SUITE_data/Makefile.src | 2 +- .../test/ei_format_SUITE_data/Makefile.src | 2 +- .../test/ei_print_SUITE_data/Makefile.src | 2 +- .../test/ei_tmo_SUITE_data/Makefile.src | 2 +- .../test/erl_connect_SUITE_data/Makefile.src | 2 +- .../test/erl_eterm_SUITE_data/Makefile.src | 2 +- .../test/erl_ext_SUITE_data/Makefile.src | 2 +- .../test/erl_format_SUITE_data/Makefile.src | 2 +- .../test/erl_global_SUITE_data/Makefile.src | 2 +- .../test/erl_match_SUITE_data/Makefile.src | 2 +- .../test/port_call_SUITE_data/Makefile.src | 2 +- lib/odbc/c_src/Makefile.in | 2 +- system/doc/Makefile | 1 + system/doc/general_info/Makefile | 100 ++++++++++ system/doc/general_info/book.xml | 44 +++++ system/doc/general_info/deprecations.xml | 77 ++++++++ system/doc/general_info/part.xml | 34 ++++ system/doc/general_info/scheduled_for_removal.xml | 61 ++++++ system/doc/general_info/xmlfiles.mk | 22 +++ system/doc/system_principles/misc.xml | 8 + system/doc/top/Makefile | 5 +- system/doc/top/book.xml | 1 + system/doc/top/templates/index.html.src | 2 + 48 files changed, 635 insertions(+), 142 deletions(-) create mode 100644 lib/erl_interface/include/ei_config.h.in create mode 100644 system/doc/general_info/Makefile create mode 100644 system/doc/general_info/book.xml create mode 100644 system/doc/general_info/deprecations.xml create mode 100644 system/doc/general_info/part.xml create mode 100644 system/doc/general_info/scheduled_for_removal.xml create mode 100644 system/doc/general_info/xmlfiles.mk diff --git a/erts/autoconf/configure.vxworks b/erts/autoconf/configure.vxworks index a253848403..1893f3f7e0 100755 --- a/erts/autoconf/configure.vxworks +++ b/erts/autoconf/configure.vxworks @@ -93,6 +93,7 @@ erts_lib_src=${ERL_TOP}/erts/lib_src erts_incl=${ERL_TOP}/erts/include erts_incl_intrnl=${ERL_TOP}/erts/include/internal etcdir=${ERL_TOP}/erts/etc/common +erlint_incl_dir=${ERL_TOP}/lib/erl_interface/include erlint_dir=${ERL_TOP}/lib/erl_interface/src epmd_dir=${ERL_TOP}/erts/epmd/src os_mon_dir=${ERL_TOP}/lib/os_mon/c_src @@ -109,6 +110,7 @@ CONFIG_FILES="${ERL_TOP}/erts/emulator/$host/Makefile $erts_incl_intrnl/$host/ethread.mk $erts_incl_intrnl/$host/ethread_header_config.h $etcdir/$host/Makefile + $erlint_incl_dir/$host/ei_config.h $erlint_dir/$host/Makefile $erlint_dir/$host/eidefs.mk $epmd_dir/$host/Makefile diff --git a/lib/common_test/test_server/ts_erl_config.erl b/lib/common_test/test_server/ts_erl_config.erl index f3972bea4e..c2852131d6 100644 --- a/lib/common_test/test_server/ts_erl_config.erl +++ b/lib/common_test/test_server/ts_erl_config.erl @@ -197,24 +197,28 @@ system_include(Root, Vars) -> " -I" ++ quote(filename:nativename(filename:join([Root, "erts", "emulator", SysDir]))). erl_interface(Vars,OsType) -> - {Incl, {LibPath, MkIncl}} = + {Incl, TargetIncl, {LibPath, MkIncl}} = case lib_dir(Vars, erl_interface) of {error, bad_name} -> throw({cannot_find_app, erl_interface}); Dir -> - {filename:join(Dir, "include"), - case erl_root(Vars) of - {installed, _Root} -> - {filename:join(Dir, "lib"), - filename:join([Dir, "src", "eidefs.mk"])}; - {srctree, _Root, Target} -> - Obj = case is_debug_build() of - true -> "obj.debug"; - false -> "obj" - end, - {filename:join([Dir, Obj, Target]), - filename:join([Dir, "src", Target, "eidefs.mk"])} - end} + BaseIncl = filename:join(Dir, "include"), + case erl_root(Vars) of + {installed, _Root} -> + {BaseIncl, + [], + {filename:join(Dir, "lib"), + filename:join([Dir, "src", "eidefs.mk"])}}; + {srctree, _Root, Target} -> + Obj = case is_debug_build() of + true -> "obj.debug"; + false -> "obj" + end, + {BaseIncl, + filename:join(BaseIncl, Target), + {filename:join([Dir, Obj, Target]), + filename:join([Dir, "src", Target, "eidefs.mk"])}} + end end, Lib = link_library("erl_interface",OsType), Lib1 = link_library("ei",OsType), @@ -260,6 +264,10 @@ erl_interface(Vars,OsType) -> {erl_interface_eilib_drv, quote(filename:join(LibPath, Lib1Drv))}, {erl_interface_threadlib, ThreadLib}, {erl_interface_include, quote(filename:nativename(Incl))}, + {erl_interface_target_include, case TargetIncl of + [] -> []; + _ -> "-I" ++ quote(filename:nativename(TargetIncl)) + end}, {erl_interface_mk_include, quote(filename:nativename(MkIncl))} | Vars]. diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in index 14f06f946f..53c2f7069c 100644 --- a/lib/erl_interface/configure.in +++ b/lib/erl_interface/configure.in @@ -61,7 +61,7 @@ fi TARGET=$host AC_SUBST(TARGET) -AC_CONFIG_HEADER([src/$host/config.h:config.h.in]) +AC_CONFIG_HEADER([src/$host/config.h:config.h.in include/$host/ei_config.h:include/ei_config.h.in]) dnl ---------------------------------------------------------------------- dnl Optional features @@ -184,6 +184,14 @@ AC_TRY_COMPILE([#include AC_DEFINE(HAVE_SOCKLEN_T, [], [Define if you have the `socklen_t' type])], [AC_MSG_RESULT(no)]) +AC_MSG_CHECKING([for deprecated attribute]) +AC_TRY_COMPILE([], +[void my_function(void) __attribute__((deprecated));], +[AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_DEPRECATED_ATTRIBUTE, [], [Define to 1 if you have the `deprecated' attribute])], +[AC_MSG_RESULT(no)]) + + # Checks for library functions. AC_FUNC_ALLOCA dnl AC_FUNC_FORK @@ -360,6 +368,7 @@ LDFLAGS="$LDFLAGS $sanitizers" # XXX # --------------------------------------------------------------------------- + AC_OUTPUT( src/$host/Makefile:src/Makefile.in src/$host/eidefs.mk:src/eidefs.mk.in diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml index ae322255ad..2bdb390644 100644 --- a/lib/erl_interface/doc/src/ei.xml +++ b/lib/erl_interface/doc/src/ei.xml @@ -35,6 +35,9 @@ ei Routines for handling the Erlang binary term format. +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The library ei contains macros and functions to encode and decode the Erlang binary term format.

diff --git a/lib/erl_interface/doc/src/ei_connect.xml b/lib/erl_interface/doc/src/ei_connect.xml index e318dd6664..df40973270 100644 --- a/lib/erl_interface/doc/src/ei_connect.xml +++ b/lib/erl_interface/doc/src/ei_connect.xml @@ -34,6 +34,9 @@ ei_connect Communicate with distributed Erlang. +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

This module enables C-programs to communicate with Erlang nodes, using the Erlang distribution over TCP/IP.

diff --git a/lib/erl_interface/doc/src/ei_users_guide.xml b/lib/erl_interface/doc/src/ei_users_guide.xml index 2dfd99e35a..7ca10d1a99 100644 --- a/lib/erl_interface/doc/src/ei_users_guide.xml +++ b/lib/erl_interface/doc/src/ei_users_guide.xml @@ -33,6 +33,18 @@ ei_users_guide.xml +
+ Deprecation and Removal +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

+
+
Introduction

The Erl_Interface library contains functions that help you diff --git a/lib/erl_interface/doc/src/erl_connect.xml b/lib/erl_interface/doc/src/erl_connect.xml index 139ac9e2f0..9492a82864 100644 --- a/lib/erl_interface/doc/src/erl_connect.xml +++ b/lib/erl_interface/doc/src/erl_connect.xml @@ -35,6 +35,15 @@ erl_connect Communicate with distributed Erlang. +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

+

This module provides support for communication between distributed Erlang nodes and C-nodes, in a manner that is transparent to Erlang processes.

diff --git a/lib/erl_interface/doc/src/erl_eterm.xml b/lib/erl_interface/doc/src/erl_eterm.xml index 070ed30dfe..295760b4e6 100644 --- a/lib/erl_interface/doc/src/erl_eterm.xml +++ b/lib/erl_interface/doc/src/erl_eterm.xml @@ -35,6 +35,15 @@ erl_eterm Functions for Erlang term construction. +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

+

This module provides functions for creating and manipulating Erlang terms.

diff --git a/lib/erl_interface/doc/src/erl_global.xml b/lib/erl_interface/doc/src/erl_global.xml index 72d43e81d5..39085b46f0 100644 --- a/lib/erl_interface/doc/src/erl_global.xml +++ b/lib/erl_interface/doc/src/erl_global.xml @@ -35,6 +35,15 @@ erl_global Access globally registered names. +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

+

This module provides support for registering, looking up, and unregistering names in the global module. For more information, see diff --git a/lib/erl_interface/doc/src/erl_interface.xml b/lib/erl_interface/doc/src/erl_interface.xml index 4e66655b39..decd66046a 100644 --- a/lib/erl_interface/doc/src/erl_interface.xml +++ b/lib/erl_interface/doc/src/erl_interface.xml @@ -57,6 +57,18 @@ the registry +

+ Deprecation and Removal +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

+
+
Compiling and Linking Your Code

In order to use any of the Erl_Interface functions, include the diff --git a/lib/erl_interface/doc/src/erl_malloc.xml b/lib/erl_interface/doc/src/erl_malloc.xml index aae3b7e078..6650620064 100644 --- a/lib/erl_interface/doc/src/erl_malloc.xml +++ b/lib/erl_interface/doc/src/erl_malloc.xml @@ -35,6 +35,14 @@ erl_malloc Memory allocation functions. +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

This module provides functions for allocating and deallocating memory.

diff --git a/lib/erl_interface/doc/src/erl_marshal.xml b/lib/erl_interface/doc/src/erl_marshal.xml index 1a6d3bb43c..33d359d871 100644 --- a/lib/erl_interface/doc/src/erl_marshal.xml +++ b/lib/erl_interface/doc/src/erl_marshal.xml @@ -35,6 +35,14 @@ erl_marshal Encoding and decoding of Erlang terms. +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

This module contains functions for encoding Erlang terms into a sequence of bytes, and for decoding Erlang terms from a sequence of bytes.

diff --git a/lib/erl_interface/doc/src/ref_man.xml b/lib/erl_interface/doc/src/ref_man.xml index 1e20637cb7..a4f947c79f 100644 --- a/lib/erl_interface/doc/src/ref_man.xml +++ b/lib/erl_interface/doc/src/ref_man.xml @@ -29,6 +29,14 @@ ref_man.xml +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

diff --git a/lib/erl_interface/doc/src/ref_man_ei.xml b/lib/erl_interface/doc/src/ref_man_ei.xml index 92ff9ed328..d8d1deaea1 100644 --- a/lib/erl_interface/doc/src/ref_man_ei.xml +++ b/lib/erl_interface/doc/src/ref_man_ei.xml @@ -30,8 +30,14 @@ ref_man_ei.xml -

The ei library is a C interface library for - communication with Erlang.

+

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

By default, the ei library is only guaranteed to be compatible with other Erlang/OTP components from the same diff --git a/lib/erl_interface/doc/src/ref_man_erl_interface.xml b/lib/erl_interface/doc/src/ref_man_erl_interface.xml index 4b1d0e9981..2b69d0fa74 100644 --- a/lib/erl_interface/doc/src/ref_man_erl_interface.xml +++ b/lib/erl_interface/doc/src/ref_man_erl_interface.xml @@ -30,6 +30,14 @@ ref_man_erl_interface.xml +

The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.

+

The old legacy erl_interface library (functions + with prefix erl_) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the ei + library. Reasonably new gcc compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + EI_NO_DEPR_WARN.

The erl_interface library is a C interface library for communication with Erlang.

diff --git a/lib/erl_interface/include/ei.h b/lib/erl_interface/include/ei.h index ca4960b252..10a6e5bf50 100644 --- a/lib/erl_interface/include/ei.h +++ b/lib/erl_interface/include/ei.h @@ -47,6 +47,20 @@ typedef LONG_PTR ssize_t; /* Sigh... */ # include #endif +#ifndef EI_INCLUDED_CONFIG_H__ +#include "ei_config.h" +#endif + +#if defined(HAVE_DEPRECATED_ATTRIBUTE) && !defined(EI_NO_DEPR_WARN) +#define EI_HAVE_DEPRECATED_ATTR__ 1 +#define EI_DEPRECATED_ATTR_NAME deprecated +#define EI_DEPRECATED_ATTR __attribute__((EI_DEPRECATED_ATTR_NAME)) +#else +#undef EI_HAVE_DEPRECATED_ATTR__ +#define EI_DEPRECATED_ATTR_NAME +#define EI_DEPRECATED_ATTR +#endif + /* -------------------------------------------------------------------- */ /* Defines part of API */ diff --git a/lib/erl_interface/include/ei_config.h.in b/lib/erl_interface/include/ei_config.h.in new file mode 100644 index 0000000000..dfcf676bed --- /dev/null +++ b/lib/erl_interface/include/ei_config.h.in @@ -0,0 +1,3 @@ + +/* Define to 1 if you have the `deprecated' attribute */ +#undef HAVE_DEPRECATED_ATTRIBUTE diff --git a/lib/erl_interface/include/erl_interface.h b/lib/erl_interface/include/erl_interface.h index c22f21af2b..7c87223a38 100644 --- a/lib/erl_interface/include/erl_interface.h +++ b/lib/erl_interface/include/erl_interface.h @@ -25,8 +25,6 @@ /* Note: the 'ei' interface is the prefered C API. */ /************************************************************************/ -/* FIXME only include if needed? */ - #include "ei.h" /* ei is the base */ /* -------------------------------------------------------------------- */ @@ -195,11 +193,11 @@ typedef struct { int lenL; } Erl_Atom_data; -char* erl_atom_ptr_latin1(Erl_Atom_data*); -char* erl_atom_ptr_utf8(Erl_Atom_data*); -int erl_atom_size_latin1(Erl_Atom_data*); -int erl_atom_size_utf8(Erl_Atom_data*); -char* erl_atom_init_latin1(Erl_Atom_data*, const char*); +char* erl_atom_ptr_latin1(Erl_Atom_data*) EI_DEPRECATED_ATTR; +char* erl_atom_ptr_utf8(Erl_Atom_data*) EI_DEPRECATED_ATTR; +int erl_atom_size_latin1(Erl_Atom_data*) EI_DEPRECATED_ATTR; +int erl_atom_size_utf8(Erl_Atom_data*) EI_DEPRECATED_ATTR; +char* erl_atom_init_latin1(Erl_Atom_data*, const char*) EI_DEPRECATED_ATTR; typedef struct { Erl_Header h; @@ -324,110 +322,117 @@ typedef unsigned char Erl_Heap; /* The functions */ /* -------------------------------------------------------------------- */ -void erl_init(void *x, long y); -void erl_set_compat_rel(unsigned); -int erl_connect_init(int, char*,short); -int erl_connect_xinit(char*,char*,char*,struct in_addr*,char*,short); -int erl_connect(char*); -int erl_xconnect(struct in_addr*,char *); -int erl_close_connection(int); -int erl_receive(int, unsigned char*, int); -int erl_receive_msg(int, unsigned char*, int, ErlMessage*); -int erl_xreceive_msg(int, unsigned char**, int*, ErlMessage*); -int erl_send(int, ETERM*, ETERM*); -int erl_reg_send(int, char*, ETERM*); -ETERM *erl_rpc(int,char*,char*,ETERM*); -int erl_rpc_to(int,char*,char*,ETERM*); -int erl_rpc_from(int,int,ErlMessage*); +void erl_init(void *x, long y) EI_DEPRECATED_ATTR; +void erl_set_compat_rel(unsigned) EI_DEPRECATED_ATTR; +int erl_connect_init(int, char*,short) EI_DEPRECATED_ATTR; +int erl_connect_xinit(char*,char*,char*,struct in_addr*,char*,short) EI_DEPRECATED_ATTR; +int erl_connect(char*) EI_DEPRECATED_ATTR; +int erl_xconnect(struct in_addr*,char *) EI_DEPRECATED_ATTR; +int erl_close_connection(int) EI_DEPRECATED_ATTR; +int erl_receive(int, unsigned char*, int) EI_DEPRECATED_ATTR; +int erl_receive_msg(int, unsigned char*, int, ErlMessage*) EI_DEPRECATED_ATTR; +int erl_xreceive_msg(int, unsigned char**, int*, ErlMessage*) EI_DEPRECATED_ATTR; +int erl_send(int, ETERM*, ETERM*) EI_DEPRECATED_ATTR; +int erl_reg_send(int, char*, ETERM*) EI_DEPRECATED_ATTR; +ETERM *erl_rpc(int,char*,char*,ETERM*) EI_DEPRECATED_ATTR; +int erl_rpc_to(int,char*,char*,ETERM*) EI_DEPRECATED_ATTR; +int erl_rpc_from(int,int,ErlMessage*) EI_DEPRECATED_ATTR; /* erl_publish returns open descriptor on success, or -1 */ -int erl_publish(int port); -int erl_accept(int,ErlConnect*); +int erl_publish(int port) EI_DEPRECATED_ATTR; +int erl_accept(int,ErlConnect*) EI_DEPRECATED_ATTR; -const char *erl_thiscookie(void); -const char *erl_thisnodename(void); -const char *erl_thishostname(void); -const char *erl_thisalivename(void); -short erl_thiscreation(void); +const char *erl_thiscookie(void) EI_DEPRECATED_ATTR; +const char *erl_thisnodename(void) EI_DEPRECATED_ATTR; +const char *erl_thishostname(void) EI_DEPRECATED_ATTR; +const char *erl_thisalivename(void) EI_DEPRECATED_ATTR; +short erl_thiscreation(void) EI_DEPRECATED_ATTR; /* returns 0 on success, -1 if node not known to epmd or epmd not reached */ -int erl_unpublish(const char *alive); +int erl_unpublish(const char *alive) EI_DEPRECATED_ATTR; + +#ifdef EI_HAVE_DEPRECATED_ATTR__ +#define EI_DEPR_ATTR_EXTRA , EI_DEPRECATED_ATTR_NAME +#else +#define EI_DEPR_ATTR_EXTRA +#endif + /* Report generic error to stderr. */ void erl_err_msg(const char * __template, ...) - __attribute__ ((__format__ (printf, 1, 2))); + __attribute__ ((__format__ (printf, 1, 2) EI_DEPR_ATTR_EXTRA)) ; /* Report generic error to stderr and die. */ void erl_err_quit(const char * __template, ...) - __attribute__ ((__format__ (printf, 1, 2), __noreturn__)); + __attribute__ ((__format__ (printf, 1, 2), __noreturn__ EI_DEPR_ATTR_EXTRA)); /* Report system/libc error to stderr. */ void erl_err_ret(const char * __template, ...) - __attribute__ ((__format__ (printf, 1, 2))); + __attribute__ ((__format__ (printf, 1, 2) EI_DEPR_ATTR_EXTRA)); /* Report system/libc error to stderr and die. */ void erl_err_sys(const char * __template, ...) - __attribute__ ((__format__ (printf, 1, 2), __noreturn__)); - -ETERM *erl_cons(ETERM*,ETERM*); -ETERM *erl_copy_term(const ETERM*); -ETERM *erl_element(int,const ETERM*); - -ETERM *erl_hd(const ETERM*); -ETERM* erl_iolist_to_binary(const ETERM* term); -char* erl_iolist_to_string(const ETERM* term); -int erl_iolist_length(const ETERM*); -int erl_length(const ETERM*); -ETERM *erl_mk_atom(const char*); -ETERM *erl_mk_binary(const char*,int); -ETERM *erl_mk_empty_list(void); -ETERM *erl_mk_estring(const char*, int); -ETERM *erl_mk_float(double); -ETERM *erl_mk_int(int); -ETERM *erl_mk_longlong(long long); -ETERM *erl_mk_list(ETERM**,int); -ETERM *erl_mk_pid(const char*,unsigned int,unsigned int,unsigned char); -ETERM *erl_mk_port(const char*,unsigned int,unsigned char); -ETERM *erl_mk_ref(const char*,unsigned int,unsigned char); + __attribute__ ((__format__ (printf, 1, 2), __noreturn__ EI_DEPR_ATTR_EXTRA)); + +ETERM *erl_cons(ETERM*,ETERM*) EI_DEPRECATED_ATTR; +ETERM *erl_copy_term(const ETERM*) EI_DEPRECATED_ATTR; +ETERM *erl_element(int,const ETERM*) EI_DEPRECATED_ATTR; + +ETERM *erl_hd(const ETERM*) EI_DEPRECATED_ATTR; +ETERM* erl_iolist_to_binary(const ETERM* term) EI_DEPRECATED_ATTR; +char* erl_iolist_to_string(const ETERM* term) EI_DEPRECATED_ATTR; +int erl_iolist_length(const ETERM*) EI_DEPRECATED_ATTR; +int erl_length(const ETERM*) EI_DEPRECATED_ATTR; +ETERM *erl_mk_atom(const char*) EI_DEPRECATED_ATTR; +ETERM *erl_mk_binary(const char*,int) EI_DEPRECATED_ATTR; +ETERM *erl_mk_empty_list(void) EI_DEPRECATED_ATTR; +ETERM *erl_mk_estring(const char*, int) EI_DEPRECATED_ATTR; +ETERM *erl_mk_float(double) EI_DEPRECATED_ATTR; +ETERM *erl_mk_int(int) EI_DEPRECATED_ATTR; +ETERM *erl_mk_longlong(long long) EI_DEPRECATED_ATTR; +ETERM *erl_mk_list(ETERM**,int) EI_DEPRECATED_ATTR; +ETERM *erl_mk_pid(const char*,unsigned int,unsigned int,unsigned char) EI_DEPRECATED_ATTR; +ETERM *erl_mk_port(const char*,unsigned int,unsigned char) EI_DEPRECATED_ATTR; +ETERM *erl_mk_ref(const char*,unsigned int,unsigned char) EI_DEPRECATED_ATTR; ETERM *erl_mk_long_ref(const char*,unsigned int,unsigned int, - unsigned int,unsigned char); -ETERM *erl_mk_string(const char*); -ETERM *erl_mk_tuple(ETERM**,int); -ETERM *erl_mk_uint(unsigned int); -ETERM *erl_mk_ulonglong(unsigned long long); -ETERM *erl_mk_var(const char*); -int erl_print_term(FILE*,const ETERM*); -/* int erl_sprint_term(char*,const ETERM*); */ -int erl_size(const ETERM*); -ETERM *erl_tl(const ETERM*); -ETERM *erl_var_content(const ETERM*, const char*); - -ETERM *erl_format(char*, ... ); -int erl_match(ETERM*, ETERM*); - -char **erl_global_names(int fd, int *count); -int erl_global_register(int fd, const char *name, ETERM *pid); -int erl_global_unregister(int fd, const char *name); -ETERM *erl_global_whereis(int fd, const char *name, char *node); - -void erl_init_malloc(Erl_Heap*,long); -ETERM *erl_alloc_eterm(unsigned char); -void erl_eterm_release(void); -void erl_eterm_statistics(unsigned long*,unsigned long*); -void erl_free_array(ETERM**,int); -void erl_free_term(ETERM*); -void erl_free_compound(ETERM*); -void *erl_malloc(long); -void erl_free(void*); - -int erl_compare_ext(unsigned char*, unsigned char*); -ETERM *erl_decode(unsigned char*); -ETERM *erl_decode_buf(unsigned char**); -int erl_encode(ETERM*,unsigned char*t); -int erl_encode_buf(ETERM*,unsigned char**); -int erl_ext_size(unsigned char*); -unsigned char erl_ext_type(unsigned char*); /* Note: returned 'char' before R9C */ -unsigned char *erl_peek_ext(unsigned char*,int); -int erl_term_len(ETERM*); - -int cmp_latin1_vs_utf8(const char* sL, int lenL, const char* sU, int lenU); + unsigned int,unsigned char) EI_DEPRECATED_ATTR; +ETERM *erl_mk_string(const char*) EI_DEPRECATED_ATTR; +ETERM *erl_mk_tuple(ETERM**,int) EI_DEPRECATED_ATTR; +ETERM *erl_mk_uint(unsigned int) EI_DEPRECATED_ATTR; +ETERM *erl_mk_ulonglong(unsigned long long) EI_DEPRECATED_ATTR; +ETERM *erl_mk_var(const char*) EI_DEPRECATED_ATTR; +int erl_print_term(FILE*,const ETERM*) EI_DEPRECATED_ATTR; +/* int erl_sprint_term(char*,const ETERM*) EI_DEPRECATED_ATTR; */ +int erl_size(const ETERM*) EI_DEPRECATED_ATTR; +ETERM *erl_tl(const ETERM*) EI_DEPRECATED_ATTR; +ETERM *erl_var_content(const ETERM*, const char*) EI_DEPRECATED_ATTR; + +ETERM *erl_format(char*, ... ) EI_DEPRECATED_ATTR; +int erl_match(ETERM*, ETERM*) EI_DEPRECATED_ATTR; + +char **erl_global_names(int fd, int *count) EI_DEPRECATED_ATTR; +int erl_global_register(int fd, const char *name, ETERM *pid) EI_DEPRECATED_ATTR; +int erl_global_unregister(int fd, const char *name) EI_DEPRECATED_ATTR; +ETERM *erl_global_whereis(int fd, const char *name, char *node) EI_DEPRECATED_ATTR; + +void erl_init_malloc(Erl_Heap*,long) EI_DEPRECATED_ATTR; +ETERM *erl_alloc_eterm(unsigned char) EI_DEPRECATED_ATTR; +void erl_eterm_release(void) EI_DEPRECATED_ATTR; +void erl_eterm_statistics(unsigned long*,unsigned long*) EI_DEPRECATED_ATTR; +void erl_free_array(ETERM**,int) EI_DEPRECATED_ATTR; +void erl_free_term(ETERM*) EI_DEPRECATED_ATTR; +void erl_free_compound(ETERM*) EI_DEPRECATED_ATTR; +void *erl_malloc(long) EI_DEPRECATED_ATTR; +void erl_free(void*) EI_DEPRECATED_ATTR; + +int erl_compare_ext(unsigned char*, unsigned char*) EI_DEPRECATED_ATTR; +ETERM *erl_decode(unsigned char*) EI_DEPRECATED_ATTR; +ETERM *erl_decode_buf(unsigned char**) EI_DEPRECATED_ATTR; +int erl_encode(ETERM*,unsigned char*t) EI_DEPRECATED_ATTR; +int erl_encode_buf(ETERM*,unsigned char**) EI_DEPRECATED_ATTR; +int erl_ext_size(unsigned char*) EI_DEPRECATED_ATTR; +unsigned char erl_ext_type(unsigned char*) EI_DEPRECATED_ATTR; /* Note: returned 'char' before R9C */ +unsigned char *erl_peek_ext(unsigned char*,int) EI_DEPRECATED_ATTR; +int erl_term_len(ETERM*) EI_DEPRECATED_ATTR; + +int cmp_latin1_vs_utf8(const char* sL, int lenL, const char* sU, int lenU) EI_DEPRECATED_ATTR; /* -------------------------------------------------------------------- */ /* Wrappers around ei functions */ @@ -437,29 +442,29 @@ int cmp_latin1_vs_utf8(const char* sL, int lenL, const char* sU, int lenU); * Undocumented before R9C, included for compatibility with old code */ -struct hostent *erl_gethostbyname(const char *name); -struct hostent *erl_gethostbyaddr(const char *addr, int len, int type); +struct hostent *erl_gethostbyname(const char *name) EI_DEPRECATED_ATTR; +struct hostent *erl_gethostbyaddr(const char *addr, int len, int type) EI_DEPRECATED_ATTR; struct hostent *erl_gethostbyname_r(const char *name, struct hostent *hostp, char *buffer, int buflen, - int *h_errnop); + int *h_errnop) EI_DEPRECATED_ATTR; struct hostent *erl_gethostbyaddr_r(const char *addr, int length, int type, struct hostent *hostp, char *buffer, int buflen, - int *h_errnop); + int *h_errnop) EI_DEPRECATED_ATTR; /* * Undocumented, included for compatibility with old code */ -void erl_init_resolve(void); -int erl_distversion(int fd); -int erl_epmd_connect(struct in_addr *inaddr); -int erl_epmd_port(struct in_addr *inaddr, const char *alive, int *dist); +void erl_init_resolve(void) EI_DEPRECATED_ATTR; +int erl_distversion(int fd) EI_DEPRECATED_ATTR; +int erl_epmd_connect(struct in_addr *inaddr) EI_DEPRECATED_ATTR; +int erl_epmd_port(struct in_addr *inaddr, const char *alive, int *dist) EI_DEPRECATED_ATTR; #ifdef __cplusplus } diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in index b0bb9bfadf..69b2cbc281 100644 --- a/lib/erl_interface/src/Makefile.in +++ b/lib/erl_interface/src/Makefile.in @@ -116,7 +116,7 @@ else AR_FLAGS=rcv endif -INCFLAGS = -I. -I../include -Iconnect -Iencode -Idecode -Imisc -Iepmd \ +INCFLAGS = -I. -I../include -I../include/$(TARGET) -Iconnect -Iencode -Idecode -Imisc -Iepmd \ -Iregistry -I$(TARGET) ifeq ($(USING_VC),yes) @@ -125,6 +125,8 @@ else WARNFLAGS = @WFLAGS@ endif +WARNFLAGS += -DEI_NO_DEPR_WARN + CFLAGS = @LIB_CFLAGS@ $(WARNFLAGS) $(INCFLAGS) $(TYPE_FLAGS) PROG_CFLAGS = @CFLAGS@ $(WARNFLAGS) $(INCFLAGS) $(TYPE_FLAGS) -Ilegacy @@ -318,7 +320,8 @@ HEADERS = \ ../include/ei.h \ ../include/ei_connect.h \ ../include/eicode.h \ - ../include/erl_interface.h + ../include/erl_interface.h \ + ../include/$(TARGET)/ei_config.h EISOURCES = \ $(CONNECTSRC) \ diff --git a/lib/erl_interface/src/misc/eidef.h b/lib/erl_interface/src/misc/eidef.h index f38824d826..083814c6e9 100644 --- a/lib/erl_interface/src/misc/eidef.h +++ b/lib/erl_interface/src/misc/eidef.h @@ -25,6 +25,7 @@ /* Common definitions used in ei user interface */ +#define EI_INCLUDED_CONFIG_H__ #include "config.h" /* Central include of config.h */ /* vxWorks.h needs to be before stddef.h */ diff --git a/lib/erl_interface/test/all_SUITE_data/Makefile.src b/lib/erl_interface/test/all_SUITE_data/Makefile.src index 4f27b097c8..57e522fd3e 100644 --- a/lib/erl_interface/test/all_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/all_SUITE_data/Makefile.src @@ -21,8 +21,8 @@ include @erl_interface_mk_include@ CC0 = @CC@ CC = .@DS@gccifier@exe@ -CC"$(CC0)" -CFLAGS0 = @CFLAGS@ -I@erl_interface_include@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ +CFLAGS0 = @CFLAGS@ -I@erl_interface_include@ @erl_interface_target_include@ +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ EI_COMMON_OBJS = runner@obj@ ei_runner@obj@ ALL_OBJS = gccifier@exe@ $(EI_COMMON_OBJS) diff --git a/lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src index 10ef437f8b..76dc84221f 100644 --- a/lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/ei_accept_SUITE_data/Makefile.src @@ -27,7 +27,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \ $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EI_ACCEPT_OBJS = ei_accept_test@obj@ ei_accept_test_decl@obj@ EIACCNODE_OBJS = eiaccnode@obj@ diff --git a/lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src index c2d8261dd8..d1694e607d 100644 --- a/lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/ei_connect_SUITE_data/Makefile.src @@ -28,7 +28,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \ $(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EI_CONNECT_OBJS = ei_connect_test@obj@ ei_connect_test_decl@obj@ EINODE_OBJS = einode@obj@ diff --git a/lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src index e678914a40..76591d893c 100644 --- a/lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/ei_decode_SUITE_data/Makefile.src @@ -27,7 +27,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \ $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EI_DECODE_OBJS = ei_decode_test@obj@ ei_decode_test_decl@obj@ all: ei_decode_test@exe@ diff --git a/lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src index 853fe9ddeb..3f5fa4f295 100644 --- a/lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/ei_decode_encode_SUITE_data/Makefile.src @@ -27,7 +27,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \ $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EI_DECODE_ENCODE_OBJS = ei_decode_encode_test@obj@ ei_decode_encode_test_decl@obj@ all: ei_decode_encode_test@exe@ diff --git a/lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src index 3b2cab7af4..489382d85e 100644 --- a/lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/ei_encode_SUITE_data/Makefile.src @@ -27,7 +27,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \ $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EI_ENCODE_OBJS = ei_encode_test@obj@ ei_encode_test_decl@obj@ all: ei_encode_test@exe@ diff --git a/lib/erl_interface/test/ei_format_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_format_SUITE_data/Makefile.src index b89dcae45a..9e5a271db6 100644 --- a/lib/erl_interface/test/ei_format_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/ei_format_SUITE_data/Makefile.src @@ -27,7 +27,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \ $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EI_FORMAT_OBJS = ei_format_test@obj@ ei_format_test_decl@obj@ all: ei_format_test@exe@ diff --git a/lib/erl_interface/test/ei_print_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_print_SUITE_data/Makefile.src index 150c11b99c..354011f1a5 100644 --- a/lib/erl_interface/test/ei_print_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/ei_print_SUITE_data/Makefile.src @@ -27,7 +27,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \ $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EI_PRINT_OBJS = ei_print_test@obj@ ei_print_test_decl@obj@ all: ei_print_test@exe@ diff --git a/lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src b/lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src index b4ee361939..76a9c6a606 100644 --- a/lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/ei_tmo_SUITE_data/Makefile.src @@ -27,7 +27,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/ei_runner@obj@ \ $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EI_TMO_OBJS = ei_tmo_test@obj@ ei_tmo_test_decl@obj@ all: ei_tmo_test@exe@ diff --git a/lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src index ff4c382c97..19b076794a 100644 --- a/lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/erl_connect_SUITE_data/Makefile.src @@ -28,7 +28,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/runner@obj@ \ $(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data OBJS = erl_connect_test@obj@ erl_connect_test_decl@obj@ all: erl_connect_test@exe@ diff --git a/lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src index 4b1ddf77b6..cd4de56d7c 100644 --- a/lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/erl_eterm_SUITE_data/Makefile.src @@ -28,7 +28,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/runner@obj@ \ $(LIBERL) $(LIBEI) @erl_interface_sock_libs@ @LIBS@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data ETERM_OBJS = eterm_test@obj@ eterm_test_decl@obj@ CNODE_OBJS = cnode@obj@ PRINT_OBJS = print_term@obj@ diff --git a/lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src index fe8caebbd6..50b60637cd 100644 --- a/lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/erl_ext_SUITE_data/Makefile.src @@ -28,7 +28,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/runner@obj@ \ $(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data EXT_OBJS = ext_test@obj@ ext_test_decl@obj@ all: ext_test@exe@ diff --git a/lib/erl_interface/test/erl_format_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_format_SUITE_data/Makefile.src index 2ba59ab651..7d51cd6007 100644 --- a/lib/erl_interface/test/erl_format_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/erl_format_SUITE_data/Makefile.src @@ -28,7 +28,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/runner@obj@ \ $(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data FORMAT_OBJS = format_test@obj@ format_test_decl@obj@ all: format_test@exe@ diff --git a/lib/erl_interface/test/erl_global_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_global_SUITE_data/Makefile.src index 1c1530d1b6..9f2a8619ac 100644 --- a/lib/erl_interface/test/erl_global_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/erl_global_SUITE_data/Makefile.src @@ -28,7 +28,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/runner@obj@ \ $(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data OBJS = erl_global_test@obj@ erl_global_test_decl@obj@ all: erl_global_test@exe@ diff --git a/lib/erl_interface/test/erl_match_SUITE_data/Makefile.src b/lib/erl_interface/test/erl_match_SUITE_data/Makefile.src index 156214a269..56ed1df203 100644 --- a/lib/erl_interface/test/erl_match_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/erl_match_SUITE_data/Makefile.src @@ -28,7 +28,7 @@ LIBEI = @erl_interface_eilib@ LIBFLAGS = ../all_SUITE_data/runner@obj@ \ $(LIBERL) $(LIBEI) @LIBS@ @erl_interface_sock_libs@ \ @erl_interface_threadlib@ -CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ -I../all_SUITE_data +CFLAGS = @EI_CFLAGS@ $(THR_DEFS) -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data MATCH_OBJS = match_test@obj@ match_test_decl@obj@ all: match_test@exe@ diff --git a/lib/erl_interface/test/port_call_SUITE_data/Makefile.src b/lib/erl_interface/test/port_call_SUITE_data/Makefile.src index 0f97ce9f70..e09e0fe175 100644 --- a/lib/erl_interface/test/port_call_SUITE_data/Makefile.src +++ b/lib/erl_interface/test/port_call_SUITE_data/Makefile.src @@ -27,7 +27,7 @@ LIBERL = @erl_interface_lib_drv@ LIBEI = @erl_interface_eilib_drv@ SHLIB_EXTRA_LDLIBS = $(LIBERL) $(LIBEI) @erl_interface_threadlib@ -SHLIB_EXTRA_CFLAGS = -I@erl_interface_include@ -I../all_SUITE_data +SHLIB_EXTRA_CFLAGS = -I@erl_interface_include@ @erl_interface_target_include@ -I../all_SUITE_data all: port_call_drv@dll@ diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in index 784e73c47e..294d832797 100644 --- a/lib/odbc/c_src/Makefile.in +++ b/lib/odbc/c_src/Makefile.in @@ -52,7 +52,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/odbc-$(VSN) # Target Specs # ---------------------------------------------------- EI_ROOT = $(ERL_TOP)/lib/erl_interface -EI_INCLUDE = -I$(EI_ROOT)/include +EI_INCLUDE = -I$(EI_ROOT)/include -I$(EI_ROOT)/include/$(TARGET) ifeq ($(findstring win32,$(TARGET)),win32) EI_LIB = -lerl_interface_md -lei_md ENTRY_OBJ=$(ERL_TOP)/erts/obj/$(TARGET)/port_entry.o diff --git a/system/doc/Makefile b/system/doc/Makefile index 0c4adf6554..8f2faeee04 100644 --- a/system/doc/Makefile +++ b/system/doc/Makefile @@ -24,6 +24,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk # SUB_DIRECTORIES = design_principles \ + general_info \ getting_started \ system_architecture_intro \ embedded \ diff --git a/system/doc/general_info/Makefile b/system/doc/general_info/Makefile new file mode 100644 index 0000000000..70db7c525a --- /dev/null +++ b/system/doc/general_info/Makefile @@ -0,0 +1,100 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 1996-2018. 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% +# +# +include $(ERL_TOP)/make/target.mk +include $(ERL_TOP)/make/$(TARGET)/otp.mk + +# ---------------------------------------------------- +# Application version +# ---------------------------------------------------- +include $(ERL_TOP)/erts/vsn.mk +#VSN=$(SYSTEM_VSN) + +APPLICATION=otp-system-documentation +XMLDIR := $(XMLDIR)/general_info +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- +RELSYSDIR = "$(RELEASE_PATH)/doc/general_info" + +# ---------------------------------------------------- +# Target Specs +# ---------------------------------------------------- +XML_PART_FILES = part.xml + +include xmlfiles.mk + +XML_CHAPTER_FILES=$(GENERAL_INFO_CHAPTER_FILES) + +TOPDOCDIR=.. + +BOOK_FILES = book.xml + +GIF_FILES = + +XML_FILES = \ + $(BOOK_FILES) $(XML_CHAPTER_FILES) \ + $(XML_PART_FILES) + +# ---------------------------------------------------- + +HTMLDIR = ../html/general_info + +HTML_UG_FILE = $(HTMLDIR)/users_guide.html + +# ---------------------------------------------------- +# FLAGS +# ---------------------------------------------------- +XML_FLAGS += +DVIPS_FLAGS += + +# ---------------------------------------------------- +# Targets +# ---------------------------------------------------- +_create_dirs := $(shell mkdir -p $(HTMLDIR)) + +docs: html + +local_docs: PDFDIR=../../pdf + +html: $(GIF_FILES) $(HTML_UG_FILE) + +debug opt: + +clean clean_docs: + rm -rf $(HTMLDIR) + rm -rf $(XMLDIR) + rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) + rm -f errs core *~ + +# ---------------------------------------------------- +# Release Target +# ---------------------------------------------------- +include $(ERL_TOP)/make/otp_release_targets.mk + +release_docs_spec: docs +# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf" +# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf" + $(INSTALL_DIR) $(RELSYSDIR) + $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \ + $(RELSYSDIR) + +release_spec: + diff --git a/system/doc/general_info/book.xml b/system/doc/general_info/book.xml new file mode 100644 index 0000000000..ca9b5fae39 --- /dev/null +++ b/system/doc/general_info/book.xml @@ -0,0 +1,44 @@ + + + + +
+ + 2019 + Ericsson AB. 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. + + + + General Information + OTP Team + + 2019-02-23 + + book.xml +
+ + + General Information + + + + + + + + +
+ diff --git a/system/doc/general_info/deprecations.xml b/system/doc/general_info/deprecations.xml new file mode 100644 index 0000000000..ccfd553bad --- /dev/null +++ b/system/doc/general_info/deprecations.xml @@ -0,0 +1,77 @@ + + + + +
+ + 2019 + Ericsson AB. 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. + + + + Deprecations + + + + + deprecations.xml +
+
+ Introduction +

This document aim to list all deprecated functionality in Erlang/OTP. It + was introduced as of OTP 22, and have not yet been updated with all old + deprecations. Deprecations made in other parts of the documentation are of + course still valid. For more information regarding the strategy regarding + deprecations see the documentation of + Support, Compatibility, + Deprecations, and Removal.

+
+
+ + OTP 22 +
+ VxWorks Support +

Some parts of OTP has had limited VxWorks support, such as for + example erl_interface. + This support is now deprecated and has also been + scheduled for removal.

+
+
+ Legacy parts of erl_interface +

The old legacy erl_interface + library (functions with prefix erl_) is deprecated as of OTP 22. These + parts of erl_interface has been informally deprecated + for a very long time. You typically want to replace the usage of + the erl_interface library with the use of the ei library + which also is part of the erl_interface application. The old legacy + erl_interface + library has also been scheduled + for removal.

+
+
+
+ + OTP 18 +
+ erlang:now() +

New time functionality and a new time API was introduced. For more information + see the Time and Time Correction + chapter in the ERTS User's guide and specifically the + Dos and Donts + section on how to replace usage of erlang:now().

+
+
+
diff --git a/system/doc/general_info/part.xml b/system/doc/general_info/part.xml new file mode 100644 index 0000000000..fead7d58e7 --- /dev/null +++ b/system/doc/general_info/part.xml @@ -0,0 +1,34 @@ + + + + +
+ + 2019 + Ericsson AB. 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. + + + + General Information + OTP Team + + 2019-02-23 + + part.xml +
+ + +
diff --git a/system/doc/general_info/scheduled_for_removal.xml b/system/doc/general_info/scheduled_for_removal.xml new file mode 100644 index 0000000000..a9421df385 --- /dev/null +++ b/system/doc/general_info/scheduled_for_removal.xml @@ -0,0 +1,61 @@ + + + + +
+ + 2019 + Ericsson AB. 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. + + + + Scheduled for Removal + + + + + scheduled_for_removal.xml +
+
+ Introduction +

This document list all functionality in Erlang/OTP that currently are + scheduled for removal. For more information regarding the strategy regarding + removal of functionality see the documentation of + Support, Compatibility, + Deprecations, and Removal.

+
+
+ + OTP 23 +
+ VxWorks Support +

Some parts of OTP has had limited VxWorks support, such as for + example erl_interface. + This support will be removed as of OTP 23. This limited support + was formally deprecated as of OTP 22

+
+
+ Legacy parts of erl_interface +

The old legacy erl_interface + library (functions with prefix erl_) will be removed as of + OTP 23. These parts of erl_interface has been informally deprecated + for a very long time, and was formally deprecated in OTP 22. You typically + want to replace the usage of the erl_interface library with the use + of the ei library which also is part of the erl_interface + application.

+
+
+
diff --git a/system/doc/general_info/xmlfiles.mk b/system/doc/general_info/xmlfiles.mk new file mode 100644 index 0000000000..eab1632a4f --- /dev/null +++ b/system/doc/general_info/xmlfiles.mk @@ -0,0 +1,22 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2009-2018. 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% +# +GENERAL_INFO_CHAPTER_FILES = \ + deprecations.xml \ + scheduled_for_removal.xml diff --git a/system/doc/system_principles/misc.xml b/system/doc/system_principles/misc.xml index dd6c2a1336..ed3675d180 100644 --- a/system/doc/system_principles/misc.xml +++ b/system/doc/system_principles/misc.xml @@ -33,6 +33,14 @@ misc.xml +
+ Introduction +

This document describes strategy regarding supported Releases, + compatibility, deprecations and removal of functionality. This + document was introduced in OTP 21. Actions taken regarding these + issues before OTP 21 did not adhere this document.

+
+
Supported Releases diff --git a/system/doc/top/Makefile b/system/doc/top/Makefile index 0703b821f1..65d2fcfb6b 100644 --- a/system/doc/top/Makefile +++ b/system/doc/top/Makefile @@ -39,6 +39,7 @@ INFO_FILES = ../../../README.md ../../COPYRIGHT PR.template TOPDOCDIR=. +include ../general_info/xmlfiles.mk include ../installation_guide/xmlfiles.mk include ../system_principles/xmlfiles.mk include ../embedded/xmlfiles.mk @@ -56,6 +57,7 @@ XML_FILES = \ $(BOOK_FILES) XML_GUIDE_FILES = \ + $(GENERAL_INFO_CHAPTER_FILES:%=general_info/%) \ $(INST_GUIDE_CHAPTER_FILES:%=installation_guide/%) \ $(INST_GUIDE_CHAPTER_GEN_FILES:%=installation_guide/%) \ $(SYSTEM_PRINCIPLES_CHAPTER_FILES:%=system_principles/%) \ @@ -79,6 +81,7 @@ XML_GUIDE_FILES = \ XML_GEN_FILES = \ $(XML_GUIDE_FILES:%=$(XMLDIR)/%) \ + $(XMLDIR)/general_info/part.xml \ $(XMLDIR)/installation_guide/part.xml \ $(XMLDIR)/system_principles/part.xml \ $(XMLDIR)/embedded/part.xml \ @@ -91,7 +94,7 @@ XML_GEN_FILES = \ $(XMLDIR)/oam/part.xml -XMLLINT_SRCDIRS= $(XMLDIR)/installation_guide:$(XMLDIR)/system_principles:$(XMLDIR)/embedded:$(XMLDIR)/getting_started:$(XMLDIR)/reference_manual:$(XMLDIR)/programming_examples:$(XMLDIR)/efficiency_guide:$(XMLDIR)/tutorial:$(XMLDIR)/design_principles:$(XMLDIR)/oam +XMLLINT_SRCDIRS= $(XMLDIR)/general_info:$(XMLDIR)/installation_guide:$(XMLDIR)/system_principles:$(XMLDIR)/embedded:$(XMLDIR)/getting_started:$(XMLDIR)/reference_manual:$(XMLDIR)/programming_examples:$(XMLDIR)/efficiency_guide:$(XMLDIR)/tutorial:$(XMLDIR)/design_principles:$(XMLDIR)/oam HTMLDIR= ../html PDFREFDIR= pdf diff --git a/system/doc/top/book.xml b/system/doc/top/book.xml index 61e75591ef..64c1e4caf6 100644 --- a/system/doc/top/book.xml +++ b/system/doc/top/book.xml @@ -36,6 +36,7 @@ + diff --git a/system/doc/top/templates/index.html.src b/system/doc/top/templates/index.html.src index 747d19cf7e..3b61052b99 100644 --- a/system/doc/top/templates/index.html.src +++ b/system/doc/top/templates/index.html.src @@ -41,6 +41,8 @@ limitations under the License.
    -- cgit v1.2.3