fixup: include cntl.h

Change-Id: I92200eb0d0e5abc6786bc5e4234b1ea2592031d9
Reviewed-on: http://review.couchbase.org/27923
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Add copyright notice to all man pages

This notice will be replicated in both man and HTML outputs

Change-Id: Id779a90f14e9b644108935dd809f7fb449b47aaa
Reviewed-on: http://review.couchbase.org/27854
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Migrate to Mock 0.6

The new mock uses a synchronous request/response protocol over
line-delimited JSON objects.

The mock includes functionality for replica read as well as observe,
though this is not present in our unit tests (the actual tests for using
those features will be implemented later on).

Change-Id: Ibe41ed3955d44daf7f675dda92a3813bd81f5c18
Reviewed-on: http://review.couchbase.org/27549
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Fix lcb_connect(3) manpage SYNOPSIS

Change-Id: Ia08a01ba6e9016f5bc5982be221b8e6d03f2c4c0
Reviewed-on: http://review.couchbase.org/27956
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Add 'get_nameinfo' for V1 plugin operations

getsockname/getnameinfo don't work on v1 plugins where the file
descriptor is opaque.

For windows, SO_UPDATE_CONNECT_CONTEXT is added for mingw

Change-Id: I148eaf6cb48f0fe7e6146d1e5e618b23b135d1e5
Reviewed-on: http://review.couchbase.org/27958
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Ignore generated VERSION file

Change-Id: Id727e57d619c101a5dd4dffe900a3b61d806aab9
Reviewed-on: http://review.couchbase.org/27955
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Fix memcached compatibility mode

The config given in create_memcached_compat() was rewritten by the
Couchbase configuration

Change-Id: Ic9c71e2b57adfd02f6f4ab635e6081a76f55ef27
Reviewed-on: http://review.couchbase.org/27975
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Add dumb mode to cbc tool

This mode allows to use cbc with any memcached nodes

Change-Id: Ibb425e661caf4a75dac0dea720c9df3160833095
Reviewed-on: http://review.couchbase.org/27976
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Remove extra statement left after merge

Change-Id: I9101cc8a90aa5da66ea7a766f18090691ff18b02
Reviewed-on: http://review.couchbase.org/27978
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Don't make libev timers repeatable

lcb timers are "one-shot" timers. Ensure the timer is not set to
"repeat" itself.

Change-Id: I926fbb91d3c98a41483a4eacf9bc10d634a4a2e3
Reviewed-on: http://review.couchbase.org/27985
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
CCBC-207: Check exceptfds in select

Change-Id: Ie4ea98fe76b57b7c0a620c6a638771f334221cdc
Reviewed-on: http://review.couchbase.org/27984
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
[select] Don't hang when timeout < now

Change-Id: I5395d4f1103a2c9187ce04fce8fce1de2125987a
Reviewed-on: http://review.couchbase.org/27986
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
CCBC-145 Durability operations

This changeset inevitably contains some of the basis for an
'lcb_check' command to be implemented atop observe.

Change-Id: I81d39955a2a987b7327b0bc780d0c45ed1455fc0
Reviewed-on: http://review.couchbase.org/23591
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Include <stdio> if iocp logging is enabled

Change-Id: I4fb38ab38fc43320822fafb3a83cd32b3e78de00
Reviewed-on: http://review.couchbase.org/27807
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Some fixes in the IOCP plugin regarding timeouts

- 0 is a valid timeout value. Return INFINITE if there is no pending
  timer

- Set is_active flag on timer to 0 before invoking callback. The
  callback may remove the timer (which is already popped) and re-add it
  again.

Change-Id: I1cd5c41f510347c339439adf0d3d17bf40fcfa7b
Reviewed-on: http://review.couchbase.org/27781
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Silence start_mock.bat command output

Change-Id: I52536d7029c23e2ab8ec4dad202da25574fb046a
Reviewed-on: http://review.couchbase.org/28005
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Allow environment for plugins on windows

Allow specifying the plugin via environment variables. This only works
for built-in plugins.

This should be replaced in the future with similar semantics for both
platforms

Change-Id: Ie8d3d27b5e14bacc8da87c6df185e55325cd6d34
Reviewed-on: http://review.couchbase.org/28006
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Include durablity man page into the dist

Change-Id: I8ae2956b991b183c1fe94909f46dc03f5248fff1
Reviewed-on: http://review.couchbase.org/28012
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Update lcb_create_io_ops_st layout in lcb_create_io_ops(3)

Change-Id: I223ffd63422c0b3bcc9b87140280102336e8c3c7
Reviewed-on: http://review.couchbase.org/28014
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Refactor timeout semantics

Timeouts are scheduled automatically by the connection subsystem, with
the user logic controlling the specific "delaying" of the timeouts.

Change-Id: Ie125c3584f54700d830a8732a5b8a5fe481518c2
Reviewed-on: http://review.couchbase.org/27779
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>