changeset: 66:d1135639e634
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sun Jul 01 07:51:34 2007 -0400
summary: Don't build ruby or task thread stubs by default.
diff -r 763e9c96f726 -r d1135639e634 config.mk
--- a/config.mk Sun Jul 01 07:35:51 2007 -0400
+++ b/config.mk Sun Jul 01 07:51:34 2007 -0400
@@ -2,7 +2,8 @@
COMPONENTS = \
libixp \
- libixp_pthread \
+ libixp_pthread
+IGNORE = \
libixp_task \
libixp_rubythread
diff -r 763e9c96f726 -r d1135639e634 include/ixp.h
--- a/include/ixp.h Sun Jul 01 07:35:51 2007 -0400
+++ b/include/ixp.h Sun Jul 01 07:51:34 2007 -0400
@@ -3,6 +3,7 @@
* See LICENSE file for license details.
*/
+#include <stdarg.h>
#include <sys/types.h>
#undef uchar
@@ -395,6 +396,7 @@ struct IxpThread {
};
extern IxpThread *ixp_thread;
+extern int (*ixp_vsnprint)(char*, int, char*, va_list);
/* thread_*.c */
int ixp_taskinit(void);
diff -r 763e9c96f726 -r d1135639e634 libixp/error.c
--- a/libixp/error.c Sun Jul 01 07:35:51 2007 -0400
+++ b/libixp/error.c Sun Jul 01 07:51:34 2007 -0400
@@ -3,6 +3,8 @@
#include <stdio.h>
#include <string.h>
#include "ixp_local.h"
+
+int (*ixp_vsnprint)(char*, int, char*, va_list);
/* Approach to errno handling taken from Plan 9 Port. */
enum {
@@ -42,7 +44,10 @@ werrstr(char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
- vsnprintf(tmp, sizeof(tmp), fmt, ap);
+ if(ixp_vsnprint)
+ ixp_vsnprint(tmp, sizeof(tmp), fmt, ap);
+ else
+ vsnprintf(tmp, sizeof(tmp), fmt, ap);
va_end(ap);
strncpy(thread->errbuf(), tmp, IXP_ERRMAX);
errno = EPLAN9;
Received on Sun Jul 01 2007 - 13:56:09 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:25 UTC