use vsnprintf so that we dont need roken

This commit is contained in:
Love Hornquist Astrand
2010-11-27 23:21:39 -08:00
parent d36ee8f0b6
commit d69fcab43f
4 changed files with 4 additions and 28 deletions

View File

@@ -5,7 +5,6 @@ lib_LTLIBRARIES = libheimbase.la
check_PROGRAMS = test_base
libheimbase_la_LDFLAGS = -version-info 1:0:0
libheimbase_la_CPPFLAGS = $(ROKEN_RENAME)
if versionscript
libheimbase_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
@@ -23,14 +22,6 @@ dist_libheimbase_la_SOURCES = \
heimqueue.h \
null.c \
number.c \
string.c \
roken_rename.h
if do_roken_rename
nodist_libheimbase_la_SOURCES = snprintf.c
endif
snprintf.c:
$(LN_S) $(top_srcdir)/lib/roken/snprintf.c .
string.c
test_base_LDADD = $(LIB_heimbase)

View File

@@ -35,15 +35,6 @@ RELDIR=base
INCFILES=$(INCDIR)\heimbase.h
{}.c{$(OBJ)}.obj::
$(C2OBJ_P) -I$(SRC)\$(RELDIR) -DROKEN_RENAME
{$(OBJ)}.c{$(OBJ)}.obj::
$(C2OBJ_P) -I$(SRC)\$(RELDIR) -DROKEN_RENAME
$(OBJ)\snprintf.obj: $(SRCDIR)\..\lib\roken\snprintf.c
$(C2OBJ) -I$(SRC)\$(RELDIR) -DROKEN_RENAME
libheimbase_OBJS = \
$(OBJ)\array.obj \
$(OBJ)\bool.obj \
@@ -51,7 +42,6 @@ libheimbase_OBJS = \
$(OBJ)\heimbase.obj \
$(OBJ)\null.obj \
$(OBJ)\number.obj \
$(OBJ)\snprintf.obj \
$(OBJ)\string.obj
$(LIBHEIMBASE): $(libheimbase_OBJS)

View File

@@ -41,8 +41,6 @@
#include <errno.h>
#include <limits.h>
#include <roken.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

View File

@@ -370,13 +370,10 @@ heim_abort(const char *fmt, ...)
void
heim_abortv(const char *fmt, va_list ap)
{
char *str = NULL;
int ret;
static char str[1024];
ret = vasprintf(&str, fmt, ap);
if (ret > 0 && str) {
syslog(LOG_ERR, "heim_abort: %s", str);
}
vsnprintf(str, sizeof(str), fmt, ap);
syslog(LOG_ERR, "heim_abort: %s", str);
abort();
}