summaryrefslogtreecommitdiff
path: root/lib/texpect
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-10-29 11:48:59 +0100
committerJeremy Allison <jra@samba.org>2014-11-14 23:27:04 +0100
commit0f0148e020b6f85447f26de17c2b0b002bcdf498 (patch)
treea196b86503f56dcb15c633a212c03244b486164a /lib/texpect
parent6ff9388172909ce249fd6254703eee707d821731 (diff)
downloadsamba-0f0148e020b6f85447f26de17c2b0b002bcdf498.tar.gz
lib/texpect: make the code more portable by using "replace.h" and "system/wait.h"
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/texpect')
-rw-r--r--lib/texpect/texpect.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/texpect/texpect.c b/lib/texpect/texpect.c
index ac889792b38..2ce33a286cc 100644
--- a/lib/texpect/texpect.c
+++ b/lib/texpect/texpect.c
@@ -31,20 +31,10 @@
* SUCH DAMAGE.
*/
-#include "config.h"
+#include "replace.h"
+#include "system/filesys.h"
+#include "system/wait.h"
-#ifndef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_PTY_H
#include <pty.h>
#endif
@@ -60,9 +50,7 @@
#endif /* STREAMPTY */
#include <popt.h>
-#include <errno.h>
#include <err.h>
-#include <signal.h>
struct command {
enum { CMD_EXPECT = 0, CMD_SEND, CMD_PASSWORD } type;