autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Erlang: Use single quotes in argument to code:lib_dir(Name)


From: Richard Carlsson
Subject: [PATCH] Erlang: Use single quotes in argument to code:lib_dir(Name)
Date: Thu, 15 Mar 2018 11:04:24 +0100

Name should be an atom (single quotes), not a string (double quotes). The
current code works by accident, but could stop doing so in future releases
of Erlang/OTP. See http://erlang.org/doc/man/code.html#lib_dir-1

diff --git a/lib/autoconf/erlang.m4 b/lib/autoconf/erlang.m4
index c757cd1..d188f34 100644
--- a/lib/autoconf/erlang.m4
+++ b/lib/autoconf/erlang.m4
@@ -180,7 +180,7 @@ AC_CACHE_CHECK([for Erlang/OTP '$1' library subdirectory],
     [AC_LANG_PUSH(Erlang)[]dnl
      AC_RUN_IFELSE(
        [AC_LANG_PROGRAM([], [dnl
-           ReturnValue = case code:lib_dir("[$1]") of
+           ReturnValue = case code:lib_dir('[$1]') of
            {error, bad_name} ->
                file:write_file("conftest.out", "not found\n"),
                1;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]