Fix build breaks with --enable-werror with SPRO

Change-Id: Ib9792a2e4ed16bf07c462e780e1cef9351a78f42
Reviewed-on: http://review.couchbase.org/13814
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Refactor: rename libcouchbase_ringbuffer_ to ringbuffer_

These are library internal functions not exported outside the library

Change-Id: Iccb8f2aef9f1d23109d676d7adf45cbd99c0995d
Reviewed-on: http://review.couchbase.org/13805
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Add lint rule

Change-Id: I8504170986e19bd7d69ee3be69c9fa3609ea67d0
Reviewed-on: http://review.couchbase.org/13824
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
MB-4834: Request the tap bytes in a known byte order

Change-Id: Ib53b352b04e38b515f66301b79a55fc56ea7e93d
Reviewed-on: http://review.couchbase.org/13806
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix errors reported by lint

Change-Id: I688876a659e68166456541f9d296e038118af6e5
Reviewed-on: http://review.couchbase.org/13825
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Check for newer libvbucket

Change-Id: Ic98954ff540aad128455be0e1f0b8d66bb097bc2
Reviewed-on: http://review.couchbase.org/13850
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Clean up warnings reported by lint

Change-Id: I11a119fdfba74d9722ff5bc3396deedf7279515d
Reviewed-on: http://review.couchbase.org/13856
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Don't try to be smart linking the strerror test

Change-Id: Ic326147f8f359dc36c1ad48e8683d8ff049ddc24
Reviewed-on: http://review.couchbase.org/13895
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Include errno.h to ensure that the macros should be set first

Change-Id: Id7bc3d49092e32329fd121cc44f4adf6b3273277
Reviewed-on: http://review.couchbase.org/13901
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Bundle HTTP parser from https://github.com/joyent/http-parser

Change-Id: Ia6165fcce5d2f915febfbe9c6e3f5a806c50e030
Reviewed-on: http://review.couchbase.org/13882
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Fix pedantic warnings

More info: https://github.com/joyent/http-parser/pull/102

Change-Id: I70997a636b631df13d56154c8d1684b5d39c81bd
Reviewed-on: http://review.couchbase.org/13883
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Build HTTP parser as separate library

Change-Id: Ib3dc4d19cb0f40e0052fa9678c4d2278152508ad
Reviewed-on: http://review.couchbase.org/13894
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Implement hash set data structure

Change-Id: I048844374843e8e840611d296996d8967b1a7d24
Reviewed-on: http://review.couchbase.org/13884
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Use libcouchbase IO layer for views

Change-Id: I0c0c0f0c5a73935a2334a416229cf965d167621a
Reviewed-on: http://review.couchbase.org/13885
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Null-terminate unhandled vbucket-stream chunk data

Otherwise strstr() might return faulty delimiter in already-parsed data

Change-Id: I5b793c39a89c072388987ef1e75d52fa1624e9ee
Reviewed-on: http://review.couchbase.org/14141
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
vbucket_found_incorrect_master() returns server index

Change-Id: I39eb6543656fb7f9bd7bcdb9a57a0fb531e9eb75
Reviewed-on: http://review.couchbase.org/14336
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Pick up cookies from pending buffer unless node connected

Change-Id: I645ab4557901b480f70c23b56e38c63e0222d888
Reviewed-on: http://review.couchbase.org/14337
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Allow tests to use user-defined event loop for iops

Change-Id: Ic6bfd5001729d4952360b6c6a48abf3ad54b5f7e
Reviewed-on: http://review.couchbase.org/14132
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Gracefully cancel couch request

This patch fixes segfault when user cancels request in on_data callback

Change-Id: Icbb35217f25e7b20696293db5ab7aa4c6ae5a8f9
Reviewed-on: http://review.couchbase.org/14430
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Return reference to request struct from constructor

Change-Id: Ib337a5b925ddc3ef4dd6f8c6bc969bf70d65670d
Reviewed-on: http://review.couchbase.org/14461
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>