Revision: 14490
Author: adrian.chadd
Date: Wed Mar 24 08:25:09 2010
Log: More portability fixes for Cygwin and automake - Issue #94 .
http://code.google.com/p/lusca-cache/source/detail?r=14490
Modified:
/branches/LUSCA_HEAD/libiapp/comm_select_win32.c
/branches/LUSCA_HEAD/libiapp/mainloop.c
=======================================
--- /branches/LUSCA_HEAD/libiapp/comm_select_win32.c Sat Jan 17 12:55:02
2009
+++ /branches/LUSCA_HEAD/libiapp/comm_select_win32.c Wed Mar 24 08:25:09
2010
@@ -41,10 +41,18 @@
#include <math.h>
#include <fcntl.h>
#include <err.h>
-#include <sys/errno.h>
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#if HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#if HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
#include "../include/Array.h"
#include "../include/Stack.h"
@@ -64,6 +72,8 @@
#include "../libcb/cbdata.h"
+#include "../libsqinet/sqinet.h"
+
#include "iapp_ssl.h"
#include "globals.h"
#include "fd_types.h"
@@ -156,7 +166,7 @@
memcpy(&errfds, &global_writefds, sizeof(fd_set));
tv.tv_sec = msec / 1000;
tv.tv_usec = (msec % 1000) * 1000;
- statCounter.syscalls.selects++;
+ CommStats.syscalls.selects++;
num = select(Biggest_FD + 1, &readfds, &writefds, &errfds, &tv);
saved_errno = errno;
getCurrentTime();
@@ -168,7 +178,7 @@
debug(5, 1) ("comm_select: select failure: %s\n", xstrerror());
return COMM_ERROR;
}
- statHistCount(&statCounter.select_fds_hist, num);
+ CommStats.select_fds++;
if (num == 0)
return COMM_TIMEOUT;
=======================================
--- /branches/LUSCA_HEAD/libiapp/mainloop.c Wed Apr 1 16:12:49 2009
+++ /branches/LUSCA_HEAD/libiapp/mainloop.c Wed Mar 24 08:25:09 2010
@@ -1,12 +1,17 @@
+#include "../include/config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
+#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#if HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
#include <string.h>
-#include "../include/config.h"
/*
* The bulk of the following are because the disk code requires
* the memory code, which requires everything else.
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.