[Groonga-commit] groonga/groonga at 75e5e7b [master] groonga-httpd: make buildable for Windows

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Nov 23 17:21:46 JST 2014


Kouhei Sutou	2014-11-23 17:21:46 +0900 (Sun, 23 Nov 2014)

  New Revision: 75e5e7b3790d63188107447f326015a674ceeb75
  https://github.com/groonga/groonga/commit/75e5e7b3790d63188107447f326015a674ceeb75

  Message:
    groonga-httpd: make buildable for Windows

  Modified files:
    src/httpd/nginx-module/ngx_http_groonga_module.c

  Modified: src/httpd/nginx-module/ngx_http_groonga_module.c (+12 -3)
===================================================================
--- src/httpd/nginx-module/ngx_http_groonga_module.c    2014-11-23 17:21:07 +0900 (26be6be)
+++ src/httpd/nginx-module/ngx_http_groonga_module.c    2014-11-23 17:21:46 +0900 (1b8d87f)
@@ -16,9 +16,9 @@
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
+#ifndef WIN32
+# define NGX_GRN_SUPPORT_STOP_BY_COMMAND
+#endif
 
 #include <ngx_config.h>
 #include <ngx_core.h>
@@ -26,6 +26,13 @@
 
 #include <groonga.h>
 
+#include <sys/stat.h>
+
+#ifdef NGX_GRN_SUPPORT_STOP_BY_COMMAND
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+
 #define GRN_NO_FLAGS 0
 
 typedef struct {
@@ -375,6 +382,7 @@ ngx_http_groonga_context_receive_handler(grn_ctx *context,
 
   grn_ctx_recv(context, &result, &result_size, &recv_flags);
 
+#ifdef NGX_GRN_SUPPORT_STOP_BY_COMMAND
   if (recv_flags == GRN_CTX_QUIT) {
     ngx_int_t ngx_rc;
     ngx_int_t ngx_pid;
@@ -398,6 +406,7 @@ ngx_http_groonga_context_receive_handler(grn_ctx *context,
       context->stat &= ~GRN_CTX_QUIT;
     }
   }
+#endif
 
   if (result_size > 0 ||
       GRN_TEXT_LEN(&(data->body)) > 0 ||
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index