diff options
Diffstat (limited to 'erts')
-rw-r--r-- | erts/configure.in | 71 | ||||
-rw-r--r-- | erts/doc/src/alt_dist.xml | 22 | ||||
-rw-r--r-- | erts/doc/src/crash_dump.xml | 8 | ||||
-rw-r--r-- | erts/doc/src/driver.xml | 142 | ||||
-rw-r--r-- | erts/doc/src/driver_entry.xml | 8 | ||||
-rw-r--r-- | erts/doc/src/erlang.xml | 24 | ||||
-rw-r--r-- | erts/doc/src/erlsrv.xml | 22 | ||||
-rw-r--r-- | erts/doc/src/escript.xml | 20 | ||||
-rw-r--r-- | erts/doc/src/inet_cfg.xml | 13 | ||||
-rw-r--r-- | erts/doc/src/match_spec.xml | 40 | ||||
-rw-r--r-- | erts/doc/src/notes.xml | 20 | ||||
-rw-r--r-- | erts/doc/src/tty.xml | 8 | ||||
-rw-r--r-- | erts/doc/src/zlib.xml | 24 | ||||
-rw-r--r-- | erts/emulator/beam/erl_db.c | 10 | ||||
-rw-r--r-- | erts/emulator/beam/erl_db_hash.c | 10 | ||||
-rw-r--r-- | erts/emulator/beam/erl_lock_count.c | 10 | ||||
-rw-r--r-- | erts/emulator/beam/erl_lock_count.h | 10 | ||||
-rw-r--r-- | erts/emulator/beam/io.c | 10 | ||||
-rw-r--r-- | erts/etc/common/escript.c | 36 | ||||
-rw-r--r-- | erts/etc/unix/Install.src | 2 |
20 files changed, 293 insertions, 217 deletions
diff --git a/erts/configure.in b/erts/configure.in index a3b6fe319f..5fa1245b13 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -226,6 +226,19 @@ AC_ARG_ENABLE(m64-build, esac ],enable_m64_build=no) +AC_ARG_ENABLE(m32-build, +[ --enable-m32-build build 32bit binaries using the -m32 flag to (g)cc], +[ case "$enableval" in + no) enable_m32_build=no ;; + *) + if test X${enable_darwin_64bit} = Xyes -o X${enable_m64_build} = Xyes; + then + AC_MSG_ERROR([(--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive]) ; + fi ; + enable_m32_build=yes ;; + esac +],enable_m32_build=no) + AC_ARG_ENABLE(fixalloc, [ --disable-fixalloc disable the use of fix_alloc]) if test x${enable_fixalloc} = xno ; then @@ -335,6 +348,17 @@ else esac ;; *) + if test X${enable_m32_build} = Xyes; + then + enable_hipe=no; + case $CFLAGS in + *-m32*) + ;; + *) + CFLAGS="-m32 $CFLAGS" + ;; + esac ; + fi ;; esac fi @@ -432,6 +456,35 @@ CFLAGS="$CFLAGS $extra_flags" DEBUG_CFLAGS="-g $CPPFLAGS $extra_flags" DEBUG_FLAGS=-g +dnl +dnl Adjust DEBUG_CFLAGS to match CFLAGS in terms of -m +dnl + +case $CFLAGS in + *-m64*) + case $DEBUG_CFLAGS in + *-m64*) + ;; + *) + DEBUG_CFLAGS="-m64 $DEBUG_CFLAGS" + ;; + esac + ;; + *-m32*) + case $DEBUG_CFLAGS in + *-m32*) + ;; + *) + DEBUG_CFLAGS="-m32 $DEBUG_CFLAGS" + ;; + esac + ;; + *) + ;; +esac + + + CFLAG_RUNTIME_LIBRARY_PATH="-Wl,-R" case $host_os in darwin*) @@ -664,6 +717,16 @@ case $ARCH-$OPSYS in LDFLAGS="-m64 $LDFLAGS" ;; esac + fi; + if test X${enable_m32_build} = Xyes; then + AC_MSG_NOTICE([Adjusting LDFLAGS to use -m32]) ; + case $LDFLAGS in + *-m32*) + ;; + *) + LDFLAGS="-m32 $LDFLAGS" + ;; + esac ; fi ;; esac @@ -1378,7 +1441,7 @@ AC_CHECK_HEADER(sys/devpoll.h, have_kernel_poll=/dev/poll) dnl Check for kernel SCTP support AC_SUBST(LIBSCTP) -if test "x$enable_sctp" == "xyes" ; then +if test "x$enable_sctp" = "xyes" ; then AC_CHECK_HEADER(netinet/sctp.h, [LIBSCTP=libsctp.so.1 AC_DEFINE(HAVE_SCTP_H, [1], @@ -3220,6 +3283,9 @@ case $host_os in DED_LDFLAGS="-shared -Wl,-Bsymbolic" if test X${enable_m64_build} = Xyes; then DED_LDFLAGS="-m64 $DED_LDFLAGS" + fi; + if test X${enable_m32_build} = Xyes; then + DED_LDFLAGS="-m32 $DED_LDFLAGS" fi ;; freebsd*) @@ -3228,6 +3294,9 @@ case $host_os in DED_LDFLAGS="-shared" if test X${enable_m64_build} = Xyes; then DED_LDFLAGS="-m64 $DED_LDFLAGS" + fi; + if test X${enable_m32_build} = Xyes; then + DED_LDFLAGS="-m32 $DED_LDFLAGS" fi ;; osf*) diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml index 9a68b3cf40..a929aec97f 100644 --- a/erts/doc/src/alt_dist.xml +++ b/erts/doc/src/alt_dist.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2000</year><year>2009</year> + <year>2000</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>How to implement an alternative carrier for the Erlang distribution</title> @@ -939,7 +939,7 @@ connection that is not functioning.</item> <item>'R': Get creation number of listen socket, which is used to dig out the number stored in the lock file to differentiate - between invocations of Erlang nodes with the same name.\011 </item> + between invocations of Erlang nodes with the same name.</item> </list> <p>The control interface gets a buffer to return its value in, but is free to allocate it's own buffer is the provided one is @@ -949,11 +949,11 @@ ( 2) char* buf, int count, char** res, int res_size) ( 3) { ( 4) /* Local macro to ensure large enough buffer. */ -( 5) #define ENSURE(N) \\ -( 6) do { \\ -( 7) if (res_size < N) { \\ -( 8) *res = ALLOC(N); \\ -( 9) } \\ +( 5) #define ENSURE(N) \ +( 6) do { \ +( 7) if (res_size < N) { \ +( 8) *res = ALLOC(N); \ +( 9) } \ (10) } while(0) (11) UdsData *ud = (UdsData *) handle; @@ -1075,7 +1075,7 @@ Eshell V5.0 (abort with ^G) (bing@hador)2></pre> <p>...</p> <pre> -$ <input>erl -pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin -proto_dist uds \\ </input> +$ <input>erl -pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin -proto_dist uds \ </input> <input> -no_epmd -sname bong</input> Erlang (BEAM) emulator version 5.0 @@ -1084,7 +1084,7 @@ Eshell V5.0 (abort with ^G) <p>One can utilize the ERL_FLAGS environment variable to store the complicated parameters in:</p> <pre> -$ <input>ERL_FLAGS=-pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin \\ </input> +$ <input>ERL_FLAGS=-pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin \ </input> <input> -proto_dist uds -no_epmd</input> $ <input>export ERL_FLAGS</input> $ <input>erl -sname bang</input> diff --git a/erts/doc/src/crash_dump.xml b/erts/doc/src/crash_dump.xml index 5182929358..b3c4671c3d 100644 --- a/erts/doc/src/crash_dump.xml +++ b/erts/doc/src/crash_dump.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>1999</year><year>2009</year> + <year>1999</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>How to interpret the Erlang crash dumps</title> @@ -96,7 +96,7 @@ allocators see <seealso marker="erts_alloc">erts_alloc(3)</seealso>.</item> <item>"<em><A></em>: Cannot reallocate <em><N></em> - bytes of memory\011(of type "<em><T></em>")." - Same as + bytes of memory (of type "<em><T></em>")." - Same as above with the exception that memory was being reallocated instead of being allocated when the system ran out of memory.</item> <item>"Unexpected op code <em>N</em>" - Error in compiled diff --git a/erts/doc/src/driver.xml b/erts/doc/src/driver.xml index c396ee0b90..12c79aee90 100644 --- a/erts/doc/src/driver.xml +++ b/erts/doc/src/driver.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2001</year><year>2009</year> + <year>2001</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>How to implement a driver</title> @@ -510,11 +510,11 @@ static int do_select(const char* s, our_data_t* data) PGconn* conn = data->conn; /* if there's an error return it now */ if (PQsendQuery(conn, s) == 0) { -\011ei_x_buff x; -\011ei_x_new_with_version(&x); -\011encode_error(&x, conn); -\011driver_output(data->port, x.buff, x.index); -\011ei_x_free(&x); + ei_x_buff x; + ei_x_new_with_version(&x); + encode_error(&x, conn); + driver_output(data->port, x.buff, x.index); + ei_x_free(&x); } /* else wait for ready_output to get results */ return 0; @@ -532,31 +532,31 @@ static void ready_io(ErlDrvData drv_data, ErlDrvEvent event) ei_x_buff x; ei_x_new_with_version(&x); if (data->connecting) { -\011ConnStatusType status; -\011PQconnectPoll(conn); -\011status = PQstatus(conn); -\011if (status == CONNECTION_OK) -\011 encode_ok(&x); -\011else if (status == CONNECTION_BAD) -\011 encode_error(&x, conn); + ConnStatusType status; + PQconnectPoll(conn); + status = PQstatus(conn); + if (status == CONNECTION_OK) + encode_ok(&x); + else if (status == CONNECTION_BAD) + encode_error(&x, conn); } else { -\011PQconsumeInput(conn); -\011if (PQisBusy(conn)) -\011 return; -\011res = PQgetResult(conn); -\011encode_result(&x, res, conn); -\011PQclear(res); -\011for (;;) { -\011 res = PQgetResult(conn); -\011 if (res == NULL) -\011\011break; -\011 PQclear(res); -\011} + PQconsumeInput(conn); + if (PQisBusy(conn)) + return; + res = PQgetResult(conn); + encode_result(&x, res, conn); + PQclear(res); + for (;;) { + res = PQgetResult(conn); + if (res == NULL) + break; + PQclear(res); + } } if (x.index > 1) { -\011driver_output(data->port, x.buff, x.index); -\011if (data->connecting) -\011 driver_select(data->port, (ErlDrvEvent)data->socket, DO_WRITE, 0); + driver_output(data->port, x.buff, x.index); + if (data->connecting) + driver_select(data->port, (ErlDrvEvent)data->socket, DO_WRITE, 0); } ei_x_free(&x); } @@ -592,17 +592,17 @@ static void ready_io(ErlDrvData drv_data, ErlDrvEvent event) connect(ConnectStr) -> case erl_ddll:load_driver(".", "pg_async") of -\011ok -> ok; -\011{error, already_loaded} -> ok; -\011_ -> exit({error, could_not_load_driver}) + ok -> ok; + {error, already_loaded} -> ok; + _ -> exit({error, could_not_load_driver}) end, Port = open_port({spawn, ?MODULE}, [binary]), port_control(Port, ?DRV_CONNECT, ConnectStr), case return_port_data(Port) of -\011ok -> -\011 {ok, Port}; -\011Error -> -\011 Error + ok -> + {ok, Port}; + Error -> + Error end. disconnect(Port) -> @@ -617,8 +617,8 @@ select(Port, Query) -> return_port_data(Port) -> receive -\011{Port, {data, Data}} -> -\011 binary_to_term(Data) + {Port, {data, Data}} -> + binary_to_term(Data) end. ]]></code> <p>The Erlang code is slightly different, this is because we @@ -662,22 +662,22 @@ return_port_data(Port) -> call-back <c><![CDATA[ready_async]]></c>.</p> <code type="none"><![CDATA[ static ErlDrvEntry next_perm_driver_entry = { - NULL,\011\011\011/* init */ + NULL, /* init */ start, - NULL, \011\011\011/* stop */ - output,\011\011\011 - NULL,\011\011\011/* ready_input */ - NULL,\011\011\011/* ready_output */ - "next_perm", /* the name of the driver */ - NULL,\011\011\011/* finish */ - NULL,\011\011\011/* handle */ - NULL,\011\011\011/* control */ - NULL,\011\011\011/* timeout */ - NULL,\011\011\011/* outputv */ + NULL, /* stop */ + output, + NULL, /* ready_input */ + NULL, /* ready_output */ + "next_perm", /* the name of the driver */ + NULL, /* finish */ + NULL, /* handle */ + NULL, /* control */ + NULL, /* timeout */ + NULL, /* outputv */ ready_async, - NULL,\011\011\011/* flush */ - NULL,\011\011\011/* call */ - NULL\011\011\011/* event */ + NULL, /* flush */ + NULL, /* call */ + NULL /* event */ }; ]]></code> <p>The <c><![CDATA[output]]></c> function allocates the work-area of the @@ -699,7 +699,7 @@ struct our_async_data { }; our_async_data::our_async_data(ErlDrvPort p, int command, -\011\011\011 const char* buf, int len) + const char* buf, int len) : prev(command == 2), data((int*)buf, (int*)buf + len / sizeof(int)) { @@ -722,9 +722,9 @@ static void do_perm(void* async_data) { our_async_data* d = reinterpret_cast<our_async_data*>(async_data); if (d->prev) -\011prev_permutation(d->data.begin(), d->data.end()); + prev_permutation(d->data.begin(), d->data.end()); else -\011next_permutation(d->data.begin(), d->data.end()); + next_permutation(d->data.begin(), d->data.end()); } ]]></code> <p>In the <c><![CDATA[ready_async]]></c> function, the output is sent back to the @@ -742,9 +742,9 @@ static void ready_async(ErlDrvData drv_data, ErlDrvThreadData async_data) int n = d->data.size(), result_n = n*2 + 3; ErlDrvTermData* result = new ErlDrvTermData[result_n], * rp = result; for (vector<int>::iterator i = d->data.begin(); -\011 i != d->data.end(); ++i) { -\011*rp++ = ERL_DRV_INT; -\011*rp++ = *i; + i != d->data.end(); ++i) { + *rp++ = ERL_DRV_INT; + *rp++ = *i; } *rp++ = ERL_DRV_NIL; *rp++ = ERL_DRV_LIST; @@ -767,16 +767,16 @@ static void ready_async(ErlDrvData drv_data, ErlDrvThreadData async_data) load() -> case whereis(next_perm) of -\011undefined -> -\011 case erl_ddll:load_driver(".", "next_perm") of -\011\011ok -> ok; -\011\011{error, already_loaded} -> ok; -\011\011E -> exit(E) -\011 end, -\011 Port = open_port({spawn, "next_perm"}, []), -\011 register(next_perm, Port); -\011_ -> -\011 ok + undefined -> + case erl_ddll:load_driver(".", "next_perm") of + ok -> ok; + {error, already_loaded} -> ok; + E -> exit(E) + end, + Port = open_port({spawn, "next_perm"}, []), + register(next_perm, Port); + _ -> + ok end. list_to_integer_binaries(L) -> @@ -793,8 +793,8 @@ next_perm(L, Nxt) -> B = list_to_integer_binaries(L), port_control(next_perm, Nxt, B), receive -\011Result -> -\011 Result + Result -> + Result end. all_perm(L) -> diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index 6b7d2acf24..e71b48bd92 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -4,7 +4,7 @@ <cref> <header> <copyright> - <year>2001</year><year>2009</year> + <year>2001</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>driver_entry</title> @@ -188,7 +188,7 @@ typedef struct erl_drv_entry { <p>This is called when the port is closed, with <c>port_close/1</c> or <c>Port ! {self(), close}</c>. Note that terminating the port owner process also closes the - p\011 port.</p> + port.</p> </item> <tag><marker id="output"/>void (*output)(ErlDrvData drv_data, char *buf, int len)</tag> <item> diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 207aabca35..8e2c02e0ce 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -774,10 +774,10 @@ false</pre> erlang:demonitor(MonitorRef), receive -\011{_, MonitorRef, _, _, _} -> -\011 true + {_, MonitorRef, _, _, _} -> + true after 0 -> -\011 true + true end</code> </item> <tag><c>info</c></tag> @@ -2325,13 +2325,13 @@ os_prompt%</pre> other. Values beginning with an uppercase letter is not part of the result.</p> <code type="none"> -\011total = processes + system -\011processes = processes_used + ProcessesNotUsed -\011system = atom + binary + code + ets + OtherSystem -\011atom = atom_used + AtomNotUsed + total = processes + system + processes = processes_used + ProcessesNotUsed + system = atom + binary + code + ets + OtherSystem + atom = atom_used + AtomNotUsed -\011RealTotal = processes + RealSystem -\011RealSystem = system + MissedSystem</code> + RealTotal = processes + RealSystem + RealSystem = system + MissedSystem</code> <p>More tuples in the returned list may be added in the future.</p> <note> <p>The <c>total</c> value is supposed to be the total amount @@ -6965,10 +6965,10 @@ true</pre> unlink(Id), receive -\011{'EXIT', Id, _} -> -\011 true + {'EXIT', Id, _} -> + true after 0 -> -\011 true + true end</code> <note> <p>Prior to OTP release R11B (erts version 5.5) <c>unlink/1</c> diff --git a/erts/doc/src/erlsrv.xml b/erts/doc/src/erlsrv.xml index 93db56fc7c..0dfad2a112 100644 --- a/erts/doc/src/erlsrv.xml +++ b/erts/doc/src/erlsrv.xml @@ -4,7 +4,7 @@ <comref> <header> <copyright> - <year>1998</year><year>2009</year> + <year>1998</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>erlsrv</title> @@ -251,7 +251,7 @@ necessarily the same as the interactive users. The service runs as the local administrator. All arguments should be given together in one string, use double quotes (") to give an - argument string containing spaces and use quoted quotes (\\") + argument string containing spaces and use quoted quotes (\") to give an quote within the argument string if necessary.</item> <tag>-i[nternalservicename] [<internal name>]</tag> @@ -356,7 +356,7 @@ The environment of an Erlang machine started */ BOOL WINAPI service_aware_handler(DWORD ctrl){ if(ctrl == CTRL_LOGOFF_EVENT) -\011return TRUE; + return TRUE; return FALSE; } @@ -368,10 +368,10 @@ void initialize_handler(void){ */ if(GetEnvironmentVariable("ERLSRV_SERVICE_NAME",buffer, (DWORD) 2)){ -\011/* -\011** Actually set the control handler -\011*/ -\011SetConsoleCtrlHandler(&service_aware_handler, TRUE); + /* + ** Actually set the control handler + */ + SetConsoleCtrlHandler(&service_aware_handler, TRUE); } } ]]></code> </section> @@ -388,8 +388,8 @@ void initialize_handler(void){ the runtime system should not need to overwrite existing (and probably used) executables.</p> <p>To easily manipulate the Erlang services, put - the <c><![CDATA[<erlang_root>\\erts-<version>\\bin]]></c> directory in - the path instead of <c><![CDATA[<erlang_root>\\bin]]></c>. The erlsrv program + the <c><![CDATA[<erlang_root>\erts-<version>\bin]]></c> directory in + the path instead of <c><![CDATA[<erlang_root>\bin]]></c>. The erlsrv program can be found from inside Erlang by using the <c><![CDATA[os:find_executable/1]]></c> Erlang function.</p> <p>For release handling to work, use <c><![CDATA[start_erl]]></c> as the Erlang diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml index 8df179b3e2..a89449df23 100644 --- a/erts/doc/src/escript.xml +++ b/erts/doc/src/escript.xml @@ -4,7 +4,7 @@ <comref> <header> <copyright> - <year>2007</year><year>2009</year> + <year>2007</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>escript</title> @@ -50,20 +50,18 @@ $ <input>cat factorial</input> %%! -smp enable -sname factorial -mnesia debug verbose main([String]) -> try -\011N = list_to_integer(String), -\011F = fac(N), -\011io:format("factorial ~w = ~w\ -", [N,F]) + N = list_to_integer(String), + F = fac(N), + io:format("factorial ~w = ~w\n", [N,F]) catch -\011_:_ -> -\011 usage() + _:_ -> + usage() end; main(_) -> usage(). usage() -> - io:format("usage: factorial integer\ -"), + io:format("usage: factorial integer\n"), halt(1). fac(0) -> 1; diff --git a/erts/doc/src/inet_cfg.xml b/erts/doc/src/inet_cfg.xml index 18cf65759a..2a033c037c 100644 --- a/erts/doc/src/inet_cfg.xml +++ b/erts/doc/src/inet_cfg.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2004</year><year>2009</year> + <year>2004</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>Inet configuration</title> @@ -230,6 +230,13 @@ (use the Erlang DNS client <seealso marker="kernel:inet_res">inet_res</seealso> for nameserver queries).</p> + <p>The lookup method <c><![CDATA[string]]></c> tries to + parse the hostname as a IPv4 or IPv6 string and return + the resulting IP address. It is automatically tried + first when <c><![CDATA[native]]></c> is <em>not</em> + in the <c><![CDATA[Methods]]></c> list. To skip it in this case + the pseudo lookup method <c><![CDATA[nostring]]></c> can be + inserted anywhere in the <c><![CDATA[Methods]]></c> list.</p> <p></p> </item> <tag><em><c><![CDATA[{cache_size, Size}.]]></c></em></tag> diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml index 26480473d2..b9f955e4db 100644 --- a/erts/doc/src/match_spec.xml +++ b/erts/doc/src/match_spec.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>1999</year><year>2009</year> + <year>1999</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>Match specifications in Erlang</title> @@ -360,52 +360,52 @@ </p> <table> <row> - <cell align="left" valign="middle">Expression\011\011</cell> - <cell align="left" valign="middle">Variable bindings\011\011</cell> - <cell align="left" valign="middle">Result\011</cell> + <cell align="left" valign="middle">Expression </cell> + <cell align="left" valign="middle">Variable bindings </cell> + <cell align="left" valign="middle">Result </cell> </row> <row> - <cell align="left" valign="middle">{{'$1','$2'}}\011\011</cell> + <cell align="left" valign="middle">{{'$1','$2'}} </cell> <cell align="left" valign="middle">'$1' = a, '$2' = b</cell> <cell align="left" valign="middle">{a,b}</cell> </row> <row> - <cell align="left" valign="middle">{const, {'$1', '$2'}}\011</cell> + <cell align="left" valign="middle">{const, {'$1', '$2'}} </cell> <cell align="left" valign="middle">doesn't matter</cell> <cell align="left" valign="middle">{'$1', '$2'}</cell> </row> <row> - <cell align="left" valign="middle">a\011\011\011</cell> - <cell align="left" valign="middle">doesn't matter\011\011\011</cell> + <cell align="left" valign="middle">a </cell> + <cell align="left" valign="middle">doesn't matter </cell> <cell align="left" valign="middle">a</cell> </row> <row> - <cell align="left" valign="middle">'$1'\011\011\011</cell> - <cell align="left" valign="middle">'$1' = []\011\011\011</cell> + <cell align="left" valign="middle">'$1' </cell> + <cell align="left" valign="middle">'$1' = [] </cell> <cell align="left" valign="middle">[]</cell> </row> <row> - <cell align="left" valign="middle">['$1']\011\011\011</cell> - <cell align="left" valign="middle">'$1' = []\011\011\011</cell> + <cell align="left" valign="middle">['$1'] </cell> + <cell align="left" valign="middle">'$1' = [] </cell> <cell align="left" valign="middle">[[]]</cell> </row> <row> - <cell align="left" valign="middle">[{{a}}]\011\011\011</cell> + <cell align="left" valign="middle">[{{a}}] </cell> <cell align="left" valign="middle">doesn't matter</cell> <cell align="left" valign="middle">[{a}]</cell> </row> <row> - <cell align="left" valign="middle">42\011\011\011</cell> + <cell align="left" valign="middle">42 </cell> <cell align="left" valign="middle">doesn't matter</cell> <cell align="left" valign="middle">42</cell> </row> <row> - <cell align="left" valign="middle">"hello"\011\011\011</cell> + <cell align="left" valign="middle">"hello" </cell> <cell align="left" valign="middle">doesn't matter</cell> <cell align="left" valign="middle">"hello"</cell> </row> <row> - <cell align="left" valign="middle">$1\011\011\011</cell> + <cell align="left" valign="middle">$1 </cell> <cell align="left" valign="middle">doesn't matter</cell> <cell align="left" valign="middle">49 (the ASCII value for the character '1')</cell> </row> @@ -507,8 +507,8 @@ a list which in turn begins with the second argument times two (i. e. [{[4,x],y},2] or [{[8], y, z},4])</p> <code type="none"><![CDATA[ -[{['$1', '$2'],\011[{'=:=', {'*', 2, '$2'}, {hd, {element, 1, '$1'}}}], - []}]\011 +[{['$1', '$2'],[{'=:=', {'*', 2, '$2'}, {hd, {element, 1, '$1'}}}], + []}] ]]></code> <p>Match three arguments. When all three are equal and are numbers, append the process dump to the trace message, else diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 5fe414841e..70f2d95103 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -4371,16 +4371,16 @@ following code might hang:</p> <code type="none"><![CDATA[ Mon = erlang:monitor(process, Pid), -\011 %% ... -\011 exit(Pid, bang), + %% ... + exit(Pid, bang), erlang:demonitor(Mon), -\011 receive -\011 {'DOWN', Mon , process, Pid, _} -> ok -\011 %% We were previously guaranteed to get a down message -\011 %% (since we exited the process ourself), so we could -\011 %% in this case leave out: -\011 %% after 0 -> ok -\011 end, + receive + {'DOWN', Mon , process, Pid, _} -> ok + %% We were previously guaranteed to get a down message + %% (since we exited the process ourself), so we could + %% in this case leave out: + %% after 0 -> ok + end, ]]></code> <p>*** POTENTIAL INCOMPATIBILITY ***</p> <p>Own Id: OTP-5772</p> @@ -5342,7 +5342,7 @@ <list type="bulleted"> <item> <p>If Erlang/OTP was installed in a short directory name, - such as <c><![CDATA[C:\\Program\\erl5.4.2]]></c>, the emulator would not + such as <c><![CDATA[C:\Program\erl5.4.2]]></c>, the emulator would not start.</p> <p>Own Id: OTP-5254</p> </item> diff --git a/erts/doc/src/tty.xml b/erts/doc/src/tty.xml index 23694e5965..7d662a2849 100644 --- a/erts/doc/src/tty.xml +++ b/erts/doc/src/tty.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>tty - A command line interface</title> @@ -47,7 +47,7 @@ <section> <title>Normal Mode</title> <p>In normal mode keystrokes from the user are collected and interpreted by <c><![CDATA[tty]]></c>. Most of the <em>emacs</em> line editing commands are supported. The following is a complete list of the supported line editing commands.<br></br></p> - <p><em>Note:</em>\011The notation <c><![CDATA[C-a]]></c> means pressing the control key and the letter <c><![CDATA[a]]></c> simultaneously. <c><![CDATA[M-f]]></c> means pressing the <c><![CDATA[ESC]]></c> key followed by the letter <c><![CDATA[f]]></c>. + <p><em>Note:</em> The notation <c><![CDATA[C-a]]></c> means pressing the control key and the letter <c><![CDATA[a]]></c> simultaneously. <c><![CDATA[M-f]]></c> means pressing the <c><![CDATA[ESC]]></c> key followed by the letter <c><![CDATA[f]]></c>. </p> <table> <row> diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 9f39ac657a..b1e768bce9 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>2005</year><year>2009</year> + <year>2005</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>zlib</title> @@ -372,11 +372,11 @@ list_to_binary([B1,B2])</pre> <pre> unpack(Z, Compressed, Dict) -> case catch zlib:inflate(Z, Compressed) of -\011 {'EXIT',{{need_dictionary,DictID},_}} -> - \011 zlib:inflateSetDictionary(Z, Dict), -\011 Uncompressed = zlib:inflate(Z, []); -\011 Uncompressed -> -\011 Uncompressed + {'EXIT',{{need_dictionary,DictID},_}} -> + zlib:inflateSetDictionary(Z, Dict), + Uncompressed = zlib:inflate(Z, []); + Uncompressed -> + Uncompressed end.</pre> </desc> </func> @@ -466,8 +466,8 @@ unpack(Z, Compressed, Dict) -> the required initial value for the crc.</p> <pre> Crc = lists:foldl(fun(Bin,Crc0) -> -\011 zlib:crc32(Z, Crc0, Bin), -\011 end, zlib:crc32(Z,<< >>), Bins)</pre> + zlib:crc32(Z, Crc0, Bin), + end, zlib:crc32(Z,<< >>), Bins)</pre> </desc> </func> <func> @@ -517,8 +517,8 @@ Crc = lists:foldl(fun(Bin,Crc0) -> the required initial value for the checksum.</p> <pre> Crc = lists:foldl(fun(Bin,Crc0) -> -\011 zlib:adler32(Z, Crc0, Bin), -\011 end, zlib:adler32(Z,<< >>), Bins)</pre> + zlib:adler32(Z, Crc0, Bin), + end, zlib:adler32(Z,<< >>), Bins)</pre> </desc> </func> <func> diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c index e07a76835b..15b1c6bb56 100644 --- a/erts/emulator/beam/erl_db.c +++ b/erts/emulator/beam/erl_db.c @@ -1,19 +1,19 @@ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 1996-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 1996-2010. All Rights Reserved. + * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in * compliance with the License. You should have received a copy of the * Erlang Public License along with this software. If not, it can be * retrieved online at http://www.erlang.org/. - * + * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. - * + * * %CopyrightEnd% */ diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c index dbe13204d9..4141f9766b 100644 --- a/erts/emulator/beam/erl_db_hash.c +++ b/erts/emulator/beam/erl_db_hash.c @@ -1,19 +1,19 @@ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 1998-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 1998-2010. All Rights Reserved. + * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in * compliance with the License. You should have received a copy of the * Erlang Public License along with this software. If not, it can be * retrieved online at http://www.erlang.org/. - * + * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. - * + * * %CopyrightEnd% */ diff --git a/erts/emulator/beam/erl_lock_count.c b/erts/emulator/beam/erl_lock_count.c index 32fddce38b..0d7e1335c1 100644 --- a/erts/emulator/beam/erl_lock_count.c +++ b/erts/emulator/beam/erl_lock_count.c @@ -1,19 +1,19 @@ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 2008-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 2008-2010. All Rights Reserved. + * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in * compliance with the License. You should have received a copy of the * Erlang Public License along with this software. If not, it can be * retrieved online at http://www.erlang.org/. - * + * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. - * + * * %CopyrightEnd% */ diff --git a/erts/emulator/beam/erl_lock_count.h b/erts/emulator/beam/erl_lock_count.h index 86c85226e4..e3044c371f 100644 --- a/erts/emulator/beam/erl_lock_count.h +++ b/erts/emulator/beam/erl_lock_count.h @@ -1,19 +1,19 @@ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 2008-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 2008-2010. All Rights Reserved. + * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in * compliance with the License. You should have received a copy of the * Erlang Public License along with this software. If not, it can be * retrieved online at http://www.erlang.org/. - * + * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. - * + * * %CopyrightEnd% */ diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 34afe5656c..c5de180cb2 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -1,19 +1,19 @@ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 1996-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 1996-2010. All Rights Reserved. + * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in * compliance with the License. You should have received a copy of the * Erlang Public License along with this software. If not, it can be * retrieved online at http://www.erlang.org/. - * + * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. - * + * * %CopyrightEnd% */ diff --git a/erts/etc/common/escript.c b/erts/etc/common/escript.c index ab37d4af46..1bc5eb7651 100644 --- a/erts/etc/common/escript.c +++ b/erts/etc/common/escript.c @@ -1,19 +1,19 @@ /* * %CopyrightBegin% - * - * Copyright Ericsson AB 2007-2009. All Rights Reserved. - * + * + * Copyright Ericsson AB 2007-2010. All Rights Reserved. + * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in * compliance with the License. You should have received a copy of the * Erlang Public License along with this software. If not, it can be * retrieved online at http://www.erlang.org/. - * + * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. - * + * * %CopyrightEnd% */ /* @@ -199,9 +199,10 @@ find_prog(char *origpath) continue; } else { /* Wow we found the executable. */ - strcpy(abspath, wildcard); + strcpy(relpath, wildcard); FindClose(dir_handle); - return strsave(abspath); + look_for_sep = FALSE; + break; } #else dp = opendir(dir); @@ -216,11 +217,12 @@ find_prog(char *origpath) if (strcmp(origpath, dirp->d_name) == 0) { /* Wow we found the executable. */ - strcpy(abspath, dir); - strcat(abspath, DIRSEPSTR); - strcat(abspath, dirp->d_name); + strcpy(relpath, dir); + strcat(relpath, DIRSEPSTR); + strcat(relpath, dirp->d_name); closedir(dp); - return strsave(abspath); + look_for_sep = FALSE; + break; } } } @@ -239,8 +241,8 @@ find_prog(char *origpath) #else if (!realpath(relpath, abspath)) { #endif /* __WIN32__ */ - /* Cannot determine absolute path to escript. Try the relative. */ - return strsave(relpath); + /* Cannot determine absolute path to escript. Try the origin. */ + return strsave(origpath); } else { return strsave(abspath); } @@ -373,11 +375,10 @@ main(int argc, char** argv) if (strcmp(basename, "escript") == 0) { #endif /* - * Push all options (without the hyphen) before the script name. + * Locate all options before the script name. */ while (argc > 1 && argv[1][0] == '-') { - PUSH(argv[1]+1); argc--; argv++; last_opt = argv; @@ -402,6 +403,7 @@ main(int argc, char** argv) scriptname[len-4] = '\0'; } #endif + strcat(scriptname, ".escript"); } @@ -418,7 +420,7 @@ main(int argc, char** argv) PUSH3("-run", "escript", "start"); /* - * Push all options (without the hyphen) before the script name. + * Push all options before the script name. But omit the leading hyphens. */ while (first_opt != last_opt) { @@ -500,7 +502,7 @@ char *make_commandline(char **argv) *(--p) = '\0'; if (debug) { - printf("Processed commandline:%s\n",buff); + printf("Processed command line:%s\n",buff); } return buff; } diff --git a/erts/etc/unix/Install.src b/erts/etc/unix/Install.src index 22357b057f..83f9690782 100644 --- a/erts/etc/unix/Install.src +++ b/erts/etc/unix/Install.src @@ -149,4 +149,4 @@ then ./misc/format_man_pages $ERL_ROOT fi - +exit 0 |