| 1 | #ifndef _system_readline_h
 | 
|---|
| 2 | #define _system_readline_h
 | 
|---|
| 3 | /* 
 | 
|---|
| 4 |    Unix SMB/CIFS implementation.
 | 
|---|
| 5 | 
 | 
|---|
| 6 |    Readline wrappers
 | 
|---|
| 7 |    
 | 
|---|
| 8 |      ** NOTE! The following LGPL license applies to the replace
 | 
|---|
| 9 |      ** library. This does NOT imply that all of Samba is released
 | 
|---|
| 10 |      ** under the LGPL
 | 
|---|
| 11 |    
 | 
|---|
| 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.
 | 
|---|
| 16 | 
 | 
|---|
| 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.
 | 
|---|
| 21 | 
 | 
|---|
| 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/>.
 | 
|---|
| 24 | 
 | 
|---|
| 25 | */
 | 
|---|
| 26 | 
 | 
|---|
| 27 | #ifdef HAVE_LIBREADLINE
 | 
|---|
| 28 | #  ifdef HAVE_READLINE_READLINE_H
 | 
|---|
| 29 | #    include <readline/readline.h>
 | 
|---|
| 30 | #    ifdef HAVE_READLINE_HISTORY_H
 | 
|---|
| 31 | #      include <readline/history.h>
 | 
|---|
| 32 | #    endif
 | 
|---|
| 33 | #  else
 | 
|---|
| 34 | #    ifdef HAVE_READLINE_H
 | 
|---|
| 35 | #      include <readline.h>
 | 
|---|
| 36 | #      ifdef HAVE_HISTORY_H
 | 
|---|
| 37 | #        include <history.h>
 | 
|---|
| 38 | #      endif
 | 
|---|
| 39 | #    else
 | 
|---|
| 40 | #      undef HAVE_LIBREADLINE
 | 
|---|
| 41 | #    endif
 | 
|---|
| 42 | #  endif
 | 
|---|
| 43 | #endif
 | 
|---|
| 44 | 
 | 
|---|
| 45 | #ifdef HAVE_NEW_LIBREADLINE
 | 
|---|
| 46 | #ifdef HAVE_CPPFUNCTION
 | 
|---|
| 47 | #  define RL_COMPLETION_CAST (CPPFunction *)
 | 
|---|
| 48 | #elif HAVE_RL_COMPLETION_T
 | 
|---|
| 49 | #  define RL_COMPLETION_CAST (rl_completion_t *)
 | 
|---|
| 50 | #else
 | 
|---|
| 51 | #  define RL_COMPLETION_CAST
 | 
|---|
| 52 | #endif
 | 
|---|
| 53 | #else
 | 
|---|
| 54 | /* This type is missing from libreadline<4.0  (approximately) */
 | 
|---|
| 55 | #  define RL_COMPLETION_CAST
 | 
|---|
| 56 | #endif /* HAVE_NEW_LIBREADLINE */
 | 
|---|
| 57 | 
 | 
|---|
| 58 | #endif
 | 
|---|