X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Ffcgios.h;h=80fe006489db55a9f5ce3bf1bbfd7e415d705272;hb=60a09042dc4d66f5d2c1c81f26dc534dbce8e353;hp=357d127ebe13321f28715f11deab5464ae2cb279;hpb=fdb63fa0647e49d8c0ec8d1b964cd201e07a123f;p=catagits%2Ffcgi2.git diff --git a/include/fcgios.h b/include/fcgios.h index 357d127..80fe006 100755 --- a/include/fcgios.h +++ b/include/fcgios.h @@ -18,24 +18,35 @@ #ifndef _FCGIOS_H #define _FCGIOS_H +#include "fcgi_config.h" + +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#ifdef HAVE_WINDOWS_H +#include +#endif + +#if defined (c_plusplus) || defined (__cplusplus) +extern "C" { +#endif + #ifdef _WIN32 -#include #define OS_Errno GetLastError() #define OS_SetErrno(err) SetLastError(err) #ifndef DLLAPI #define DLLAPI __declspec(dllimport) #endif - -#else /* !_WIN32 */ -#ifdef HAVE_SYS_TIME_H -#include +#ifndef O_NONBLOCK +#define O_NONBLOCK 0x0004 /* no delay */ #endif +#else /* !_WIN32 */ #define DLLAPI #define OS_Errno errno #define OS_SetErrno(err) errno = (err) #endif /* !_WIN32 */ - /* This is the initializer for a "struct timeval" used in a select() call * right after a new request is accept()ed to determine readablity. Its * a drop-dead timer. Its only used for AF_UNIX sockets (not TCP sockets). @@ -67,16 +78,6 @@ #define X_OK 0x01 #endif -#ifdef _WIN32 -#ifndef O_NONBLOCK -#define O_NONBLOCK 0x0004 /* no delay */ -#endif -#endif - -#if defined (c_plusplus) || defined (__cplusplus) -extern "C" { -#endif - #ifndef _CLIENTDATA # if defined(__STDC__) || defined(__cplusplus) typedef void *ClientData; @@ -90,7 +91,7 @@ typedef void (*OS_AsyncProc) (ClientData clientData, int len); DLLAPI int OS_LibInit(int stdioFds[3]); DLLAPI void OS_LibShutdown(void); -DLLAPI int OS_CreateLocalIpcFd(char *bindPath); +DLLAPI int OS_CreateLocalIpcFd(const char *bindPath, int backlog); DLLAPI int OS_FcgiConnect(char *bindPath); DLLAPI int OS_Read(int fd, char * buf, size_t len); DLLAPI int OS_Write(int fd, char * buf, size_t len); @@ -104,9 +105,9 @@ DLLAPI int OS_AsyncWrite(int fd, int offset, void *buf, int len, DLLAPI int OS_Close(int fd); DLLAPI int OS_CloseRead(int fd); DLLAPI int OS_DoIo(struct timeval *tmo); -DLLAPI int OS_FcgiIpcAccept(char *clientAddrList); +DLLAPI int OS_Accept(int listen_sock, int fail_on_intr, const char *webServerAddrs); DLLAPI int OS_IpcClose(int ipcFd); -DLLAPI int OS_IsFcgi(void); +DLLAPI int OS_IsFcgi(int sock); DLLAPI void OS_SetFlags(int fd, int flags); #if defined (__cplusplus) || defined (c_plusplus)