Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion include/libcouchbase/couchbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
#ifndef LIBCOUCHBASE_COUCHBASE_H
#define LIBCOUCHBASE_COUCHBASE_H 1

#include <stdint.h>
#if !defined HAVE_STDINT_H && defined WIN32
# include "win_stdint.h"
#else
# include <stdint.h>
#endif
#include <stddef.h>
#include <time.h>

Expand Down
8 changes: 7 additions & 1 deletion src/config_static.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ extern "C" {
#endif

#ifndef HAVE_GETHRTIME
#include <stdint.h>

#if !defined HAVE_STDINT_H && defined WIN32
# include "win_stdint.h"
#else
# include <stdint.h>
#endif

typedef uint64_t hrtime_t;
extern hrtime_t gethrtime(void);
#endif
Expand Down
1 change: 1 addition & 0 deletions src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* @author Trond Norbye
* @todo add more documentation
*/

#include "internal.h"

static int do_fill_input_buffer(libcouchbase_server_t *c)
Expand Down
9 changes: 6 additions & 3 deletions src/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#if !defined HAVE_STDINT_H && defined WIN32
# include "win_stdint.h"
#else
# include <stdint.h>
#endif
#include <string.h>
#include <sys/types.h>
#include <memcached/protocol_binary.h>
Expand All @@ -33,8 +37,7 @@
#include <sasl/sasl.h>

#include "ringbuffer.h"


#include "win32/win_errno_sock.h"
/*
* libevent2 define evutil_socket_t so that it'll automagically work
* on windows
Expand Down
8 changes: 7 additions & 1 deletion win32/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
*/

#define _CRT_SECURE_NO_WARNINGS
#include <stdint.h>

#if !defined HAVE_STDINT_H && defined WIN32
# include "win_stdint.h"
#else
# include <stdint.h>
#endif

#include <string.h>

#define HAVE_WINSOCK2_H 1
Expand Down
6 changes: 5 additions & 1 deletion win32/libcouchbase/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
#error "Include libcouchbase/couchbase.h instead"
#endif

#include <stdint.h>
#if !defined HAVE_STDINT_H && defined WIN32
# include "win_stdint.h"
#else
# include <stdint.h>
#endif
#include <stddef.h>
#include <time.h>

Expand Down
62 changes: 62 additions & 0 deletions win32/win_errno_sock.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2010, 2011, 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.
*/
#ifndef LIBCOUCHBASE_WIN_ERRNO_SOCK_H
#define LIBCOUCHBASE_WIN_ERRNO_SOCK_H 1

#define EWOULDBLOCK WSAEWOULDBLOCK
#define EINPROGRESS WSAEINPROGRESS
#define EALREADY WSAEALREADY
#define ENOTSOCK WSAENOTSOCK
#define EDESTADDRREQ WSAEDESTADDRREQ
#define EMSGSIZE WSAEMSGSIZE
#define EPROTOTYPE WSAEPROTOTYPE
#define ENOPROTOOPT WSAENOPROTOOPT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
#define EOPNOTSUPP WSAEOPNOTSUPP
#define ENOPROTOOPT WSAENOPROTOOPT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
#define EOPNOTSUPP WSAEOPNOTSUPP
#define EPFNOSUPPORT WSAEPFNOSUPPORT
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#define EADDRINUSE WSAEADDRINUSE
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
#define ENETDOWN WSAENETDOWN
#define ENETUNREACH WSAENETUNREACH
#define ENETRESET WSAENETRESET
#define ECONNABORTED WSAECONNABORTED
#define ECONNRESET WSAECONNRESET
#define ENOBUFS WSAENOBUFS
#define EISCONN WSAEISCONN
#define ENOTCONN WSAENOTCONN
#define ESHUTDOWN WSAESHUTDOWN
#define ETOOMANYREFS WSAETOOMANYREFS
#define ETIMEDOUT WSAETIMEDOUT
#define ECONNREFUSED WSAECONNREFUSED
#define ELOOP WSAELOOP
/* #define ENAMETOOLONG WSAENAMETOOLONG */
#define EHOSTDOWN WSAEHOSTDOWN
#define EHOSTUNREACH WSAEHOSTUNREACH
/* #define ENOTEMPTY WSAENOTEMPTY */
#define EPROCLIM WSAEPROCLIM
#define EUSERS WSAEUSERS
#define EDQUOT WSAEDQUOT
#define ESTALE WSAESTALE
#define EREMOTE WSAEREMOTE

#endif
Loading