summaryrefslogtreecommitdiff
path: root/win32/config.h
diff options
context:
space:
mode:
authorPatrick Galbraith <patg@northscale.com>2010-03-25 21:02:50 +0100
committerTrond Norbye <Trond.Norbye@gmail.com>2010-03-29 22:58:09 +0200
commit95c3be87e841a9e20139e2eb3f705dfab6b53252 (patch)
tree2441681cdc526dfd06b3325498878882fa170857 /win32/config.h
parent04e0609f4fbf048cd540df7278c3afcd08aa1260 (diff)
downloadmemcached-95c3be87e841a9e20139e2eb3f705dfab6b53252.tar.gz
Changes to memcached source required for compilation on windows
Diffstat (limited to 'win32/config.h')
-rw-r--r--win32/config.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/win32/config.h b/win32/config.h
new file mode 100644
index 0000000..cff6914
--- /dev/null
+++ b/win32/config.h
@@ -0,0 +1,92 @@
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+/* Name of package */
+#define PACKAGE "memcached"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "memcached@googlegroups.com"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "memcached"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_DESCRIPTION "memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load."
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "memcached"
+
+#include "config_version.h"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* machine is littleendian */
+#define ENDIAN_LITTLE 1
+
+#define ENABLE_ISASL 1
+
+#define HAVE_DLFCN_H 1
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* define to int if socklen_t not available */
+/* #undef socklen_t */
+/* Windows-specific includes */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "win32.h"
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <process.h>
+/* PRIu64 */
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+/*******************************/
+/* HACKS to compile under UNIX */
+
+#define S_ISSOCK(mode) 0
+#define RLIMIT_CORE 4
+#define RLIM_INFINITY ((unsigned long int) (-0UL))
+#define RLIMIT_NOFILE 7
+
+/* Create expected type and struct definitions */
+
+typedef short int _uid_t;
+
+struct passwd {
+ char * pw_name;
+ char * pw_passwd;
+ _uid_t pw_uid;
+ _uid_t pw_gid;
+ char * pw_gecos;
+ char * pw_dir;
+ char * pw_shell;
+};
+
+struct sockaddr_un {
+ unsigned short int sun_family;
+ char sun_path[108];
+};
+
+struct rlimit {
+ unsigned long int rlim_cur, rlim_max;
+};
+
+/* Function prototypes expected by UNIX code
+ * - function definitions in dummy_defs.c
+ */
+
+int lstat(const char *path, struct stat *tstat);
+int sigignore(int sig);
+int getrlimit(int __resource, struct rlimit * __rlimits);
+int setrlimit(int __resource, struct rlimit * __rlimits);
+_uid_t getuid(void);
+_uid_t geteuid(void);
+struct passwd *getpwnam(const char *name);
+int setuid(_uid_t uid);
+int setgid(_uid_t gid);
+#endif // _CONFIG_H