~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle.h

  • Committer: Brian Aker
  • Date: 2011-02-13 22:15:19 UTC
  • mfrom: (2165.1.6 drizzle-staging)
  • Revision ID: brian@tangent.org-20110213221519-7a1zyzo0vfpw9jbm
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#ifndef __DRIZZLE_H
43
43
#define __DRIZZLE_H
44
44
 
45
 
#if !defined(__cplusplus)
46
 
# include <stdbool.h>
47
 
#endif
48
45
 
49
46
#include <inttypes.h>
50
47
#include <sys/types.h>
51
48
 
52
49
#ifdef _WIN32
 
50
# define WIN32_LEAN_AND_MEAN
 
51
 
 
52
# include <Windows.h>
53
53
# include <winsock2.h>
54
54
# include <ws2tcpip.h>
55
 
 
56
 
# include <errno.h>
57
 
# define EINPROGRESS WSAEINPROGRESS
58
 
# define EALREADY WSAEALREADY
59
 
# define EISCONN WSAEISCONN
60
 
# define ENOBUFS WSAENOBUFS
61
 
# define ECONNREFUSED WSAECONNREFUSED
62
 
# define ENETUNREACH WSAENETUNREACH
63
 
# define ETIMEDOUT WSAETIMEDOUT
64
 
# define ECONNRESET WSAECONNRESET 
65
 
# define EADDRINUSE WSAEADDRINUSE
66
 
# define EOPNOTSUPP WSAEOPNOTSUPP
67
 
# define ENOPROTOOPT WSAENOPROTOOPT
68
 
 
 
55
# include <io.h>
 
56
 
 
57
# undef close
 
58
# define close _close
69
59
typedef unsigned int in_port_t;
 
60
typedef long ssize_t;
 
61
 
 
62
# define snprintf _snprintf
 
63
# define inline __inline
70
64
 
71
65
struct sockaddr_un
72
66
{
74
68
  char sun_path[108];
75
69
};
76
70
 
77
 
 
78
 
#else
 
71
# define poll WSAPoll
 
72
//# define pollfd WSAPOLLFD
 
73
 
 
74
#if defined(__GNUC__)
 
75
# include <stdbool.h>
 
76
#else
 
77
typedef enum { false = 0, true = 1 } _Bool;
 
78
typedef _Bool bool;
 
79
#endif
 
80
 
 
81
#else
 
82
# if !defined(__cplusplus)
 
83
#  include <stdbool.h>
 
84
# endif
79
85
# include <sys/socket.h>
80
86
# include <netinet/in.h>
81
87
# include <arpa/inet.h>
82
88
# include <sys/un.h>
83
89
# include <netdb.h>
 
90
# include <poll.h>
84
91
#endif
85
92
 
86
 
#include <poll.h>
 
93
#include <assert.h>
 
94
#include <errno.h>
87
95
 
88
96
#include <libdrizzle/visibility.h>
89
97
#include <libdrizzle/constants.h>