add iob_free and man page for iob_reset.
check in some windoze compat crap (still does not compile through for windoze)
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef __MINGW32__
|
||||
#include "windows.h"
|
||||
#include <unistd.h>
|
||||
|
||||
struct iovec {
|
||||
LPCVOID iov_base;
|
||||
DWORD iov_len;
|
||||
};
|
||||
#else
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
#include "errmsg.h"
|
||||
#include "str.h"
|
||||
|
||||
@@ -10,6 +20,15 @@ void errmsg_warn(const char* message, ...) {
|
||||
struct iovec x[23];
|
||||
va_list a;
|
||||
va_start(a,message);
|
||||
#ifdef __MINGW32__
|
||||
{
|
||||
int i,j;
|
||||
j=errmsg_cvt(x,message,a);
|
||||
for (i=0; i<j; ++i)
|
||||
write(2,x[i].iov_base,x[i].iov_len);
|
||||
}
|
||||
#else
|
||||
writev(2,x,errmsg_cvt(x,message,a));
|
||||
#endif
|
||||
va_end(a);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user