Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
831e78e0
Commit
831e78e0
authored
Oct 03, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better coding of readline tests
parent
1b7332fb
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
365 additions
and
440 deletions
+365
-440
configure
configure
+322
-398
configure.in
configure.in
+35
-21
src/bin/psql/input.h
src/bin/psql/input.h
+2
-2
src/bin/psql/tab-complete.c
src/bin/psql/tab-complete.c
+2
-12
src/include/config.h.in
src/include/config.h.in
+4
-7
No files found.
configure
View file @
831e78e0
This diff is collapsed.
Click to expand it.
configure.in
View file @
831e78e0
...
...
@@ -612,9 +612,8 @@ fi
AC_CHECK_LIB(sfio, main)
AC_CHECK_LIB(ncurses, main, [], [AC_CHECK_LIB(curses, main)])
AC_CHECK_LIB(termcap, main)
AC_CHECK_LIB(readline, main)
AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE),
AC_CHECK_LIB(history, main) )
AC_CHECK_LIB(readline, readline)
AC_SEARCH_LIBS(using_history, history, [AC_DEFINE(HAVE_HISTORY_FUNCTIONS)])
if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
then
...
...
@@ -832,24 +831,39 @@ AC_CHECK_FUNC(rint,
AC_DEFINE(HAVE_RINT),
AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB))
dnl Some old versions of libreadline don't have rl_completion_append_character
AC_EGREP_HEADER(rl_completion_append_character, readline.h,
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER),
[AC_EGREP_HEADER(rl_completion_append_character, readline/readline.h,
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER))])
AC_SUBST(HAVE_RL_COMPLETION_APPEND_CHARACTER)
dnl Check for readline's filename_completion_function.
dnl Some versions have it but it's not in the headers, so we have to take
dnl care of that, too.
AC_CHECK_FUNCS(filename_completion_function,
AC_EGREP_HEADER(filename_completion_function, readline.h,
AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL),
[AC_EGREP_HEADER(filename_completion_function, readline/readline.h,
AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL))])
)
AC_SUBST(HAVE_FILENAME_COMPLETION_FUNCTION)
AC_SUBST(HAVE_FILENAME_COMPLETION_FUNCTION_DECL)
# Readline versions < 2.1 don't have rl_completion_append_character
AC_MSG_CHECKING([for rl_completion_append_character])
AC_TRY_LINK([#include <stdio.h>
#ifdef HAVE_READLINE_H
# include <readline.h>
#endif
#ifdef HAVE_READLINE_READLINE_H
# include <readline/readline.h>
#endif],
[rl_completion_append_character = 'x';],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER)],
[AC_MSG_RESULT(no)])
# Check whether readline's filename_completion_function is declared.
# Some prehistoric versions of readline, in particular those shipped
# with earlier Cygwins don't have this declared, although it's in the
# library.
AC_MSG_CHECKING([whether filename_completion_function is declared])
if test "$ac_cv_header_readline_h" = yes; then
_readline_header='readline.h'
elif test "$ac_cv_header_readline_readline_h" = yes; then
_readline_header='readline/readline.h'
else
_readline_header='xxx'
fi
AC_EGREP_HEADER([filename_completion_function], [$_readline_header],
[AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
dnl Cannot use AC_CHECK_FUNC because finite may be a macro
...
...
src/bin/psql/input.h
View file @
831e78e0
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.1
0 2000/04/12 17:16:22 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.1
1 2000/10/03 19:50:20 petere
Exp $
*/
#ifndef INPUT_H
#define INPUT_H
...
...
@@ -24,7 +24,7 @@
#endif
#endif
#if defined(HAVE_
LIBHISTORY) || (defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_IN_READLINE)
)
#if defined(HAVE_
HISTORY_FUNCTIONS
)
#if defined(HAVE_READLINE_HISTORY_H)
#include <readline/history.h>
#define USE_HISTORY 1
...
...
src/bin/psql/tab-complete.c
View file @
831e78e0
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.2
0 2000/06/25 14:25:51
petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.2
1 2000/10/03 19:50:20
petere Exp $
*/
/*----------------------------------------------------------------------
...
...
@@ -60,7 +60,7 @@
#include "common.h"
#include "settings.h"
#if
defined(HAVE_FILENAME_COMPLETION_FUNCTION) && !defined(HAVE_FILENAME_COMPLETION_FUNCTION_DECL)
#if
ndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
char
*
filename_completion_function
(
char
*
,
int
);
#endif
...
...
@@ -699,17 +699,7 @@ psql_completion(char *text, int start, int end)
strcmp
(
prev_wd
,
"
\\
w"
)
==
0
||
strcmp
(
prev_wd
,
"
\\
write"
)
==
0
)
{
#ifdef HAVE_FILENAME_COMPLETION_FUNCTION
matches
=
completion_matches
(
text
,
filename_completion_function
);
#else
/*
* This will probably have the same effect, but you never know
* what the heck some readline incarnation out there is going to
* do.
*/
matches
=
NULL
;
#endif
}
...
...
src/include/config.h.in
View file @
831e78e0
...
...
@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.1
39 2000/10/03 03:11:23 momjian
Exp $
* $Id: config.h.in,v 1.1
40 2000/10/03 19:50:21 petere
Exp $
*/
#ifndef CONFIG_H
...
...
@@ -384,8 +384,8 @@
/* Define if you have the stricmp function. */
#undef HAVE_STRICMP
/* Set to 1 if you have
libreadline and it includes history functions
*/
#undef HAVE_HISTORY_
IN_READLINE
/* Set to 1 if you have
history functions (either in libhistory or libreadline)
*/
#undef HAVE_HISTORY_
FUNCTIONS
/* Set to 1 if you have <pwd.h> */
#undef HAVE_PWD_H
...
...
@@ -547,10 +547,7 @@ extern void srandom(unsigned int seed);
/* Set to 1 if your libreadline defines rl_completion_append_character */
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER
/* Set to 1 if your libreadline has filename_completion_function */
#undef HAVE_FILENAME_COMPLETION_FUNCTION
/* Set to 1 if your readline headers actually declare the above */
/* Set to 1 if filename_completion_function is declared in the readline header */
#undef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
/* Set to 1 if you have getopt_long() (GNU long options) */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment