Merge from libtest.
[m6w6/libmemcached] / m4 / bottom.m4
index 55591be4fe117b8267897223af5ad1c9b1662d06..289c299413493626f8c28203b43c286a2efff528 100644 (file)
@@ -1,5 +1,15 @@
 AC_DEFUN([CONFIG_EXTRA], [
 
+AH_TOP([
+#pragma once
+
+/* _SYS_FEATURE_TESTS_H is Solaris, _FEATURES_H is GCC */
+#if defined( _SYS_FEATURE_TESTS_H) || defined(_FEATURES_H)
+#error "You should include config.h as your first include file"
+#endif
+
+])
+
 AH_BOTTOM([
 
 #if defined(__cplusplus) 
@@ -17,39 +27,4 @@ typedef unsigned long int ulong;
 
 ])
 
-AH_BOTTOM([
-#ifdef WIN32
-#define _WIN32_WINNT 0x0501
-#endif
-
-/* To hide the platform differences between MS Windows and Unix, I am
- * going to use the Microsoft way and #define the Microsoft-specific
- * functions to the unix way. Microsoft use a separate subsystem for sockets,
- * but Unix normally just use a filedescriptor on the same functions. It is
- * a lot easier to map back to the unix way with macros than going the other
- * way without side effect ;-)
- */
-#ifdef WIN32
-#include "win32/wrappers.h"
-#define get_socket_errno() WSAGetLastError()
-#else
-#define INVALID_SOCKET -1
-#define SOCKET_ERROR -1
-#define closesocket(a) close(a)
-#define get_socket_errno() errno
-#endif
-
-#ifndef HAVE_MSG_NOSIGNAL
-#define MSG_NOSIGNAL 0
-#endif
-
-#ifndef HAVE_MSG_DONTWAIT
-#define MSG_DONTWAIT 0
-#endif
-
-#ifndef HAVE_MSG_MORE
-#define MSG_MORE 0
-#endif
-
-])
 ])dnl CONFIG_EXTRA