|
@@ -391,12 +391,6 @@ _civet_safe_clock_gettime(int clk_id, struct timespec *t)
|
|
#define MG_BUF_LEN (1024 * 8)
|
|
#define MG_BUF_LEN (1024 * 8)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-/* Maximum queue length for pending connections. This value is passed as
|
|
|
|
- * parameter to the "listen" socket call. */
|
|
|
|
-#if !defined(SOMAXCONN)
|
|
|
|
-#define SOMAXCONN (100) /* in pending connections (count) */
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
/* Size of the accepted socket queue (in case the old queue implementation
|
|
/* Size of the accepted socket queue (in case the old queue implementation
|
|
* is used). */
|
|
* is used). */
|
|
#if !defined(MGSQLEN)
|
|
#if !defined(MGSQLEN)
|
|
@@ -808,6 +802,12 @@ typedef int SOCKET;
|
|
#endif /* defined(_WIN32) && !defined(__SYMBIAN32__) - \
|
|
#endif /* defined(_WIN32) && !defined(__SYMBIAN32__) - \
|
|
WINDOWS / UNIX include block */
|
|
WINDOWS / UNIX include block */
|
|
|
|
|
|
|
|
+/* Maximum queue length for pending connections. This value is passed as
|
|
|
|
+ * parameter to the "listen" socket call. */
|
|
|
|
+#if !defined(SOMAXCONN)
|
|
|
|
+/* This symbol may be defined in winsock2.h so this must after that include */
|
|
|
|
+#define SOMAXCONN (100) /* in pending connections (count) */
|
|
|
|
+#endif
|
|
|
|
|
|
/* In case our C library is missing "timegm", provide an implementation */
|
|
/* In case our C library is missing "timegm", provide an implementation */
|
|
#if defined(NEED_TIMEGM)
|
|
#if defined(NEED_TIMEGM)
|
|
@@ -5535,7 +5535,7 @@ kill(pid_t pid, int sig_num)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
-pid_t
|
|
|
|
|
|
+static pid_t
|
|
waitpid(pid_t pid, int *status, int flags)
|
|
waitpid(pid_t pid, int *status, int flags)
|
|
{
|
|
{
|
|
DWORD timeout = INFINITE;
|
|
DWORD timeout = INFINITE;
|
|
@@ -8831,7 +8831,9 @@ connect_socket(struct mg_context *ctx /* may be NULL */,
|
|
if (conn_ret != 0) {
|
|
if (conn_ret != 0) {
|
|
DWORD err = WSAGetLastError(); /* could return WSAEWOULDBLOCK */
|
|
DWORD err = WSAGetLastError(); /* could return WSAEWOULDBLOCK */
|
|
conn_ret = (int)err;
|
|
conn_ret = (int)err;
|
|
-#define EINPROGRESS (WSAEWOULDBLOCK) /* Winsock equivalent */
|
|
|
|
|
|
+#if !defined(EINPROGRESS)
|
|
|
|
+# define EINPROGRESS (WSAEWOULDBLOCK) /* Winsock equivalent */
|
|
|
|
+#endif /* if !defined(EINPROGRESS) */
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
@@ -10823,7 +10825,7 @@ abort_process(void *data)
|
|
kill(pid, SIGABRT);
|
|
kill(pid, SIGABRT);
|
|
|
|
|
|
/* Wait until process is terminated (don't leave zombies) */
|
|
/* Wait until process is terminated (don't leave zombies) */
|
|
- while (waitpid(pid, &status, 0) != -1) /* nop */
|
|
|
|
|
|
+ while (waitpid(pid, &status, 0) != (pid_t)-1) /* nop */
|
|
;
|
|
;
|
|
} else {
|
|
} else {
|
|
DEBUG_TRACE("CGI timer: Child process %p already stopped in time\n",
|
|
DEBUG_TRACE("CGI timer: Child process %p already stopped in time\n",
|