Skip to content
Permalink
Browse files
Format code using erlfmt
  • Loading branch information
kocolosk committed Nov 6, 2021
1 parent 47e1d4c commit 90b86c13fd5a757f596e5f3f74ede81e9a1fcaad
Showing 16 changed files with 706 additions and 919 deletions.
@@ -10,26 +10,27 @@
% License for the specific language governing permissions and limitations under
% the License.


-define(ERLFDB_ERROR(Reason), erlang:error({?MODULE, Reason})).


-define(ERLFDB_PACK(Tuple), erlfdb_tuple:pack(Tuple)).
-define(ERLFDB_PACK(Prefix, Tuple), erlfdb_tuple:pack(Tuple, Prefix)).

-define(ERLFDB_RANGE(Prefix),
erlfdb_subspace:range(erlfdb_subspace:create({}, Prefix))).
erlfdb_subspace:range(erlfdb_subspace:create({}, Prefix))
).
-define(ERLFDB_RANGE(Prefix, Term),
erlfdb_subspace:range(erlfdb_subspace:create({Term}, Prefix))).
erlfdb_subspace:range(erlfdb_subspace:create({Term}, Prefix))
).

-define(ERLFDB_EXTEND(Prefix, Term), erlfdb_tuple:pack({Term}, Prefix)).

-define(ERLFDB_EXTRACT(Prefix, Packed), (fun() ->
-define(ERLFDB_EXTRACT(Prefix, Packed),
(fun() ->
__PrefixLen = size(Prefix),
<<Prefix:__PrefixLen/binary, __Tail/binary>> = Packed,
erlfdb_tuple:unpack(__Tail)
end)()).

end)()
).

% Most of the retriable FDB errors. The list of errors can be generated with
% something like [erlfdb:get_error_string(C) || C <- lists:seq(1, 5000),
@@ -54,6 +55,7 @@
% include ?TRANSACTION_TIMED_OUT. In some cases it may make sense to also
% consider that error as retryable.
%
%% erlfmt-ignore
-define(ERLFDB_IS_RETRYABLE(Code), (
(Code == ?ERLFDB_TRANSACTION_TOO_OLD) orelse
(Code == ?ERLFDB_FUTURE_VERSION) orelse
@@ -18,19 +18,37 @@
]}.

{port_env, [
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"CFLAGS", "$CFLAGS -I/usr/local/include -Ic_src/ -g -Wall -Werror"},
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"CXXFLAGS", "$CXXFLAGS -I/usr/local/include -Ic_src/ -g -Wall -Werror"},
{"win32",
"CFLAGS", "$CFLAGS /I\"c:/Program Files/foundationdb/include\" /O2 /DNDEBUG"},
{"win32",
"CXXFLAGS", "$CXXFLAGS /I\"c:/Program Files/foundationdb/include\" /O2 /DNDEBUG"},
{
"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"CFLAGS",
"$CFLAGS -I/usr/local/include -Ic_src/ -g -Wall -Werror"
},
{
"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"CXXFLAGS",
"$CXXFLAGS -I/usr/local/include -Ic_src/ -g -Wall -Werror"
},
{
"win32",
"CFLAGS",
"$CFLAGS /I\"c:/Program Files/foundationdb/include\" /O2 /DNDEBUG"
},
{
"win32",
"CXXFLAGS",
"$CXXFLAGS /I\"c:/Program Files/foundationdb/include\" /O2 /DNDEBUG"
},

{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"LDFLAGS", "$LDFLAGS -L/usr/local/lib -lfdb_c"},
{"win32",
"LDFLAGS", "$LDFLAGS /LIBPATH:\"c:/Program Files/foundationdb/lib/foundationdb\" fdb_c.lib"}
{
"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"LDFLAGS",
"$LDFLAGS -L/usr/local/lib -lfdb_c"
},
{
"win32",
"LDFLAGS",
"$LDFLAGS /LIBPATH:\"c:/Program Files/foundationdb/lib/foundationdb\" fdb_c.lib"
}
]}.

{profiles, [

0 comments on commit 90b86c1

Please sign in to comment.