Skip to content
Browse files

Fix mingw build. It does support only native plugin via libcouchbase

Change-Id: Ief0ec2480e3e6c1507ff1b8fd70b2812a8cfccd6
Reviewed-on: http://review.couchbase.org/24503
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  • Loading branch information...
1 parent f759a6f commit 5f5b964e81d65c7861bf00a3f27caaa5f8c55c97 @avsej avsej committed Feb 11, 2013
Showing with 24 additions and 0 deletions.
  1. +2 −0 ext/couchbase_ext/bucket.c
  2. +2 −0 ext/couchbase_ext/eventmachine_plugin.c
  3. +20 −0 ext/couchbase_ext/plugin_common.c
View
2 ext/couchbase_ext/bucket.c
@@ -253,6 +253,7 @@ do_scan_connection_options(struct cb_bucket_st *bucket, int argc, VALUE *argv)
if (arg != Qnil) {
if (arg == cb_sym_default) {
bucket->engine = cb_sym_default;
+#ifndef _WIN32
} else if (arg == cb_sym_libev) {
bucket->engine = cb_sym_libev;
} else if (arg == cb_sym_libevent) {
@@ -261,6 +262,7 @@ do_scan_connection_options(struct cb_bucket_st *bucket, int argc, VALUE *argv)
} else if (arg == cb_sym_eventmachine) {
bucket->engine = cb_sym_eventmachine;
#endif
+#endif
} else {
VALUE ins = rb_funcall(arg, rb_intern("inspect"), 0);
rb_raise(rb_eArgError, "Couchbase: unknown engine %s", RSTRING_PTR(ins));
View
2 ext/couchbase_ext/eventmachine_plugin.c
@@ -17,6 +17,7 @@
#include "couchbase_ext.h"
+#ifndef _WIN32
#ifdef BUILD_EVENTMACHINE_PLUGIN
#include <errno.h>
@@ -448,3 +449,4 @@ cb_create_ruby_em_io_opts(int version, lcb_io_opt_t *io, void *arg)
}
#endif
+#endif
View
20 ext/couchbase_ext/plugin_common.c
@@ -1,5 +1,24 @@
+/* vim: ft=c et ts=8 sts=4 sw=4 cino=
+ *
+ * Copyright 2012 Couchbase, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "couchbase_ext.h"
+#ifndef _WIN32
+
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -149,3 +168,4 @@ cb_io_connect(struct lcb_io_opt_st *iops, lcb_socket_t sock,
return ret;
}
+#endif

0 comments on commit 5f5b964

Please sign in to comment.
Something went wrong with that request. Please try again.