1 #ifndef _system_readline_h
2 #define _system_readline_h
4 Unix SMB/CIFS implementation.
8 ** NOTE! The following LGPL license applies to the replace
9 ** library. This does NOT imply that all of Samba is released
12 This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Lesser General Public
14 License as published by the Free Software Foundation; either
15 version 3 of the License, or (at your option) any later version.
17 This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public
23 License along with this library; if not, see <http://www.gnu.org/licenses/>.
27 #ifdef HAVE_LIBREADLINE
28 # ifdef HAVE_READLINE_READLINE_H
29 # ifdef HAVE_READLINE_READLINE_WORKAROUND
30 # define _FUNCTION_DEF
32 # include <readline/readline.h>
33 # ifdef HAVE_READLINE_HISTORY_H
34 # include <readline/history.h>
37 # ifdef HAVE_READLINE_H
38 # include <readline.h>
39 # ifdef HAVE_HISTORY_H
43 # undef HAVE_LIBREADLINE
48 #ifdef HAVE_NEW_LIBREADLINE
49 #ifdef HAVE_CPPFUNCTION
50 # define RL_COMPLETION_CAST (CPPFunction *)
51 #elif defined(HAVE_RL_COMPLETION_T)
52 # define RL_COMPLETION_CAST (rl_completion_t *)
54 # define RL_COMPLETION_CAST
57 /* This type is missing from libreadline<4.0 (approximately) */
58 # define RL_COMPLETION_CAST
59 #endif /* HAVE_NEW_LIBREADLINE */