Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 42a3446

Browse files
committed
Remove warnings when readline is not used.
1 parent 13d44b4 commit 42a3446

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

src/bin/psql/psql.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.27 1996/11/10 03:04:12 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.28 1996/11/11 05:55:30 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -26,7 +26,7 @@
2626
#include "psqlHelp.h"
2727

2828
#ifdef NOREADLINE
29-
extern char *readline(char *); /* in rlstubs.c */
29+
#include "rlstubs.h"
3030
#else
3131
/* from the GNU readline library */
3232
#ifdef OLD_READLINE

src/bin/psql/rlstubs.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/rlstubs.c,v 1.2 1996/07/30 07:47:58 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/rlstubs.c,v 1.3 1996/11/11 05:55:32 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include <stdio.h>
1515

16+
#include "rlstubs.h"
17+
1618
char *
1719
readline(char *prompt)
1820
{
@@ -23,19 +25,19 @@ readline(char *prompt)
2325
}
2426

2527
int
26-
write_history()
28+
write_history(char *dum)
2729
{
2830
return 0;
2931
}
3032

3133
int
32-
using_history()
34+
using_history(void)
3335
{
3436
return 0;
3537
}
3638

3739
int
38-
add_history()
40+
add_history(char *dum)
3941
{
4042
return 0;
4143
}

src/bin/psql/rlstubs.h

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* rlstubs.h
4+
* stub routines when compiled without readline and history libraries
5+
*
6+
* Copyright (c) 1994-5, Regents of the University of California
7+
*
8+
*
9+
* IDENTIFICATION
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/rlstubs.h,v 1.1 1996/11/11 05:55:33 momjian Exp $
11+
*
12+
*-------------------------------------------------------------------------
13+
*/
14+
extern char *readline(char *prompt);
15+
16+
extern int write_history(char *dum);
17+
18+
extern int using_history(void);
19+
20+
extern int add_history(char *dum);

0 commit comments

Comments
 (0)