/* Web Polygraph http://www.web-polygraph.org/ * (C) 2003-2006 The Measurement Factory * Licensed under the Apache License, Version 2.0 */ #ifndef PG_CONFIG_FILE_H #define PG_CONFIG_FILE_H /* configuration file for W2K port */ #define CONFIG_HOST_TYPE "i386-unknown-W2K" /* negative or zero if no probing has been done or probing failed */ #define PROBED_MAXFD 12288 /* XXX: a lie; use fd_limit default instead */ /* negative or zero if we failed to detect it */ #define DEFAULT_FD_SETSIZE 64 /* sighandler prototype (e.g. "void SignalHandler(...)" on IRIX */ #define SIGNAL_HANDLER_TYPE void SignalHandler(int) #define HAVE_TIMEZONE timezone #define HAVE_GETLASTERROR 1 #define HAVE_SETLASTERROR 1 #define HAVE_WSASTARTUP 1 #define HAVE_WSACLEANUP 1 #define HAVE_GETRUSAGE 1 #define HAVE__FTIME 1 #define HAVE__PCLOSE 1 #define HAVE__POPEN 1 #define HAVE__GETPID 1 #define HAVE_SIGNAL 1 #define HAVE_WSAIOCTL 1 #define HAVE_IOCTLSOCKET 1 #define HAVE_CLOSESOCKET 1 #define HAVE_GETLASTERROR 1 #define HAVE_STRNICMP 1 #define HAVE_STRICMP 1 #define HAVE_STRING_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_WINSOCK2_H 1 #define HAVE_WINBASE_H 1 #define HAVE_STRSTREA_H 1 #define HAVE_FCNTL_H 1 #define HAVE_SIGNAL_H 1 #define HAVE_PROCESS_H 1 #define HAVE_TIME_H 1 #define HAVE_IOMANIP_H 1 #define HAVE_IOSTREAM_H 1 #define HAVE_MATH_H 1 // set_new_handler() is broken, do not define HAVE_SET_NEW_HANDLER // increase FD_SETSIZE if needed and OS supports FD_SETSIZE redifinition #if !defined(__linux__) && !defined(linux) # if PROBED_MAXFD > 0 && DEFAULT_FD_SETSIZE > 0 && PROBED_MAXFD > DEFAULT_FD_SETSIZE # ifdef FD_SETSIZE # warning FD_SETSIZE is already defined # else # define FD_SETSIZE PROBED_MAXFD # endif # endif #endif // what file scanner (select(2), poll(2), etc.) use by default // note: our current heuristic will fail in many environments #ifdef HAVE_POLL # define PG_PREFFERED_FILE_SCANNER Poll #else # define PG_PREFFERED_FILE_SCANNER Select #endif // define CONFIG_HOST_OS_* macros (shortened to CFG_HOS_*) // this code is similar to Squid's include/config.h.in #if defined(__sun__) || defined(__sun) # define CFG_HOS_SUN # if defined(__SVR4) # define CFG_HOS_SOLARIS # else # define CFG_HOS_SUNOS # endif #elif defined(__sgi__) || defined(sgi) || defined(__sgi) # define CFG_HOS_SGI # if !defined(_SVR4_SOURCE) # define _SVR4_SOURCE # endif #elif defined(__hpux) # define CFG_HOS_HPUX # define CFG_HOS_SYSV #elif defined(__osf__) # define CFG_HOS_OSF #elif defined(__ultrix) # define CFG_HOS_ULTRIX #elif defined(_AIX) # define CFG_HOS_AIX #elif defined(__linux__) # define CFG_HOS_LINUX #elif defined(__FreeBSD__) # define CFG_HOS_FREEBSD #elif defined(__NeXT__) # define CFG_HOS_NEXT #elif defined(__bsdi__) # define CFG_HOS_BSDI #elif defined(__NetBSD__) # define CFG_HOS_NETBSD #elif defined(__CYGWIN32__) || defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32) # define CFG_HOS_MSWIN #elif defined(sony_news) && defined(__svr4) # define CFG_HOS_NEWSOS6 #elif defined(__EMX__) || defined(OS2) || defined(__OS2__) # define CFG_HOS_OS2 #endif /* OS specific post-configuration */ /* XXX: check that all OS-specific things are moved here */ #ifdef CFG_HOS_MSWIN #include #if !defined(EOPNOTSUPP) && defined(WSAEOPNOTSUPP) # define EOPNOTSUPP WSAEOPNOTSUPP #endif #if !defined(EINPROGRESS) && defined (WSAEINPROGRESS) # define EINPROGRESS WSAEINPROGRESS #endif #if !defined(EWOULDBLOCK) && defined (WSAEWOULDBLOCK) # define EWOULDBLOCK WSAEWOULDBLOCK #endif #if !defined(ENOPROTOOPT) && defined (WSAENOPROTOOPT) # define ENOPROTOOPT WSAENOPROTOOPT #endif #if !defined(EADDRNOTAVAIL) && defined (WSAEADDRNOTAVAIL) # define EADDRNOTAVAIL WSAEADDRNOTAVAIL #endif #endif /* CFG_HOS_MSWIN */ #endif /* PG_CONFIG_FILE_H */