lib/texpect: make the code more portable by using "replace.h" and "system/wait.h"
authorStefan Metzmacher <metze@samba.org>
Wed, 29 Oct 2014 10:48:59 +0000 (11:48 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 14 Nov 2014 22:27:04 +0000 (23:27 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/texpect/texpect.c

index ac889792b38869327c0a86aae24b1562b061a0d5..2ce33a286cc48d47e977f731abdd4cd334a8e609 100644 (file)
  * 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;