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>
Add (u)intX_t for windows

Change-Id: Ia73f4bc977b3b43607e8d5d9d5da92c74b5941e6