From 667b418e28d708fca92da452e6056573a404c94d Mon Sep 17 00:00:00 2001 From: "roberto@quantal64" Date: Sun, 15 Jul 2012 07:53:27 +0200 Subject: [PATCH] improved IOVEC management in http router --- plugins/http/http.c | 9 +++++++++ uwsgi.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/plugins/http/http.c b/plugins/http/http.c index 8dfb17d3..0259b7a3 100644 --- a/plugins/http/http.c +++ b/plugins/http/http.c @@ -16,10 +16,19 @@ extern struct uwsgi_server uwsgi; #include "../corerouter/cr.h" +#ifdef __sun__ +#define MAX_HTTP_VEC IOV_MAX*64 +#else +#ifdef IOV_MAX +#define MAX_HTTP_VEC IOV_MAX +#else #define MAX_HTTP_VEC 128 +#endif + #define UWSGI_HTTP_SSL 1 #define UWSGI_HTTP_FORCE_SSL 2 #define HTTP_SSL_STATUS_SHUTDOWN 10 +#endif struct uwsgi_http { diff --git a/uwsgi.h b/uwsgi.h index 96127462..6d9b4078 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -113,6 +113,10 @@ extern char UWSGI_EMBED_CONFIG_END; +#ifndef __need_IOV_MAX +#define __need_IOV_MAX +#endif + #include #include