summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in8
-rw-r--r--ext/readline/readline.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index a2ea066d25..77c00343a5 100644
--- a/configure.in
+++ b/configure.in
@@ -1418,6 +1418,14 @@ if test "$with_dln_a_out" != yes; then
darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_LIBRARY_PATH}
+ # /usr/local/include is always searched for
+ # some reason, but /usr/local/lib is not.
+ hdr=`find /usr/local/include -name \*.h -type f | sed 's:^/usr/local/include/::;q'`
+ if test -n "$hdr" && $CC -E -include "$hdr" -xc /dev/null | fgrep -q "$hdr"; then
+ $CC -print-search-dirs | grep -q '^libraries:.*:/usr/local/lib/*' ||
+ echo " $LDFLAGS " | grep -q ' -L */usr/local/lib/* ' ||
+ LDFLAGS="${LDFLAGS:+$LDFLAGS }-L/usr/local/lib"
+ fi
rb_cv_dlopen=yes ;;
aix*) if test "$GCC" = yes; then
: ${LDSHARED='$(CC) -shared'}
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 87a1ff0371..7912989c21 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -1176,7 +1176,7 @@ Init_readline()
VALUE history, fcomp, ucomp, version;
/* Allow conditional parsing of the ~/.inputrc file. */
- rl_readline_name = "Ruby";
+ rl_readline_name = (char *)"Ruby";
using_history();
@@ -1287,7 +1287,7 @@ Init_readline()
#else
{
HIST_ENTRY *entry = remove_history(0);
- free(entry->line);
+ free((char *)entry->line);
free(entry);
}
#endif