~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle.h

  • Committer: Monty Taylor
  • Date: 2011-02-12 18:56:22 UTC
  • mto: (2165.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110212185622-nmvhgqc34iwja75a
Merged in outstanding changes from the win32 work.

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>
53
50
# include <winsock2.h>
54
51
# include <ws2tcpip.h>
55
52
 
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
 
 
69
53
typedef unsigned int in_port_t;
 
54
typedef long ssize_t;
 
55
 
 
56
# define snprintf _snprintf
 
57
# define inline __inline
70
58
 
71
59
struct sockaddr_un
72
60
{
74
62
  char sun_path[108];
75
63
};
76
64
 
 
65
#if defined(__GNUC__)
 
66
# include <stdbool.h>
 
67
#else
 
68
typedef enum { false = 0, true = 1 } _Bool;
 
69
typedef _Bool bool;
 
70
#endif
77
71
 
78
72
#else
 
73
# if !defined(__cplusplus)
 
74
#  include <stdbool.h>
 
75
# endif
79
76
# include <sys/socket.h>
80
77
# include <netinet/in.h>
81
78
# include <arpa/inet.h>
83
80
# include <netdb.h>
84
81
#endif
85
82
 
 
83
#include <assert.h>
 
84
#include <errno.h>
86
85
#include <poll.h>
87
86
 
88
87
#include <libdrizzle/visibility.h>