X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Ffcgios.h;h=6c33638ef0c2434760f7f445c15b1d3ec8e7339d;hb=344bf0566f5fc2d789dbca4a988cef35c68af497;hp=47fcea1da61f95c3c2256a225eda83488608ff6c;hpb=ee03fac494268b8f1f49c1981e33503ae29fe542;p=catagits%2Ffcgi2.git diff --git a/include/fcgios.h b/include/fcgios.h index 47fcea1..6c33638 100755 --- a/include/fcgios.h +++ b/include/fcgios.h @@ -18,21 +18,41 @@ #ifndef _FCGIOS_H #define _FCGIOS_H +#include "fcgi_config.h" + +#ifdef _WIN32 +#include +#endif + +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#if defined (c_plusplus) || defined (__cplusplus) +extern "C" { +#endif + + #ifdef _WIN32 + #define OS_Errno GetLastError() #define OS_SetErrno(err) SetLastError(err) + #ifndef DLLAPI #define DLLAPI __declspec(dllimport) #endif -#else + +#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 -#ifdef _WIN32 -#include -#endif +#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 @@ -49,7 +69,6 @@ #define STDIN_FILENO 0 #endif - #ifndef STDOUT_FILENO #define STDOUT_FILENO 1 #endif @@ -66,16 +85,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;