summaryrefslogtreecommitdiff
path: root/main/editline
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-03-03 15:54:28 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-03-03 15:54:28 +0000
commit6a90983ce617abf3e6fd025aada1332ba779f3b8 (patch)
treed865a6be441ed2ad5ae109d5eb2795fa3534188a /main/editline
parent8ef8706944f747d8bf8863a0e52ccacff9efb485 (diff)
Eliminate remaining libedit warnings (shown in bamboo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/editline')
-rw-r--r--main/editline/Makefile.in2
-rwxr-xr-xmain/editline/configure129
-rw-r--r--main/editline/configure.in1
-rw-r--r--main/editline/sys.h2
4 files changed, 134 insertions, 0 deletions
diff --git a/main/editline/Makefile.in b/main/editline/Makefile.in
index 5bb097f48..4b5b6dd2e 100644
--- a/main/editline/Makefile.in
+++ b/main/editline/Makefile.in
@@ -2,6 +2,8 @@
# Generic Makefile for libedit.
#
+GREP=@GREP@
+
OSTYPE=$(shell uname -s)
define cyg_subst_sys
if uname -s | ${GREP} -qi cygwin; then \
diff --git a/main/editline/configure b/main/editline/configure
index af4523c5e..6132183d5 100755
--- a/main/editline/configure
+++ b/main/editline/configure
@@ -1115,6 +1115,135 @@ else
fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+
+
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
echo "configure:1120: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
diff --git a/main/editline/configure.in b/main/editline/configure.in
index a83eb8366..b2b3fb47b 100644
--- a/main/editline/configure.in
+++ b/main/editline/configure.in
@@ -77,6 +77,7 @@ esac
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PATH_PROG(AR, ar, , $PATH)
+AC_PROG_GREP
dnl Search for termcap access routines in termcap, tinfo, curses, and ncurses.
AC_CHECK_LIB(termcap, tgetent, , \
diff --git a/main/editline/sys.h b/main/editline/sys.h
index cb2389de2..80feb5705 100644
--- a/main/editline/sys.h
+++ b/main/editline/sys.h
@@ -75,11 +75,13 @@ char *fgetln(FILE *fp, size_t *len);
#endif
#ifndef HAVE_STRLCPY
+#undef strlcpy /* We define this in top-level Asterisk to point towards ast_copy_string */
#define strlcpy libedit_strlcpy
size_t strlcpy(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_STRLCAT
+#undef strlcat /* We define this in top-level Asterisk to point towards the ast_str_* APIs */
#define strlcat libedit_strlcat
size_t strlcat(char *dst, const char *src, size_t siz);
#endif