Updating for 1.0.2 release
[awesomized/libmemcached] / m4 / bottom.m4
1 AC_DEFUN([CONFIG_EXTRA], [
2
3 AH_BOTTOM([
4
5 #if defined(__cplusplus)
6 #include CSTDINT_H
7 #include CINTTYPES_H
8 #else
9 #include <stdint.h>
10 #include <inttypes.h>
11 #endif
12
13 #if !defined(HAVE_ULONG) && !defined(__USE_MISC)
14 # define HAVE_ULONG 1
15 typedef unsigned long int ulong;
16 #endif
17
18 ])
19
20 AH_BOTTOM([
21 #ifdef WIN32
22 #define _WIN32_WINNT 0x0501
23 #endif
24
25 /* To hide the platform differences between MS Windows and Unix, I am
26 * going to use the Microsoft way and #define the Microsoft-specific
27 * functions to the unix way. Microsoft use a separate subsystem for sockets,
28 * but Unix normally just use a filedescriptor on the same functions. It is
29 * a lot easier to map back to the unix way with macros than going the other
30 * way without side effect ;-)
31 */
32 #ifdef WIN32
33 #include "win32/wrappers.h"
34 #define get_socket_errno() WSAGetLastError()
35 #else
36 #define INVALID_SOCKET -1
37 #define SOCKET_ERROR -1
38 #define closesocket(a) close(a)
39 #define get_socket_errno() errno
40 #endif
41
42 #ifndef HAVE_MSG_NOSIGNAL
43 #define MSG_NOSIGNAL 0
44 #endif
45
46 #ifndef HAVE_MSG_DONTWAIT
47 #define MSG_DONTWAIT 0
48 #endif
49
50 #ifndef HAVE_MSG_MORE
51 #define MSG_MORE 0
52 #endif
53
54 ])
55 ])dnl CONFIG_EXTRA