blob: 3020511e2ac3b28684893d5867314611405562bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
$NetBSD: patch-aq,v 1.1 2000/01/26 22:11:37 jlam Exp $
--- rptp/rptp.c.orig Sat Mar 20 19:45:08 1999
+++ rptp/rptp.c Tue Jan 18 16:15:34 2000
@@ -31,10 +31,23 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_LIBREADLINE
-#include <readline/readline.h>
-#include <readline/history.h>
-#endif /* HAVE_LIBREADLINE */
+
+#ifdef HAVE_READLINE
+# ifdef HAVE_READLINE_H
+# include <readline.h>
+# ifdef HAVE_HISTORY_H
+# include <history.h>
+# endif
+# elif defined(HAVE_READLINE_READLINE_H)
+# include <readline/readline.h>
+# ifdef HAVE_READLINE_HISTORY_H
+# include <readline/history.h>
+# endif
+# else
+# undef HAVE_READLINE
+# endif
+#endif /* HAVE_READLINE */
+
#include "rplay.h"
#include "getopt.h"
@@ -249,7 +262,7 @@
{
if (!raw)
{
-#ifdef HAVE_LIBREADLINE
+#ifdef HAVE_READLINE
p = readline(prompt);
if (!p)
{
@@ -263,7 +276,7 @@
#endif
}
-#ifndef HAVE_LIBREADLINE
+#ifndef HAVE_READLINE
if (fgets(buf, sizeof(buf), stdin) == NULL)
{
done(0);
|