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
5c1f31d2
Commit
5c1f31d2
authored
Apr 10, 2002
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Readline and Zlib now required by default. Add options --without-readline
and --without-zlib to turn them off.
parent
563673e1
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
864 additions
and
442 deletions
+864
-442
config/programs.m4
config/programs.m4
+22
-1
configure
configure
+732
-358
configure.in
configure.in
+56
-31
doc/src/sgml/installation.sgml
doc/src/sgml/installation.sgml
+30
-6
doc/src/sgml/release.sgml
doc/src/sgml/release.sgml
+2
-1
src/bin/psql/input.c
src/bin/psql/input.c
+6
-8
src/bin/psql/input.h
src/bin/psql/input.h
+13
-19
src/bin/psql/startup.c
src/bin/psql/startup.c
+2
-11
src/include/pg_config.h.in
src/include/pg_config.h.in
+1
-7
No files found.
config/programs.m4
View file @
5c1f31d2
# $Header: /cvsroot/pgsql/config/programs.m4,v 1.
9 2002/04/10 16:45:24
petere Exp $
# $Header: /cvsroot/pgsql/config/programs.m4,v 1.
10 2002/04/10 22:46:33
petere Exp $
# PGAC_PATH_FLEX
...
...
@@ -115,6 +115,27 @@ fi])# PGAC_CHECK_READLINE
# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
# ---------------------------------------
# Readline versions < 2.1 don't have rl_completion_append_character
AC_DEFUN([PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER],
[AC_MSG_CHECKING([for rl_completion_append_character])
AC_TRY_LINK([#include <stdio.h>
#ifdef HAVE_READLINE_READLINE_H
# include <readline/readline.h>
#elif defined(HAVE_READLINE_H)
# include <readline.h>
#endif
],
[rl_completion_append_character = 'x';],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
[Define if you have rl_completion_append_character])],
[AC_MSG_RESULT(no)])])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
# PGAC_CHECK_GETTEXT
# ------------------
...
...
configure
View file @
5c1f31d2
This diff is collapsed.
Click to expand it.
configure.in
View file @
5c1f31d2
dnl Process this file with autoconf to produce a configure script.
dnl $Header: /cvsroot/pgsql/configure.in,v 1.17
6 2002/04/10 16:45:24
petere Exp $
dnl $Header: /cvsroot/pgsql/configure.in,v 1.17
7 2002/04/10 22:46:31
petere Exp $
dnl Developers, please strive to achieve this order:
dnl
...
...
@@ -511,6 +511,19 @@ PGAC_ARG_OPTARG(with, openssl,
AC_SUBST(with_openssl)
#
# Readline
#
PGAC_ARG_BOOL(with, readline, yes,
[ --without-readline do not use Readline])
#
# Zlib
#
PGAC_ARG_BOOL(with, zlib, yes,
[ --without-zlib do not use Zlib])
#
# Optionally enable the building of the ODBC driver
...
...
@@ -676,11 +689,6 @@ fi
## Libraries
##
PGAC_CHECK_READLINE
AC_SEARCH_LIBS(using_history, history,
[AC_DEFINE(HAVE_HISTORY_FUNCTIONS, 1,
[Define if you have the history functions])])
if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
then
AC_CHECK_LIB(bsd, main)
...
...
@@ -705,16 +713,23 @@ AC_CHECK_LIB([[unix]], main)
AC_SEARCH_LIBS(crypt, crypt)
# BeOS:
AC_CHECK_LIB(bind, __inet_ntoa)
# Only consider libz to be present if we find <zlib.h> as well;
# furthermore, check that <zlib.h> defines z_streamp (versions before
# about 1.0.4 did not). While we could work around the lack of z_streamp,
# it seems unwise to encourage people to use such old zlib versions...
AC_EGREP_HEADER(z_streamp, zlib.h, [
AC_CHECK_LIB(z, inflate)
])
# Solaris:
AC_SEARCH_LIBS(fdatasync, [rt posix4])
if test "$with_readline" = yes; then
PGAC_CHECK_READLINE
if test x"$pgac_cv_check_readline" = x"no"; then
AC_MSG_ERROR([readline library not found
Use --without-readline to disable readline support.])
fi
fi
if test "$with_zlib" = yes; then
AC_CHECK_LIB(z, inflate, [],
[AC_MSG_ERROR([zlib library not found
Use --without-zlib to disable zlib support.])])
fi
if test "$with_krb4" = yes ; then
AC_CHECK_LIB(des, [des_encrypt], [], [AC_MSG_ERROR([library 'des' is required for Kerberos 4])])
AC_CHECK_LIB(krb, [krb_sendauth], [], [AC_MSG_ERROR([library 'krb' is required for Kerberos 4])])
...
...
@@ -756,8 +771,21 @@ AC_CHECK_HEADERS([netinet/tcp.h], [], [],
#endif
])
AC_CHECK_HEADERS([readline/readline.h readline.h], [break])
AC_CHECK_HEADERS([readline/history.h history.h], [break])
if test "$with_readline" = yes; then
AC_CHECK_HEADERS([readline/readline.h], [],
[AC_CHECK_HEADERS([readline.h], [],
[AC_MSG_ERROR([readline header not found
Use --without-readline to disable readline support.])])])
AC_CHECK_HEADERS([readline/history.h], [],
[AC_CHECK_HEADERS([history.h], [],
[AC_MSG_ERROR([history header not found
Use --without-readline to disable readline support.])])])
fi
if test "$with_zlib" = yes; then
AC_CHECK_HEADER(zlib.h, [], [AC_MSG_ERROR([zlib header not found
Use --without-zlib to disable zlib support.])])
fi
if test "$with_krb4" = yes ; then
AC_CHECK_HEADER(krb.h, [], [AC_MSG_ERROR([header file <krb.h> is required for Kerberos 4])])
...
...
@@ -796,6 +824,15 @@ AC_CHECK_TYPES([struct cmsgcred, struct fcred, struct sockcred], [], [],
#include <sys/socket.h>
#include <sys/ucred.h>])
if test "$with_zlib" = yes; then
# Check that <zlib.h> defines z_streamp (versions before about 1.0.4
# did not). While we could work around the lack of z_streamp, it
# seems unwise to encourage people to use such old zlib versions...
AC_CHECK_TYPE(z_streamp, [], [AC_MSG_ERROR([zlib version is too old
Use --without-zlib to disable zlib support.])],
[#include <zlib.h>])
fi
if test "$with_krb5" = yes; then
# Check for differences between MIT and Heimdal (KTH) releases
AC_CHECK_MEMBERS([krb5_ticket.enc_part2], [],
...
...
@@ -914,22 +951,10 @@ AC_CHECK_FUNCS(rint, [],
[AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB)])
# 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_READLINE_H
# include <readline/readline.h>
#elif defined(HAVE_READLINE_H)
# include <readline.h>
#endif
],
[rl_completion_append_character = 'x';],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
[Define if you have rl_completion_append_character])],
[AC_MSG_RESULT(no)])
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])
if test "$with_readline" = yes; then
PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])
fi
dnl Cannot use AC_CHECK_FUNC because finite may be a macro
...
...
doc/src/sgml/installation.sgml
View file @
5c1f31d2
<
!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.7
6 2002/04/10 16:45:25
petere Exp $ -->
<
!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.7
7 2002/04/10 22:46:33
petere Exp $ -->
<
chapter
id
=
"installation"
>
<
title
><
![%standalone-include[<productname>PostgreSQL</>]]>
...
...
@@ -92,11 +92,12 @@ su - postgres
<
primary
>
readline
</
primary
>
</
indexterm
>
The
<
acronym
>
GNU
</>
<
productname
>
Readline
</>
library
(
for
comfortable
line
editing
and
command
history
retrieval
)
will
automatically
be
used
if
found
.
You
might
wish
to
install
it
before
proceeding
,
but
it
is
not
essential
.
(
On
<
productname
>
NetBSD
</
productname
>,
the
<
filename
>
libedit
</
filename
>
library
is
The
<
acronym
>
GNU
</>
<
productname
>
Readline
</>
library
(
for
comfortable
line
editing
and
command
history
retrieval
)
will
be
used
by
default
.
If
you
don
't want to use it then you must
specify the <option>--without-readline</option> option for
<filename>configure</>. (On <productname>NetBSD</productname>,
the <filename>libedit</filename> library is
<productname>readline</productname>-compatible and is used if
<filename>libreadline</filename> is not found.)
</para>
...
...
@@ -847,6 +848,29 @@ su - postgres
</
listitem
>
</
varlistentry
>
<
varlistentry
>
<
term
><
option
>--
without
-
readline
</
option
></
term
>
<
listitem
>
<
para
>
Prevents
the
use
of
the
Readline
library
.
This
disables
command
-
line
editing
and
history
in
<
application
>
psql
</
application
>,
so
it
is
not
recommended
.
</
para
>
</
listitem
>
</
varlistentry
>
<
varlistentry
>
<
term
><
option
>--
without
-
zlib
</
option
></
term
>
<
listitem
>
<
para
>
Prevents
the
use
of
the
Zlib
library
.
This
disables
compression
support
in
<
application
>
pg_dump
</
application
>.
This
option
is
only
intended
for
those
rare
systems
where
this
library
is
not
available
.
</
para
>
</
listitem
>
</
varlistentry
>
<
varlistentry
>
<
term
><
option
>--
enable
-
debug
</
option
></
term
>
<
listitem
>
...
...
doc/src/sgml/release.sgml
View file @
5c1f31d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.13
1 2002/04/05 00:31:23 tgl
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.13
2 2002/04/10 22:46:48 petere
Exp $
-->
<appendix id="release">
...
...
@@ -24,6 +24,7 @@ CDATA means the content is "SGML-free", so you can write without
worries about funny characters.
-->
<literallayout><![CDATA[
Readline and Zlib are now required by default and must be turned off explicitly if their use is not desired
Define a third class of function volatility to allow indexscans in more cases
Locale support is now built by default; choice of locale is set by initdb and/or at run-time
ALTER TABLE ALTER COLUMN SET/DROP NOT NULL
...
...
src/bin/psql/input.c
View file @
5c1f31d2
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.1
8 2001/10/25 05:49:54 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.1
9 2002/04/10 22:46:58 petere
Exp $
*/
#include "postgres_fe.h"
#include "input.h"
...
...
@@ -19,8 +19,6 @@
/* (of course there is no runtime command for doing that :) */
#ifdef USE_READLINE
static
bool
useReadline
;
#endif
#ifdef USE_HISTORY
static
bool
useHistory
;
#endif
...
...
@@ -44,7 +42,7 @@ gets_interactive(char *prompt)
{
char
*
s
;
#ifdef USE_
HISTORY
#ifdef USE_
READLINE
const
char
*
var
;
static
char
*
prev_hist
=
NULL
;
#endif
...
...
@@ -62,7 +60,7 @@ gets_interactive(char *prompt)
}
#endif
#ifdef USE_
HISTORY
#ifdef USE_
READLINE
if
(
useHistory
&&
s
&&
s
[
0
]
!=
'\0'
)
{
var
=
GetVariable
(
pset
.
vars
,
"HISTCONTROL"
);
...
...
@@ -133,7 +131,7 @@ initializeInput(int flags)
}
#endif
#ifdef USE_
HISTORY
#ifdef USE_
READLINE
if
(
flags
==
1
)
{
const
char
*
home
;
...
...
@@ -168,7 +166,7 @@ initializeInput(int flags)
bool
saveHistory
(
char
*
fname
)
{
#ifdef USE_
HISTORY
#ifdef USE_
READLINE
if
(
useHistory
&&
fname
)
{
if
(
write_history
(
fname
)
!=
0
)
...
...
@@ -194,7 +192,7 @@ finishInput(void)
finishInput
(
int
exitstatus
,
void
*
arg
)
#endif
{
#ifdef USE_
HISTORY
#ifdef USE_
READLINE
if
(
useHistory
)
{
char
*
home
;
...
...
src/bin/psql/input.h
View file @
5c1f31d2
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.1
5 2001/11/05 17:46:31 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.1
6 2002/04/10 22:47:03 petere
Exp $
*/
#ifndef INPUT_H
#define INPUT_H
...
...
@@ -12,26 +12,20 @@
* If some other file needs to have access to readline/history, include this
* file and save yourself all this work.
*
* USE_READLINE
and USE_HISTORY are
the definite pointers regarding existence or not.
* USE_READLINE
is
the definite pointers regarding existence or not.
*/
#ifdef HAVE_LIBREADLINE
#if defined(HAVE_READLINE_READLINE_H)
#include <readline/readline.h>
#define USE_READLINE 1
#elif defined(HAVE_READLINE_H)
#include <readline.h>
#define USE_READLINE 1
#endif
#endif
#if defined(HAVE_HISTORY_FUNCTIONS)
#if defined(HAVE_READLINE_HISTORY_H)
#include <readline/history.h>
#define USE_HISTORY 1
#elif defined(HAVE_HISTORY_H)
#include <history.h>
#define USE_HISTORY 1
#endif
# define USE_READLINE 1
# if defined(HAVE_READLINE_READLINE_H)
# include <readline/readline.h>
# elif defined(HAVE_READLINE_H)
# include <readline.h>
# endif
# if defined(HAVE_READLINE_HISTORY_H)
# include <readline/history.h>
# elif defined(HAVE_HISTORY_H)
# include <history.h>
# endif
#endif
char
*
gets_interactive
(
char
*
prompt
);
...
...
src/bin/psql/startup.c
View file @
5c1f31d2
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.5
5 2002/03/27 19:16:13
petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.5
6 2002/04/10 22:47:04
petere Exp $
*/
#include "postgres_fe.h"
...
...
@@ -636,7 +636,7 @@ showVersion(void)
{
puts
(
"psql (PostgreSQL) "
PG_VERSION
);
#if defined(USE_READLINE) || defined
(USE_HISTORY) || defined
(MULTIBYTE)
#if defined(USE_READLINE) || defined(MULTIBYTE)
fputs
(
gettext
(
"contains support for: "
),
stdout
);
#ifdef USE_READLINE
...
...
@@ -644,15 +644,6 @@ showVersion(void)
#define _Feature
#endif
#ifdef USE_HISTORY
#ifdef _Feature
fputs
(
", "
,
stdout
);
#else
#define _Feature
#endif
fputs
(
gettext
(
"history"
),
stdout
);
#endif
#ifdef MULTIBYTE
#ifdef _Feature
fputs
(
", "
,
stdout
);
...
...
src/include/pg_config.h.in
View file @
5c1f31d2
...
...
@@ -8,7 +8,7 @@
* or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: pg_config.h.in,v 1.2
0 2002/04/03 05:39:33
petere Exp $
* $Id: pg_config.h.in,v 1.2
1 2002/04/10 22:47:09
petere Exp $
*/
#ifndef PG_CONFIG_H
...
...
@@ -420,9 +420,6 @@
/* Define if you have the stricmp function. */
#undef HAVE_STRICMP
/* 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
...
...
@@ -590,9 +587,6 @@ extern int fdatasync(int fildes);
/* Set to 1 if you have libreadline.a */
#undef HAVE_LIBREADLINE
/* Set to 1 if you have libhistory.a */
#undef HAVE_LIBHISTORY
/* Set to 1 if your libreadline defines rl_completion_append_character */
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER
...
...
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