aboutsummaryrefslogtreecommitdiffstats
path: root/lib/readline/examples
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline/examples')
-rw-r--r--lib/readline/examples/histexamp.c2
-rw-r--r--lib/readline/examples/rl.c9
-rw-r--r--lib/readline/examples/rlcat.c6
-rw-r--r--lib/readline/examples/rltest.c6
4 files changed, 22 insertions, 1 deletions
diff --git a/lib/readline/examples/histexamp.c b/lib/readline/examples/histexamp.c
index e875e65..4f059c1 100644
--- a/lib/readline/examples/histexamp.c
+++ b/lib/readline/examples/histexamp.c
@@ -26,6 +26,8 @@
# include <readline/history.h>
#endif
+#include <string.h>
+
main (argc, argv)
int argc;
char **argv;
diff --git a/lib/readline/examples/rl.c b/lib/readline/examples/rl.c
index d260489..c608c15 100644
--- a/lib/readline/examples/rl.c
+++ b/lib/readline/examples/rl.c
@@ -31,12 +31,19 @@
#include <stdio.h>
#include <sys/types.h>
-#include "posixstat.h"
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
#if defined (READLINE_LIBRARY)
+# include "posixstat.h"
# include "readline.h"
# include "history.h"
#else
+# include <sys/stat.h>
# include <readline/readline.h>
# include <readline/history.h>
#endif
diff --git a/lib/readline/examples/rlcat.c b/lib/readline/examples/rlcat.c
index 176b9f4..33aea4a 100644
--- a/lib/readline/examples/rlcat.c
+++ b/lib/readline/examples/rlcat.c
@@ -40,6 +40,12 @@
#include <string.h>
#include <errno.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
#ifndef errno
extern int errno;
#endif
diff --git a/lib/readline/examples/rltest.c b/lib/readline/examples/rltest.c
index 99f083b..cb67bab 100644
--- a/lib/readline/examples/rltest.c
+++ b/lib/readline/examples/rltest.c
@@ -31,6 +31,12 @@
#include <stdio.h>
#include <sys/types.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
#ifdef READLINE_LIBRARY
# include "readline.h"
# include "history.h"