/* The following code section is part of an EXPERIMENTAL native */
/* Windows NT/2000 Squid port - Compiles only on MS Visual C++ or MinGW */
-#if _SQUID_MSWIN_ || _SQUID_MINGW_
+#if _SQUID_WINDOWS_ || _SQUID_MINGW_
//#undef strerror
#define sys_nerr _sys_nerr
#include <process.h>
#include <errno.h>
-#if _SQUID_MSWIN_ || _SQUID_MINGW_
+#if _SQUID_WINDOWS_ || _SQUID_MINGW_
#if HAVE_WINSOCK2_H
#include <winsock2.h>
#elif HAVE_WINSOCK_H
#endif
#undef IN_ADDR
#include <ws2tcpip.h>
-#endif /* _SQUID_MSWIN_ || _SQUID_MINGW_ */
+#endif /* _SQUID_WINDOWS_ || _SQUID_MINGW_ */
#if (EAI_NODATA == EAI_NONAME)
#undef EAI_NODATA
#define select(n,r,w,e,t) Squid::select(n,r,w,e,t)
inline ssize_t
-send(int s, const void * b, size_t l, int f)
+send(int s, const char * b, size_t l, int f)
{
ssize_t result;
- if ((result = ::send(_get_osfhandle(s), (char *)b, l, f)) == SOCKET_ERROR) {
+ if ((result = ::send(_get_osfhandle(s), b, l, f)) == SOCKET_ERROR) {
errno = WSAGetLastError();
return -1;
} else
}
#define socket(f,t,p) Squid::socket(f,t,p)
+inline int
+pipe(int pipefd[2])
+{
+ return _pipe(pipefd,4096,_O_BINARY);
+}
+using Squid::pipe;
+
inline
int WSAAsyncSelect(int s, HWND h, unsigned int w, long e)
{
#endif
+/* prototypes */
+void WIN32_maperror(unsigned long WIN32_oserrno);
+#if !HAVE_GETPAGESIZE
+inline size_t
+getpagesize() {
+ return 4096;
+}
+#endif
+
#endif /* _SQUID_WINDOWS_ */
#endif /* SQUID_OS_MSWIN_H */
* "%lx" instead of "%llx"
*/
#ifndef PRId64
-#if _SQUID_MSWIN_ /* Windows native port using MSVCRT */
+#if _SQUID_WINDOWS_ /* Windows native port using MSVCRT */
#define PRId64 "I64d"
#elif SIZEOF_INT64_T > SIZEOF_LONG
#define PRId64 "lld"
#endif
#ifndef PRIu64
-#if _SQUID_MSWIN_ /* Windows native port using MSVCRT */
+#if _SQUID_WINDOWS_ /* Windows native port using MSVCRT */
#define PRIu64 "I64u"
#elif SIZEOF_INT64_T > SIZEOF_LONG
#define PRIu64 "llu"
#endif
#ifndef PRIX64
-#if _SQUID_MSWIN_ /* Windows native port using MSVCRT */
+#if _SQUID_WINDOWS_ /* Windows native port using MSVCRT */
#define PRIX64 "I64X"
#elif SIZEOF_INT64_T > SIZEOF_LONG
#define PRIX64 "llX"