postgres/src/bin/psql/input.h
Bruce Momjian f43ec05d05 I've made a diff against the 7.0beta1 tree that accomplishes several things:
1) adds NetBSD shared lib support on both ELF and a.out platforms

        2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
           Makefile.global.  This makes it much easier to build stuff in
           the source tree after you've already installed the libraries.

        3) adds TEMPLATEDIR in Makefile.global that indicates where the
           database templates are stored.  This separates the template files
           from real libraries that are installed in $(LIBDIR).
        4) changes include order of <readline/readline.h> and <readline.h>.
           The latest GNU readline installs its headers under a readline
           subdirectory.

In addition to applying the patch below the following files need to be copied:

        backend/port/dynloader:
                bsd.h -> netbsd.h
                bsd.c -> netbsd.c
        include/port:
                bsd.h -> netbsd.h
        makefiles:
                Makefile.bsd -> Makefile.netbsd

It would be great to see this incorporated into the source tree before
the 7.0 release is cut.

        Thanks!

     -- Johnny C. Lam <lamj@stat.cmu.edu>
2000-03-08 01:58:46 +00:00

45 lines
1.1 KiB
C

/*
* psql - the PostgreSQL interactive terminal
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.9 2000/03/08 01:58:22 momjian Exp $
*/
#ifndef INPUT_H
#define INPUT_H
/*
* 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.
*/
#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_LIBHISTORY) || (defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_IN_READLINE))
# 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
#endif
char * gets_interactive(char *prompt);
char * gets_fromFile(FILE *source);
void initializeInput(int flags);
bool saveHistory(char *fname);
void finishInput(void);
#endif /* INPUT_H */