#include "replace.h"
#include "system/filesys.h"
#include "system/wait.h"
+#include "lib/util/sys_rw.h"
#ifdef HAVE_PTY_H
#include <pty.h>
return strdup(buf + len);
}
-/*******************************************************************
-A write wrapper that will deal with EINTR.
-********************************************************************/
-
-static ssize_t sys_write(int fd, const void *buf, size_t count)
-{
- ssize_t ret;
-
- do {
- ret = write(fd, buf, count);
-#if defined(EWOULDBLOCK)
- } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK));
-#else
- } while (ret == -1 && (errno == EINTR || errno == EAGAIN));
-#endif
- return ret;
-}
-
static void parse_configuration(const char *fn)
{
struct command *c;
def build(bld):
bld.SAMBA_BINARY('texpect',
'texpect.c',
- deps='popt util replace',
+ deps='popt util replace sys_rw',
for_selftest=True)