aboutsummaryrefslogtreecommitdiff
path: root/readline/examples/excallback.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-10-07 12:52:13 -0600
committerTom Tromey <tom@tromey.com>2019-08-12 10:57:56 -0600
commit775e241e9c5f2b2ff2b59972ab70e5f20763fae6 (patch)
tree597ab643dce69ee6e98e46ecac00ee85f447bb4b /readline/examples/excallback.c
parent08132bdd876fa1825810f90ecc25390dd4ded457 (diff)
downloadgdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.zip
gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.tar.gz
gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.tar.bz2
Import readline 7.0 (patch 5)
This imports readline 7.0 (up to patch 5) while preserving all gdb-local changes. This was done by checking out the readline git repository, making a branch based on the gdb baseline revision, applying the gdb changes to that branch, and then merging from readline 7. readline/ChangeLog.gdb 2019-08-12 Tom Tromey <tom@tromey.com> * Imported readline 7.0 patch 5.
Diffstat (limited to 'readline/examples/excallback.c')
-rw-r--r--readline/examples/excallback.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/readline/examples/excallback.c b/readline/examples/excallback.c
index 385492b..4206acf 100644
--- a/readline/examples/excallback.c
+++ b/readline/examples/excallback.c
@@ -40,13 +40,14 @@ Copyright (C) 1999 Jeff Solomon
#include <config.h>
#endif
-#include <stdio.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#include <stdlib.h>
+#include <stdio.h>
#include <termios.h> /* xxx - should make this more general */
#ifdef READLINE_LIBRARY
@@ -55,6 +56,10 @@ Copyright (C) 1999 Jeff Solomon
# include <readline/readline.h>
#endif
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+
/* This little examples demonstrates the alternate interface to using readline.
* In the alternate interface, the user maintains control over program flow and
* only calls readline when STDIN is readable. Using the alternate interface,