1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

texpect: Do not depend on ccan

texpect is the only remaining user of ccan code. Copy in the two routines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Volker Lendecke 2015-03-12 15:07:38 +00:00 committed by Michael Adam
parent 0c47bdf295
commit 867f0a80a8
4 changed files with 28 additions and 4 deletions

View File

@ -56,7 +56,33 @@
#ifdef HAVE_ERR_H
#include <err.h>
#else
#include <ccan/err/err.h>
const char progname[] = "unknown program";
static void err(int eval, const char *fmt, ...)
{
int err_errno = errno;
va_list ap;
fprintf(stderr, "%s: ", progname);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, ": %s\n", strerror(err_errno));
exit(eval);
}
static void errx(int eval, const char *fmt, ...)
{
va_list ap;
fprintf(stderr, "%s: ", progname);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
exit(eval);
}
#endif
struct command {

View File

@ -4,4 +4,4 @@ def configure(conf):
conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h bsd/libutil.h libutil.h')
def build(bld):
bld.SAMBA_BINARY('texpect', 'texpect.c', deps='popt util ccan', install=False)
bld.SAMBA_BINARY('texpect', 'texpect.c', deps='popt util', install=False)

View File

@ -151,7 +151,6 @@ def configure(conf):
conf.RECURSE('source4/lib/tls')
conf.RECURSE('source4/ntvfs/sysdep')
conf.RECURSE('lib/util')
conf.RECURSE('lib/ccan')
conf.RECURSE('lib/util/charset')
conf.RECURSE('source4/auth')
conf.RECURSE('nsswitch')

View File

@ -41,7 +41,6 @@ bld.RECURSE('lib/talloc')
bld.RECURSE('lib/tevent')
bld.RECURSE('lib/texpect')
bld.RECURSE('lib/addns')
bld.RECURSE('lib/ccan')
bld.RECURSE('lib/ldb')
bld.RECURSE('lib/param')
bld.RECURSE('dynconfig')