2013-09-26 17:14:40 +02:00

51 lines
1.1 KiB
Plaintext

$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);