Add missing file for win32: getopt.h

Change-Id: I4823de36774f04fb1950921ed231b00091c26d1d
Fix build problem on W2008 in /xp /x86 /release mode

Change-Id: I1d51e4f9b1e0ae9f6df28a22bf13a5ab6bf55ab8
Reviewed-on: http://review.couchbase.org/28476
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix build failure due to mixed declarations and code

Change-Id: I5e905b2c6746831df3485531229c493a335ceae7
Reviewed-on: http://review.couchbase.org/28542
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Update .gitignore file

Change-Id: I12be43035ee710c2e41346b0014be8bf3df4a177
Reviewed-on: http://review.couchbase.org/28543
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Link with -lrt

Change-Id: I1628328aefc8c97e70145c53f50734084f3bdaf7
Reviewed-on: http://review.couchbase.org/28662
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Use toplevel CMakeLists.txt

Change-Id: Icf8436cf3e24b8754133bf8683b633839dc77230
Reviewed-on: http://review.couchbase.org/28729
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Add a make target to reformat the code

The source code should be uniform to make it easy to navigate
through the code

Change-Id: I071f88909f6cf431f244c5ce802c0eac7e7dbe09
Reviewed-on: http://review.couchbase.org/28761
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reformat the code with astyle

Change-Id: I78f56946872aff6291b672abe844fa242d8ec2d9
Reviewed-on: http://review.couchbase.org/28763
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Add ntohll and htonll

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

Change-Id: Ic3f00147b384b08d1a231354d4160a3b4d304200
Reviewed-on: http://review.couchbase.org/29144
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
MB-9190: Add (u)intX_t for windows

Change-Id: Ia73f4bc977b3b43607e8d5d9d5da92c74b5941e6
Reviewed-on: http://review.couchbase.org/29250
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Use a "fake" CONDITION_VARIABLE for mingw

It seems like the windows.h header file included through mingw
doesn't define CONDITION_VARIABLE causing the build to break.
Since the variable is only used to declare space, we can just make
a storage that's big enough for now.

Change-Id: Ica2433f6807576c8d469bf47c626c765fbe8c7a0
Reviewed-on: http://review.couchbase.org/29499
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Fix build problems with visual studio 2013

Change-Id: I7dfdcd4f6b6b503c5c49d3fbe77a6c2506ce80ad
Reviewed-on: http://review.couchbase.org/29897
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Revert "Fix build problems with visual studio 2013"

This reverts commit d0e8be9d19cb3b0ab430a71f2309d9a07aec1362.

Change-Id: Ic9956bfc6e1e05fc9656ed8cfb5c4547d692a412
Reviewed-on: http://review.couchbase.org/29898
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Add cb_thread_equals

Change-Id: Icb3fca371e32c23d449b3d616eb3c2af958c5c5b
Reviewed-on: http://review.couchbase.org/30048
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
improved the cb_cond_timewait for pthreads

Change-Id: Ie31cbfa7fe54cba6cc46a1d4dfb461e5b98026bf
Reviewed-on: http://review.couchbase.org/30049
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix checks for ntohll for MSVC 2013

Change-Id: I58e8999bda6b5e4c42742122c8fb03745cd2dc8d
Reviewed-on: http://review.couchbase.org/30086
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Implement cb_thread_equal for win32

Change-Id: Idafb2cf17d276e446277c76725cf8dd84267b366
Reviewed-on: http://review.couchbase.org/30130
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Include winsock2.h

Change-Id: Id60650e7ff17aef1031ac6647d1c14b0d081fd24
Reviewed-on: http://review.couchbase.org/30385
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fixup cb_cond_timedwait for pthread

Change-Id: I9428505bb44de5abd3df4e3947a0cd220b9d4f63
Reviewed-on: http://review.couchbase.org/30981
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>