diff options
author | Reuben Thomas <rrt@sc3d.org> | 2007-12-07 22:07:37 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2007-12-07 22:07:37 +0000 |
commit | 6552c17a058165061a0ad9271b9178d2e593f651 (patch) | |
tree | 000117911f9cb3d9fecaf238439f4ebb93774250 | |
parent | 31a65bcab58968b635c391bd21a0b8e37a2d473c (diff) | |
download | plptools-6552c17a058165061a0ad9271b9178d2e593f651.tar.gz plptools-6552c17a058165061a0ad9271b9178d2e593f651.tar.bz2 plptools-6552c17a058165061a0ad9271b9178d2e593f651.zip |
Remove unused m4 tests, and test for readline version; we should all
be using at least 4.2 by now.
-rw-r--r-- | conf/m4/plptools/AC_REMOVE_FORBIDDEN.m4 | 23 | ||||
-rw-r--r-- | conf/m4/plptools/AC_VALIDIFY_CXXFLAGS.m4 | 7 | ||||
-rw-r--r-- | conf/m4/plptools/PLP_CHECK_READLINE.m4 | 23 | ||||
-rw-r--r-- | conf/m4/plptools/PLP_FIND_CDEV.m4 | 17 | ||||
-rw-r--r-- | conf/m4/plptools/PLP_HELP_MESSAGE.m4 | 9 | ||||
-rw-r--r-- | plpftp/ftp.cc | 34 |
6 files changed, 0 insertions, 113 deletions
diff --git a/conf/m4/plptools/AC_REMOVE_FORBIDDEN.m4 b/conf/m4/plptools/AC_REMOVE_FORBIDDEN.m4 deleted file mode 100644 index 87a4b40..0000000 --- a/conf/m4/plptools/AC_REMOVE_FORBIDDEN.m4 +++ /dev/null @@ -1,23 +0,0 @@ -dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables -dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever]) -dnl it's all white-space separated -AC_DEFUN([AC_REMOVE_FORBIDDEN], -[ __val=$$1 - __forbid=" $2 " - if test -n "$__val"; then - __new="" - ac_save_IFS=$IFS - IFS=" " - for i in $__val; do - case "$__forbid" in - *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;; - *) # Careful to not add spaces, where there were none, because otherwise - # libtool gets confused, if we change e.g. CXX - if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;; - esac - done - IFS=$ac_save_IFS - $1=$__new - fi -]) - diff --git a/conf/m4/plptools/AC_VALIDIFY_CXXFLAGS.m4 b/conf/m4/plptools/AC_VALIDIFY_CXXFLAGS.m4 deleted file mode 100644 index 25cb7ea..0000000 --- a/conf/m4/plptools/AC_VALIDIFY_CXXFLAGS.m4 +++ /dev/null @@ -1,7 +0,0 @@ -dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given -AC_DEFUN([AC_VALIDIFY_CXXFLAGS], -[dnl - AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath]) - AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath]) -]) - diff --git a/conf/m4/plptools/PLP_CHECK_READLINE.m4 b/conf/m4/plptools/PLP_CHECK_READLINE.m4 index 4762c6a..df4e8d8 100644 --- a/conf/m4/plptools/PLP_CHECK_READLINE.m4 +++ b/conf/m4/plptools/PLP_CHECK_READLINE.m4 @@ -53,28 +53,5 @@ AC_DEFUN([PLP_CHECK_READLINE], AC_SUBST(LIBREADLINE) if test "${ac_cv_readline_libs}" != "" ; then AC_DEFINE_UNQUOTED(HAVE_LIBREADLINE,1,$rl_desc) - PLP_READLINE_VERSION - fi -]) - -dnl -dnl Check for readline version. -dnl Those readline developers change their API too frequently -dnl and don't provide a version number in the headers :-( -dnl -AC_DEFUN([PLP_READLINE_VERSION], -[ - AC_MSG_CHECKING(for readline version) - saved_libs=$LIBS - LIBS="$LIBS $LIBREADLINE" - rl42=false - AC_TRY_LINK(,[extern void rl_set_prompt(void); rl_set_prompt();],rl42=true) - LIBS="$saved_LIBS" - if $rl42 ; then - AC_MSG_RESULT(4.2 or greater) - AC_DEFINE_UNQUOTED(READLINE_VERSION,402) - else - AC_DEFINE_UNQUOTED(READLINE_VERSION,401) - AC_MSG_RESULT(4.1 or less) fi ]) diff --git a/conf/m4/plptools/PLP_FIND_CDEV.m4 b/conf/m4/plptools/PLP_FIND_CDEV.m4 deleted file mode 100644 index 25c3c34..0000000 --- a/conf/m4/plptools/PLP_FIND_CDEV.m4 +++ /dev/null @@ -1,17 +0,0 @@ -dnl -dnl Select first existing char device from a list of given devices -dnl Usage: -dnl PLP_FIND_CDEV(/dev/tty1 /dev/tty2 /dev/console, FOUND) -dnl -dnl On return, variable FOUND is set to one of the devices or to NO, if none -dnl was found. -dnl -AC_DEFUN([PLP_FIND_CDEV],[ - $2=NO - for i in $1; do - if test -c "$i" ; then - $2=$i - break 2 - fi - done -]) diff --git a/conf/m4/plptools/PLP_HELP_MESSAGE.m4 b/conf/m4/plptools/PLP_HELP_MESSAGE.m4 deleted file mode 100644 index a042d40..0000000 --- a/conf/m4/plptools/PLP_HELP_MESSAGE.m4 +++ /dev/null @@ -1,9 +0,0 @@ -dnl -dnl Insert a custom line into the output of configure --help -dnl -AC_DEFUN([PLP_HELP_MSG],[ - AC_DIVERT_PUSH(NOTICE)dnl - ac_help="$ac_help -[$1]" - AC_DIVERT_POP()dnl -]) diff --git a/plpftp/ftp.cc b/plpftp/ftp.cc index 4f7d31c..a09751a 100644 --- a/plpftp/ftp.cc +++ b/plpftp/ftp.cc @@ -1455,15 +1455,9 @@ session(rfsv & a, rpcs & r, rclip & rc, ppsocket & rclipSocket, int xargc, char } #if HAVE_LIBREADLINE -#if (READLINE_VERSION >= 402) #define FUNCAST(f) f #define CPFUNCAST(f) f #define MATCHFUNCTION rl_completion_matches -#else -#define FUNCAST(f) (Function *)f -#define CPFUNCAST(f) (CPPFunction *)f -#define MATCHFUNCTION completion_matches -#endif static const char *all_commands[] = { "pwd", "ren", "touch", "gtime", "test", "gattr", "sattr", "devs", @@ -1487,11 +1481,7 @@ static char cplPath[1024]; static char* filename_generator( -#if (READLINE_VERSION >= 402) const char *text, -#else - char *text, -#endif int state) { static int len; @@ -1530,11 +1520,7 @@ filename_generator( static char * command_generator( -#if (READLINE_VERSION >= 402) const char *text, -#else - char *text, -#endif int state) { static int idx, len; @@ -1552,15 +1538,9 @@ command_generator( return NULL; } -#if (READLINE_VERSION >= 402) static char * null_completion(const char *, int) { return ""; } -#else -static int null_completion() { - return 0; -} -#endif static char ** do_completion(const char *text, int start, int end) @@ -1569,18 +1549,11 @@ do_completion(const char *text, int start, int end) rl_completion_entry_function = FUNCAST(null_completion); rl_completion_append_character = ' '; -#if (READLINE_VERSION >= 402) rl_attempted_completion_over = 1; -#endif if (start == 0) { #if HAVE_LIBREADLINE -# if (READLINE_VERSION >= 402) matches = MATCHFUNCTION(text, command_generator); -# else - char* txt = (char*)text; - matches = MATCHFUNCTION(txt, (CPFunction*)command_generator); -# endif #endif } else { @@ -1611,14 +1584,7 @@ do_completion(const char *text, int start, int end) } #if HAVE_LIBREADLINE -# if (READLINE_VERSION >= 402) matches = MATCHFUNCTION(text, filename_generator); -# else - { - char* txt = (char*)text; - matches = MATCHFUNCTION(txt, (CPFunction*)filename_generator); - } -# endif #endif } return matches; |