diff options
author | Rickard Green <[email protected]> | 2019-02-25 11:20:52 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2019-02-25 11:20:52 +0100 |
commit | 5045fe8660545754ab5ec6bb3cbcf3a8ff7d9697 (patch) | |
tree | 6073545f9b4a579e3299b0d36f9aeacfc4d0d64b | |
parent | 2c06e174d6515b6a842906de9e6ebc70bd2f2ec0 (diff) | |
parent | 00fa7a8def826d2a4c8fb9e2c38208103bf04341 (diff) | |
download | otp-5045fe8660545754ab5ec6bb3cbcf3a8ff7d9697.tar.gz otp-5045fe8660545754ab5ec6bb3cbcf3a8ff7d9697.tar.bz2 otp-5045fe8660545754ab5ec6bb3cbcf3a8ff7d9697.zip |
Merge branch 'rickard/deprecations-removals'
OTP-15621 OTP-15622
* rickard/deprecations-removals:
Document deprecations and removals
48 files changed, 635 insertions, 142 deletions
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 <sys/types.h> 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 @@ <lib>ei</lib> <libsummary>Routines for handling the Erlang binary term format.</libsummary> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <p>The library <c>ei</c> contains macros and functions to encode and decode the Erlang binary term format.</p> 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 @@ <lib>ei_connect</lib> <libsummary>Communicate with distributed Erlang.</libsummary> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <p>This module enables C-programs to communicate with Erlang nodes, using the Erlang distribution over TCP/IP.</p> 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 @@ -34,6 +34,18 @@ </header> <section> + <title>Deprecation and Removal</title> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> + </section> + + <section> <title>Introduction</title> <p>The <c>Erl_Interface</c> library contains functions that help you integrate programs written in C and Erlang. The functions in 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 @@ <lib>erl_connect</lib> <libsummary>Communicate with distributed Erlang.</libsummary> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> + <p>This module provides support for communication between distributed Erlang nodes and C-nodes, in a manner that is transparent to Erlang processes.</p> 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 @@ <lib>erl_eterm</lib> <libsummary>Functions for Erlang term construction.</libsummary> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> + <p>This module provides functions for creating and manipulating Erlang terms.</p> 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 @@ <lib>erl_global</lib> <libsummary>Access globally registered names.</libsummary> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> + <p>This module provides support for registering, looking up, and unregistering names in the <c>global</c> 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 @@ -58,6 +58,18 @@ </list> <section> + <title>Deprecation and Removal</title> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> + </section> + + <section> <title>Compiling and Linking Your Code</title> <p>In order to use any of the Erl_Interface functions, include the following lines in your code:</p> 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 @@ <lib>erl_malloc</lib> <libsummary>Memory allocation functions.</libsummary> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> <p>This module provides functions for allocating and deallocating memory.</p> </description> 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 @@ <lib>erl_marshal</lib> <libsummary>Encoding and decoding of Erlang terms.</libsummary> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> <p>This module contains functions for encoding Erlang terms into a sequence of bytes, and for decoding Erlang terms from a sequence of bytes.</p> 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 @@ <file>ref_man.xml</file> </header> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> </description> <xi:include href="ei.xml"/> <xi:include href="ei_connect.xml"/> 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 @@ <file>ref_man_ei.xml</file> </header> <description> - <p>The <c>ei</c> library is a <c>C</c> interface library for - communication with <c>Erlang</c>.</p> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> <note> <p>By default, the <c>ei</c> 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 @@ <file>ref_man_erl_interface.xml</file> </header> <description> + <note><p>The support for VxWorks is deprecated as of OTP 22, and + will be removed in OTP 23.</p></note> + <note><p>The old legacy <c>erl_interface</c> library (functions + with prefix <c>erl_</c>) is deprecated as of OTP 22, and will be + removed in OTP 23. This does not apply to the <c>ei</c> + library. Reasonably new <c>gcc</c> compilers will issue deprecation + warnings. In order to disable these warnings, define the macro + <c>EI_NO_DEPR_WARN</c>.</p></note> <p>The <c>erl_interface</c> library is a <c>C</c> interface library for communication with <c>Erlang</c>.</p> <note> 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 <netdb.h> #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 b05d494884..1b19a85f1e 100644 --- a/lib/erl_interface/src/Makefile.in +++ b/lib/erl_interface/src/Makefile.in @@ -118,7 +118,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) @@ -127,6 +127,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 @@ -320,7 +322,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 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE book SYSTEM "book.dtd"> + +<book xmlns:xi="http://www.w3.org/2001/XInclude"> + <header titlestyle="normal"> + <copyright> + <year>2019</year> + <holder>Ericsson AB. All Rights Reserved.</holder> + </copyright> + <legalnotice> + 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. + + </legalnotice> + + <title>General Information</title> + <prepared>OTP Team</prepared> + <docno></docno> + <date>2019-02-23</date> + <rev></rev> + <file>book.xml</file> + </header> + <insidecover> + </insidecover> + <pagetext>General Information</pagetext> + <preamble> + <contents level="2"></contents> + </preamble> + <parts lift="no"> + <xi:include href="part.xml"/> + </parts> + <listofterms></listofterms> + <index></index> +</book> + 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 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE chapter SYSTEM "chapter.dtd"> + +<chapter> + <header> + <copyright> + <year>2019</year> + <holder>Ericsson AB. All Rights Reserved.</holder> + </copyright> + <legalnotice> + 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. + + </legalnotice> + + <title>Deprecations</title> + <prepared></prepared> + <docno></docno> + <date></date> + <rev></rev> + <file>deprecations.xml</file> + </header> + <section> + <title>Introduction</title> + <p>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 + <seealso marker="../system_principles/misc#deprecation">Support, Compatibility, + Deprecations, and Removal</seealso>.</p> + </section> + <section> + <marker id="OTP-22"/> + <title>OTP 22</title> + <section> + <title>VxWorks Support</title> + <p>Some parts of OTP has had limited VxWorks support, such as for + example <seealso marker="erl_interface:index"><c>erl_interface</c></seealso>. + This support is now deprecated and has also been + <seealso marker="scheduled_for_removal#OTP-23">scheduled for removal</seealso>.</p> + </section> + <section> + <title>Legacy parts of erl_interface</title> + <p>The old legacy <seealso marker="erl_interface:index"><c>erl_interface</c></seealso> + library (functions with prefix <c>erl_</c>) is deprecated as of OTP 22. These + parts of <c>erl_interface</c> has been informally deprecated + for a very long time. You typically want to replace the usage of + the <c>erl_interface</c> library with the use of the <c>ei</c> library + which also is part of the <c>erl_interface</c> application. The old legacy + <seealso marker="erl_interface:index"><c>erl_interface</c></seealso> + library has also been <seealso marker="scheduled_for_removal#OTP-23">scheduled + for removal</seealso>.</p> + </section> + </section> + <section> + <marker id="OTP-18"/> + <title>OTP 18</title> + <section> + <title>erlang:now()</title> + <p>New time functionality and a new time API was introduced. For more information + see the <seealso marker="erts:time_correction">Time and Time Correction</seealso> + chapter in the ERTS User's guide and specifically the + <seealso marker="erts:time_correction#Dos_and_Donts">Dos and Donts</seealso> + section on how to replace usage of <c>erlang:now()</c>.</p> + </section> + </section> +</chapter> 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 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE part SYSTEM "part.dtd"> + +<part xmlns:xi="http://www.w3.org/2001/XInclude"> + <header> + <copyright> + <year>2019</year> + <holder>Ericsson AB. All Rights Reserved.</holder> + </copyright> + <legalnotice> + 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. + + </legalnotice> + + <title>General Information</title> + <prepared>OTP Team</prepared> + <docno></docno> + <date>2019-02-23</date> + <rev></rev> + <file>part.xml</file> + </header> + <xi:include href="deprecations.xml"/> + <xi:include href="scheduled_for_removal.xml"/> +</part> 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 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE chapter SYSTEM "chapter.dtd"> + +<chapter> + <header> + <copyright> + <year>2019</year> + <holder>Ericsson AB. All Rights Reserved.</holder> + </copyright> + <legalnotice> + 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. + + </legalnotice> + + <title>Scheduled for Removal</title> + <prepared></prepared> + <docno></docno> + <date></date> + <rev></rev> + <file>scheduled_for_removal.xml</file> + </header> + <section> + <title>Introduction</title> + <p>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 + <seealso marker="../system_principles/misc#removal">Support, Compatibility, + Deprecations, and Removal</seealso>.</p> + </section> + <section> + <marker id="OTP-23"/> + <title>OTP 23</title> + <section> + <title>VxWorks Support</title> + <p>Some parts of OTP has had limited VxWorks support, such as for + example <seealso marker="erl_interface:index"><c>erl_interface</c></seealso>. + This support will be removed as of OTP 23. This limited support + was formally deprecated as of OTP 22</p> + </section> + <section> + <title>Legacy parts of erl_interface</title> + <p>The old legacy <seealso marker="erl_interface:index"><c>erl_interface</c></seealso> + library (functions with prefix <c>erl_</c>) will be removed as of + OTP 23. These parts of <c>erl_interface</c> 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 <c>erl_interface</c> library with the use + of the <c>ei</c> library which also is part of the <c>erl_interface</c> + application.</p> + </section> + </section> +</chapter> 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 @@ -34,6 +34,14 @@ </header> <section> + <title>Introduction</title> + <p>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.</p> + </section> + + <section> <marker id="supported_releases"/> <title>Supported Releases</title> <p> 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 @@ <contents level="2"></contents> </preamble> <parts lift="no"> + <xi:include href="../xml/general_info/part.xml"/> <xi:include href="../xml/installation_guide/part.xml"/> <xi:include href="../xml/system_principles/part.xml"/> <xi:include href="../xml/embedded/part.xml"/> 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. <ul class="section-links"> <li><a href="applications.html">Applications</a></li> <li><a href="man_index.html" class="modules">Modules</a></li> + <li><a href="general_info/deprecations.html" class="modules">Deprecations</a></li> + <li><a href="general_info/scheduled_for_removal.html" class="modules">Scheduled for Removal</a></li> </ul> <ul class="expand-collapse-items"> |