aboutsummaryrefslogtreecommitdiffstats
path: root/testing/erlang/otp-0008-Introduce-os-getenv-2.patch
diff options
context:
space:
mode:
authorMarlus Saraiva <marlus.saraiva@gmail.com>2015-07-03 04:20:11 +0000
committerBartłomiej Piotrowski <b@bpiotrowski.pl>2015-07-04 18:39:57 +0200
commitd353b4d850cc0ad9c4a99251e8d9e734080a49b5 (patch)
treeaaebf90acac05a6d275ee3b6dafc3b5691b1debf /testing/erlang/otp-0008-Introduce-os-getenv-2.patch
parent499f4a72a2030ddd17a7612823c959ad803565c0 (diff)
downloadaports-d353b4d850cc0ad9c4a99251e8d9e734080a49b5.tar.gz
aports-d353b4d850cc0ad9c4a99251e8d9e734080a49b5.tar.bz2
aports-d353b4d850cc0ad9c4a99251e8d9e734080a49b5.tar.xz
testing/erlang: update to 18.0.1
Diffstat (limited to 'testing/erlang/otp-0008-Introduce-os-getenv-2.patch')
-rw-r--r--testing/erlang/otp-0008-Introduce-os-getenv-2.patch63
1 files changed, 0 insertions, 63 deletions
diff --git a/testing/erlang/otp-0008-Introduce-os-getenv-2.patch b/testing/erlang/otp-0008-Introduce-os-getenv-2.patch
deleted file mode 100644
index 6c48db2122..0000000000
--- a/testing/erlang/otp-0008-Introduce-os-getenv-2.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From: Peter Lemenkov <lemenkov@gmail.com>
-Date: Sat, 8 Nov 2014 15:11:04 +0300
-Subject: [PATCH] Introduce os:getenv/2
-
-Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
-
-diff --git a/lib/kernel/doc/src/os.xml b/lib/kernel/doc/src/os.xml
-index 2b57e75..8b85f24 100644
---- a/lib/kernel/doc/src/os.xml
-+++ b/lib/kernel/doc/src/os.xml
-@@ -100,6 +100,19 @@ DirOut = os:cmd("dir"), % on Win32 platform</code>
- </desc>
- </func>
- <func>
-+ <name name="getenv" arity="2"/>
-+ <fsummary>Get the value of an environment variable</fsummary>
-+ <desc>
-+ <p>Returns the <c><anno>Value</anno></c> of the environment variable
-+ <c><anno>VarName</anno></c>, or <c>DefaultValue</c> if the environment variable
-+ is undefined.</p>
-+ <p>If Unicode file name encoding is in effect (see the <seealso
-+ marker="erts:erl#file_name_encoding">erl manual
-+ page</seealso>), the strings (both <c><anno>VarName</anno></c> and
-+ <c><anno>Value</anno></c>) may contain characters with codepoints > 255.</p>
-+ </desc>
-+ </func>
-+ <func>
- <name name="getpid" arity="0"/>
- <fsummary>Return the process identifier of the emulator process</fsummary>
- <desc>
-diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
-index 187fd00..8aaf13b 100644
---- a/lib/kernel/src/os.erl
-+++ b/lib/kernel/src/os.erl
-@@ -26,7 +26,7 @@
-
- %%% BIFs
-
---export([getenv/0, getenv/1, getpid/0, putenv/2, timestamp/0, unsetenv/1]).
-+-export([getenv/0, getenv/1, getenv/2, getpid/0, putenv/2, timestamp/0, unsetenv/1]).
-
- -spec getenv() -> [string()].
-
-@@ -39,6 +39,19 @@ getenv() -> erlang:nif_error(undef).
- getenv(_) ->
- erlang:nif_error(undef).
-
-+-spec getenv(VarName, DefaultValue) -> Value when
-+ VarName :: string(),
-+ DefaultValue :: string(),
-+ Value :: string().
-+
-+getenv(VarName, DefaultValue) ->
-+ case os:getenv(VarName) of
-+ false ->
-+ DefaultValue;
-+ Value ->
-+ Value
-+ end.
-+
- -spec getpid() -> Value when
- Value :: string().
-