#ifndef _UTIL_H_618fd4ec_ #define _UTIL_H_618fd4ec_ /* This file is in the public domain. */ #include #include extern FILE *stdio_wrap_w(FILE *, void *, void (*)(FILE *, void *, const char *, int), unsigned int); extern FILE *open_accum(char **, int *); #define SWW_CLOSE_WRAPPED 0x00000001 extern char *blk_to_nulterm(const void *, int); extern void set_nonblock(int); #if defined(EAGAIN) # if defined(EWOULDBLOCK) # if (EAGAIN == EWOULDBLOCK) # define NONBLOCKING EAGAIN # else # define NONBLOCKING EAGAIN: case EWOULDBLOCK # endif # else # define NONBLOCKING EAGAIN # endif #else # if defined(EWOULDBLOCK) # define NONBLOCKING EWOULDBLOCK # else # error "Neither EAGAIN nor EWOULDBLOCK is defined" # endif #endif #endif