• unknown's avatar
    Fix bug#23293 "readline detection broken on NetBSD": · 7a71303c
    unknown authored
    Its root cause is a difference between the "readline" and "libedit" (header files)
    definitions of "rl_completion_entry_function", where the "libedit" one is wrong anyway:
    This variable is used as a pointer to a function returning "char *",
    but "libedit" declares it as returning "int" and then adds casts on usage.
    
    Change it to "CPFunction *" and get rid of the casts.
    
    
    client/mysql.cc:
      Fix bug#23293 "readline detection broken on NetBSD":
      
      Now that the "libedit" header files declares "rl_completion_entry_function" correctly,
      it need not be cast on usage, and "no_completion()" can be declared to return "char *".
    cmd-line-utils/libedit/readline.c:
      Fix bug#23293 "readline detection broken on NetBSD":
      
      Now that the "libedit" header files declares "rl_completion_entry_function" correctly,
      it need not be cast on usage, and "complet_func()" is a "CPFunction *" as well.
    cmd-line-utils/libedit/readline/readline.h:
      Fix bug#23293 "readline detection broken on NetBSD":
      
      Declare "rl_completion_entry_function()" to be a "CPFunction *", this avoids casts
      and brings "libedit" in sync with "readline".
    7a71303c
mysql.cc 107 KB