diff options
author | Jay Doane <jay.s.doane@gmail.com> | 2018-12-28 10:18:06 -0800 |
---|---|---|
committer | Jay Doane <jay.s.doane@gmail.com> | 2018-12-28 10:18:06 -0800 |
commit | 21359d2034daa348b9520f8e49f6fa1806eebd92 (patch) | |
tree | 3e2874828eecec40976273bade07dc00968c5765 | |
parent | c347470851e1cd62f5c304f15ef9d5ee1b34d1b4 (diff) | |
download | couchdb-21359d2034daa348b9520f8e49f6fa1806eebd92.tar.gz |
Change minimum supported Erlang version to OTP 19
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | rebar.config.script | 2 | ||||
-rw-r--r-- | src/couch/rebar.config.script | 4 | ||||
-rw-r--r-- | src/couch/src/couch_rand.erl | 30 | ||||
-rw-r--r-- | src/couch/src/couch_util.erl | 9 |
5 files changed, 1 insertions, 46 deletions
diff --git a/.travis.yml b/.travis.yml index c4769d632..45ff9edd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,6 @@ otp_release: - 21.1 - 20.3 - 19.3 - - 18.3 - - 17.5 addons: apt: diff --git a/rebar.config.script b/rebar.config.script index 85cc20f88..019e6f182 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -91,7 +91,7 @@ ErlOpts = case os:getenv("ERL_OPTS") of end, AddConfig = [ - {require_otp_vsn, "17|18|19|20|21"}, + {require_otp_vsn, "19|20|21"}, {deps_dir, "src"}, {deps, lists:map(MakeDep, DepDescs)}, {sub_dirs, SubDirs}, diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script index 5321cff66..846e8b469 100644 --- a/src/couch/rebar.config.script +++ b/src/couch/rebar.config.script @@ -146,10 +146,6 @@ PortSpecs = case os:type() of BaseSpecs end, PlatformDefines = [ - {platform_define, "^R16", 'PRE18TIMEFEATURES'}, - {platform_define, "^17", 'PRE18TIMEFEATURES'}, - {platform_define, "^R16", 'NORANDMODULE'}, - {platform_define, "^17", 'NORANDMODULE'}, {platform_define, "win32", 'WINDOWS'} ], AddConfig = [ diff --git a/src/couch/src/couch_rand.erl b/src/couch/src/couch_rand.erl index f5a8fc6af..67454b8ad 100644 --- a/src/couch/src/couch_rand.erl +++ b/src/couch/src/couch_rand.erl @@ -19,39 +19,9 @@ ]). --ifdef(NORANDMODULE). - - -uniform() -> - maybe_set_random_seed(), - random:uniform(). - - -uniform(N) -> - maybe_set_random_seed(), - random:uniform(N). - - -maybe_set_random_seed() -> - case get(random_seed) of - undefined -> - {_, Sec, USec} = os:timestamp(), - Seed = {erlang:phash2(self()), Sec, USec}, - random:seed(Seed); - _ -> - ok - end. - - --else. - - uniform() -> rand:uniform(). uniform(N) -> rand:uniform(N). - - --endif. diff --git a/src/couch/src/couch_util.erl b/src/couch/src/couch_util.erl index ddd24aab0..62e17ce36 100644 --- a/src/couch/src/couch_util.erl +++ b/src/couch/src/couch_util.erl @@ -737,18 +737,9 @@ process_dict_get(Pid, Key, DefaultValue) -> end. --ifdef(PRE18TIMEFEATURES). - -unique_monotonic_integer() -> - {Ms, S, Us} = erlang:now(), - (Ms * 1000000 + S) * 1000000 + Us. - --else. - unique_monotonic_integer() -> erlang:unique_integer([monotonic, positive]). --endif. check_config_blacklist(Section) -> case lists:member(Section, ?BLACKLIST_CONFIG_SECTIONS) of |