summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2018-09-16 16:44:21 +0200
committerJan Lehnardt <jan@apache.org>2018-11-09 14:51:33 +0100
commitcbbd2fad30a951971a66899ad1d184220263b976 (patch)
tree4a46209bf6a407d52b3e3ad6faa03cb939e7f5f4
parent83f4b9faf5241caa8cfffc7788c7b5bcdbde1f64 (diff)
downloadcouchdb-cbbd2fad30a951971a66899ad1d184220263b976.tar.gz
compatibility for erlang < 20
-rw-r--r--src/chttpd/test/chttpd_view_test.erl2
-rw-r--r--src/couch/src/couch_proc_manager.erl5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/chttpd/test/chttpd_view_test.erl b/src/chttpd/test/chttpd_view_test.erl
index 6743f31a6..114eb089b 100644
--- a/src/chttpd/test/chttpd_view_test.erl
+++ b/src/chttpd/test/chttpd_view_test.erl
@@ -31,7 +31,7 @@ setup() ->
TmpDb = ?tempdb(),
Addr = config:get("chttpd", "bind_address", "127.0.0.1"),
Port = mochiweb_socket_server:get(chttpd, port),
- os:putenv("COUCHDB_QUERY_SERVER_JAVASCRIPT", "../../..//bin/couchjs ../../..//share/server/main.js"),
+ os:putenv("COUCHDB_QUERY_SERVER_JAVASCRIPT", "../../../bin/couchjs ../../../share/server/main.js"),
Url = lists:concat(["http://", Addr, ":", Port, "/", ?b2l(TmpDb)]),
create_db(Url),
Url.
diff --git a/src/couch/src/couch_proc_manager.erl b/src/couch/src/couch_proc_manager.erl
index 4c11618eb..26fe5ade5 100644
--- a/src/couch/src/couch_proc_manager.erl
+++ b/src/couch/src/couch_proc_manager.erl
@@ -376,7 +376,7 @@ get_env_for_spec(Spec, Target) ->
% loop over os:getenv(), match SPEC_TARGET
lists:filtermap(fun(VarName) ->
SpecStr = Spec ++ Target,
- case string:split(VarName, "=") of
+ case string:tokens(VarName, "=") of
[SpecStr, Cmd] -> {true, Cmd};
_Else -> false
end
@@ -385,7 +385,7 @@ get_env_for_spec(Spec, Target) ->
get_query_server(LangStr) ->
% look for COUCH_QUERY_SERVER_LANGSTR in env
% if exists, return value, else undefined
- UpperLangString = string:uppercase(LangStr),
+ UpperLangString = string:to_upper(LangStr),
case get_env_for_spec("COUCHDB_QUERY_SERVER_", UpperLangString) of
[] -> undefined;
[Command] -> Command
@@ -398,7 +398,6 @@ native_query_server_enabled() ->
NativeLegacyConfig = config:get("native_query_servers", "erlang", ""),
NativeLegacyEnabled = NativeLegacyConfig =:= "{couch_native_process, start_link, []}",
- couch_log:error("~nNativeEnabled: ~p~n", [NativeEnabled]),
% there surely is a more elegant way to do this that eludes me at present
case {NativeEnabled, NativeLegacyEnabled} of
{true, _} -> true;