aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
AgeCommit message (Collapse)Author
2010-02-10Support the configure option --enable-native-libsKostis Sagonas
2010-02-05OTP-8393 The new function shell:prompt_func/1 and the new applicationHans Bolinder
configuration parameter shell_prompt_func can be used for customizing the Erlang shell prompt.
2010-02-05OTP-8404: Doc: some corrections and improvements in STDLIBBjörn Gustavsson
2010-02-01epp_SUITE: Increase code coverageHans Bolinder
2010-02-01Minor corrections and clean-upsHans Bolinder
2010-02-01epp: change rules to choose the right version of a macroChristopher Faulet
Now, when we have only the constant definition of a macro (without arguments), we always use it. In all other cases, we try to find the exact matching definition. We throw an error if we don't find it.
2010-02-01epp: Add support of macros overloadingChristopher Faulet
This feature simplifies the definition of macros by avoiding to have a different name for each version (with different arities) of the same macros. New rules: - can have multiple definitions of the same macro with different arities - cannot overload macro with the same arity - the overloading of predefined macros (?MODULE, ?LINE, ...) is forbidden - the directive '-undef' removes all definitions of a macro
2010-02-01epp: fix bug in the function scan_undefChristopher Faulet
The dict St#epp.uses that helps to find circular macros was not correctly updated.
2010-02-01Merge branch 'bg/hipe-fixes' into ccase/r13b04_devErlang/OTP
* bg/hipe-fixes: compiler: make ignore_native_errors also handle internal hipe errors re tests: disable native-code compilation for huge modules Teach the compiler the no_native option
2010-01-31Merge branch 'bg/cleanup-tests' into ccase/r13b04_devErlang/OTP
* bg/cleanup-tests: file_SUITE: eliminate a warning for an unused variable kernel tests: modernize guard tests unicode_SUITE: replace deprecated concat_binary/1 with list_to_binary/1 stdlib tests: modernize guard tests Test suites: fix creation of Emakefiles
2010-01-30re tests: disable native-code compilation for huge modulesBjörn Gustavsson
Two generated modules contains too big functions for the native-code compiler to handle (even the BEAM compiler struggles when compiling them).
2010-01-30Update copyright headerBjörn Gustavsson
2010-01-30Merge branch 'ta/ensure_dir_eexist' into ccase/r13b04_devErlang/OTP
* ta/ensure_dir_eexist: filelib_SUITE: strenghten tests of filelib:ensure_dir/1 Don't return a false {error,eexist} in filelib:ensure_dir/1 OTP-8389 Because of a race condition, using filelib:ensure_dir/1 from multiple processes to create the same path or parts of the same directory structure, filelib:ensure_dir/1 could return a meaningless {error,eexist}. That race condition has been eliminated, and {error,eexist} will now be returned only if there exists a regular file, device file, or some other non-directory file with the same name. (Thanks to Tuncer Ayaz.)
2010-01-29unicode_SUITE: replace deprecated concat_binary/1 with list_to_binary/1Björn Gustavsson
2010-01-29stdlib tests: modernize guard testsBjörn Gustavsson
Don't change any guard tests in the id_transform_SUITE module, because it intentionally use the old guard tests to test that id_transform can handle them.
2010-01-29Test suites: fix creation of EmakefilesBjörn Gustavsson
The Emakefiles in some test suite directories are only appended to, never created from scratch, which can cause problems especially when swithching branches in a git repository.
2010-01-27Merge branch 'rb/stdlib_re_unicode_fixes' into ccase/r13b04_devErlang/OTP
* rb/stdlib_re_unicode_fixes: Fix lost unicode option in re:compile() Refactor out repeated block in re module Fix re:replace/4 to handle unicode charlist Replacement argument Fix re:replace/4 to handle unicode charlist RE argument Fix re:replace/4 to handle binary unicode output when nothing replaced OTP-8394 A number of bugs concerning re and unicode are corrected: - re:compile no longer loses unicode option, which also fixes bug in re:split. - re:replace now handles unicode charlist replacement argument - re:replace now handles unicode RE charlist argument correctly - re:replace now handles binary unicode output correctly when nothing is replaced. Most code, testcases and error isolation done by Rory Byrne.
2010-01-27Fix lost unicode option in re:compile()Patrik Nyblom
Noticed-by: Rory Byrne
2010-01-27Refactor out repeated block in re moduleRory Byrne
2010-01-27Fix re:replace/4 to handle unicode charlist Replacement argumentRory Byrne
A bug in re:replace/4 causes a badarg exception to be thrown when the Replacement argument is a charlist containing non-ascii codepoints. The problem is that the code incorrectly assumes that the Replacement text is iodata() and calls iolist_to_binary/1 on it. This patch fixes it to obey the 'unicode' option and handle charlist() Replacement arguments correctly.
2010-01-27Fix re:replace/4 to handle unicode charlist RE argumentPatrik Nyblom
The real problem is in the re:run/3 BIF. Noticed-by: Rory Byrne Tests-by: Rory Byrne
2010-01-27Fix re:replace/4 to handle binary unicode output when nothing replacedRory Byrne
A bug with re:replace/4 causes an exception when: (a) it's given a unicode charlist as input; (b) it's set to {return,binary}; and (c) it finds nothing to replace. The problem is: when re:replace/4 does not find anything to replace in its Subject input, it calls iolist_to_binary on this data. This fails if the original input is a charlist with non-ascii codepoints.
2010-01-27OTP-8387 Explicit top directories in archive files are now optional.Håkan Mattsson
For example, if an archive (app-vsn.ez) just contains an app-vsn/ebin/mod.beam file, the file info for the app-vsn and app-vsn/ebin directories are faked using the file info from the archive file as origin. The virtual direcories can also be listed. For short, the top directories are virtual if they does not exist.
2010-01-27Added a small timeout to take care of race in newshell. Also removed ↵Patrik Nyblom
deletion of files when compiled with debug option. Changed LC_CTYPE for sunos of certain versions.
2010-01-26OTP-8343 The documentation is now possible to build in an open sourceLars G Thorsen
environment after a number of bugs are fixed and some features are added in the documentation build process. - The arity calculation is updated. - The module prefix used in the function names for bif's are removed in the generated links so the links will look like http://www.erlang.org/doc/man/erlang.html#append_element-2 instead of http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2 - Enhanced the menu positioning in the html documentation when a new page is loaded. - A number of corrections in the generation of man pages (thanks to Sergei Golovan) - Moved some man pages to more apropriate sections, pages in section 4 moved to 5 and pages in 6 moved to 7. - The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications.
2010-01-23filelib_SUITE: strenghten tests of filelib:ensure_dir/1Björn Gustavsson
Test that filelib:ensure_dir/1 returns {error,eexist} if there already exists a regular file with the name as a directory that should be created. While at it, slightly strenghten the otp_5960/1 test case by repeating each call to filelib:ensure_dir/1.
2010-01-20Merge branch 'uw/shell-tab-completion' into ccase/r13b04_devErlang/OTP
* uw/shell-tab-completion: Shell tab completion now works for quoted module and function names OTP-8383 Shell tab completion now works for quoted module and function names. (Thanks to Ulf Wiger.)
2010-01-18Don't return a false {error,eexist} in filelib:ensure_dir/1Tuncer Ayaz
This is about the non-atomicity of filelib:ensure_dir/1. When using filelib:ensure_dir/1 from multiple processes to create the same path or parts of the same directory structure (which happens with rebar's worker processes) it happens quite a lot that between a file:read_file_info/1 and file:make_dir/1 one of the other procs has already created the directory we want to create. mkdir(1) says one of the following for -p depending on which Unix like system you're on: "no error if existing" "no error will be reported if a directory given as an operand already exists" I've seen more than one Erlang project where the return value of ensure_dir/1 is ignored completely. To eliminate the race condition, call file:make_dir/1 without first testing whether the directory exists. If it succeeds everything is fine. Otherwise, if the error code is {error,eexists}, check whether the directory exists. If it does, everything is fine; if not, return {error,eexist} (which indicates that there exists a regular file with the same name, or (more unlikely) that another process removed the directory after the call to file:make_dir/1). Signed-off-by: Tuncer Ayaz <[email protected]>
2010-01-13OTP-8240 Improved GC performance after BIF/NIF call when a lot of heapSverker Eriksson
fragments was created. This will mainly benefit NIFs that return large compound terms.
2010-01-13Merge branch 'bg/otp_build-improvements' into ccase/r13b04_devErlang/OTP
* bg/otp_build-improvements: Fix spelling, remove obsolete command Support updating preloaded files in a git repository Support updating the primary bootstrap in a git repository Determine which VCS is being used stdlib makefile: Add explicit rule OTP-8369: bg/otp_build-improvements
2010-01-12stdlib makefile: Add explicit ruleBjörn Gustavsson
When building a primary bootstrap in a git repository, the file bootstrap/lib/stdlib/egen/erl_parse.erl would not get updated. With clearmake, this file is updated. Adding an explicit rule for the file make it it work with GNU Make. While at it, remove an out-commented rule.
2010-01-07Shell tab completion now works for quoted module and function namesUlf Wiger
While quoted atoms in module and function names are not common, they are allowed, and sometimes quite useful. In OTP, they are commonplace in ORBER, and can also be found in XMERL. Tab completion needs to recognize quoted atoms and act accordingly. This patch includes changes in edlin:over_word/1. It should be noted that these changes also affect the 'kill word', 'forward word' and 'backward word' commands in the line editor. The author thinks that the changes are for the better. There are also minor changes in edlin_expand.erl - mainly in regard to the conversion between atoms and strings. Another change is that the list of matches is now sorted, partly to simplify testing, but also because it seems sensible to present the matches that way. A test suite, edlin_expand_SUITE, has been added to the stdlib test suites. (amended 2009-12-18 to actually include the modified files too and again to rename the capitalized test modules for portability.)
2009-12-15Deprecate concat_binary/1Björn Gustavsson
2009-12-14Merge branch 'as/c_nc-fix' into ccase/r13b04_devErlang/OTP
* as/c_nc-fix: c_SUITE: Use new style guard tests Fix c:nc to use outdir or cwd to find compiled object file OTP-8337 c:nc/{1,2} used to assume that the beam file was created in the same directory as the source code and failed to load the code if it was not. Corrected to look for the beam file in the current directory or in the directory specified by the {outdir,Dir} option. (Thanks to Alex Suraci.)
2009-12-14c_SUITE: Use new style guard testsBjörn Gustavsson
2009-12-14Fix c:nc to use outdir or cwd to find compiled object fileAlex Suraci
Before this patch, c:nc would naively assume the object file was created in the same location as the .erl file. This is often false, for example when an outdir is specified (often the case in make:all([netload])) or calling with c:nc("foo/bar") (because compile:file places bar.beam in the cwd, not foo/). [ Squashed in minor style changes. /bg ]
2009-12-04Merge branch 'sv/sys_get_status' into ccase/r13b04_devErlang/OTP
* sv/sys_get_status: Teach sys:get_status/1,2 to call Mod:format_status/2 gen_fsm: Fix format_status/2 to handle Pids OTP-8324 The ability for the gen_server and gen_fsm callback modules to format their own state for display under the sys:get_status/1,2 calls has been restored and documented. (Thanks to Steve Vinoski.)
2009-12-03documentation: Fix bugs introduced in the SGML to XML transitionHans Bolinder
In the transition from SGML to XML (several releases ago), bugs were introduced in the documentation, for instance "\n" replaced by newlines. Correct those bugs. Also correct double backslashes. They seem to have been introduced very early in the development of OTP. According to Lars they "solved" a bug in the generation of HTML &c. Now that standard tools are used instead of docbuilder, the bug has become visible.
2009-12-01Teach sys:get_status/1,2 to call Mod:format_status/2Steve Vinoski
Restore the ability for gen_server and gen_fsm callback modules to format their own state for display under the sys:get_status/1,2 calls. This ability is extremely useful for new behavior modules based on gen_server or gen_fsm, so that they can display their status in a more meaningful way than just dumping the state record. It is also generally useful for applications wanting to display their gen_server or gen_fsm callback module state in something other than the default manner. Also document the previously undocumented the gen_server:format_status/2 and gen_fsm:format_status/2 optional callback functions that, if exported by the callback module, are invoked when sys:get_status/1,2 are called. Add unit tests to ensure that format_status/2 functions exported from a gen_fsm callback module and a gen_server callback module are called when sys:get_status/1,2 are called.
2009-11-29gen_fsm: Fix format_status/2 to handle PidsSteve Vinoski
gen_fsm:format_status/2 currently crashes if Name in the process state is a Pid. Handle Name in the same way as in gen_server:format_status/2 to eliminate the crash.
2009-11-27Merge remote branch 'refs/remotes/origin/dgud/array_tests' into ccase/r13b04_devErlang/OTP
* refs/remotes/origin/dgud/array_tests: Added more tests for array:reset/2.
2009-11-26Added more tests for array:reset/2.Dan Gudmundsson
Code coverage was bad for my new optimizations.
2009-11-25Update version numbersRickard Green
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP