iilyak closed pull request #1833: Change minimum supported Erlang version to 
OTP 19
URL: https://github.com/apache/couchdb/pull/1833
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index c4769d6328..45ff9edd26 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 85cc20f886..019e6f182f 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 5321cff668..846e8b4698 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 f5a8fc6af1..67454b8ad5 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 ddd24aab00..62e17ce36d 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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to