mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-26 00:29:46 +01:00
Everything supported has working vsnprintf.
This commit is contained in:
parent
c8cf438d44
commit
f1bd3807ae
9
configure
vendored
9
configure
vendored
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $Id: configure,v 1.1 2009-05-13 23:27:00 nicm Exp $
|
# $Id: configure,v 1.2 2009-05-13 23:29:45 nicm Exp $
|
||||||
|
|
||||||
CONFIG_H=config.h
|
CONFIG_H=config.h
|
||||||
CONFIG_MK=config.mk
|
CONFIG_MK=config.mk
|
||||||
@ -26,7 +26,6 @@ case `uname` in
|
|||||||
#define HAVE_STRTONUM
|
#define HAVE_STRTONUM
|
||||||
#define HAVE_TREE_H
|
#define HAVE_TREE_H
|
||||||
#define HAVE_UTIL_H
|
#define HAVE_UTIL_H
|
||||||
#define HAVE_VSNPRINTF
|
|
||||||
#define HAVE_VSYSLOG
|
#define HAVE_VSYSLOG
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >>$CONFIG_MK
|
cat <<EOF >>$CONFIG_MK
|
||||||
@ -43,7 +42,6 @@ EOF
|
|||||||
#define HAVE_POLL
|
#define HAVE_POLL
|
||||||
#define HAVE_PROGNAME
|
#define HAVE_PROGNAME
|
||||||
#define HAVE_PTY_H
|
#define HAVE_PTY_H
|
||||||
#define HAVE_VSNPRINTF
|
|
||||||
#define HAVE_VSYSLOG
|
#define HAVE_VSYSLOG
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >>$CONFIG_MK
|
cat <<EOF >>$CONFIG_MK
|
||||||
@ -61,7 +59,6 @@ EOF
|
|||||||
AIX)
|
AIX)
|
||||||
cat <<EOF >>$CONFIG_H
|
cat <<EOF >>$CONFIG_H
|
||||||
#define HAVE_DAEMON
|
#define HAVE_DAEMON
|
||||||
#define HAVE_VSNPRINTF
|
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >>$CONFIG_MK
|
cat <<EOF >>$CONFIG_MK
|
||||||
CPPFLAGS+= -I/usr/local/include/ncurses
|
CPPFLAGS+= -I/usr/local/include/ncurses
|
||||||
@ -83,7 +80,6 @@ EOF
|
|||||||
#define HAVE_POLL
|
#define HAVE_POLL
|
||||||
#define HAVE_STRLCAT
|
#define HAVE_STRLCAT
|
||||||
#define HAVE_STRLCPY
|
#define HAVE_STRLCPY
|
||||||
#define HAVE_VSNPRINTF
|
|
||||||
#define HAVE_VSYSLOG
|
#define HAVE_VSYSLOG
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >>$CONFIG_MK
|
cat <<EOF >>$CONFIG_MK
|
||||||
@ -112,7 +108,6 @@ EOF
|
|||||||
#define HAVE_STRLCAT
|
#define HAVE_STRLCAT
|
||||||
#define HAVE_STRLCPY
|
#define HAVE_STRLCPY
|
||||||
#define HAVE_UTIL_H
|
#define HAVE_UTIL_H
|
||||||
#define HAVE_VSNPRINTF
|
|
||||||
#define HAVE_VSYSLOG
|
#define HAVE_VSYSLOG
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >>$CONFIG_MK
|
cat <<EOF >>$CONFIG_MK
|
||||||
@ -137,7 +132,6 @@ EOF
|
|||||||
#define HAVE_STRLCPY
|
#define HAVE_STRLCPY
|
||||||
#define HAVE_STRTONUM
|
#define HAVE_STRTONUM
|
||||||
#define HAVE_LIBUTIL_H
|
#define HAVE_LIBUTIL_H
|
||||||
#define HAVE_VSNPRINTF
|
|
||||||
#define HAVE_VSYSLOG
|
#define HAVE_VSYSLOG
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >>$CONFIG_MK
|
cat <<EOF >>$CONFIG_MK
|
||||||
@ -161,7 +155,6 @@ EOF
|
|||||||
#define HAVE_STRLCPY
|
#define HAVE_STRLCPY
|
||||||
#define HAVE_TREE_H
|
#define HAVE_TREE_H
|
||||||
#define HAVE_UTIL_H
|
#define HAVE_UTIL_H
|
||||||
#define HAVE_VSNPRINTF
|
|
||||||
#define HAVE_VSYSLOG
|
#define HAVE_VSYSLOG
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >>$CONFIG_MK
|
cat <<EOF >>$CONFIG_MK
|
||||||
|
13
status.c
13
status.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: status.c,v 1.78 2009-05-13 23:27:00 nicm Exp $ */
|
/* $Id: status.c,v 1.79 2009-05-13 23:29:45 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -439,18 +439,7 @@ out:
|
|||||||
size_t
|
size_t
|
||||||
status_width(struct winlink *wl)
|
status_width(struct winlink *wl)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_VSNPRINTF
|
|
||||||
return (xsnprintf(NULL, 0, "%d:%s ", wl->idx, wl->window->name));
|
return (xsnprintf(NULL, 0, "%d:%s ", wl->idx, wl->window->name));
|
||||||
#else
|
|
||||||
char *s;
|
|
||||||
size_t n;
|
|
||||||
|
|
||||||
xasprintf(&s, "%d:%s ", wl->idx, wl->window->name);
|
|
||||||
n = strlen(s);
|
|
||||||
xfree(s);
|
|
||||||
|
|
||||||
return (n);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
Loading…
Reference in New Issue
Block a user