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

Richard Carlsson <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <CANKG3zms2Hmk25TUgjWu7P6FVzRKPEKni8=rkaokK44Af_v6=A@mail.gmail.com>
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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.