[CLEANUP] renamed include/haproxy to include/common
diff --git a/include/haproxy/appsession.h b/include/common/appsession.h
similarity index 85%
rename from include/haproxy/appsession.h
rename to include/common/appsession.h
index 94a7e65..2c39e46 100644
--- a/include/haproxy/appsession.h
+++ b/include/common/appsession.h
@@ -1,14 +1,14 @@
-#ifndef _HAPROXY_APPSESS_H
-#define _HAPROXY_APPSESS_H
+#ifndef _COMMON_APPSESS_H
+#define _COMMON_APPSESS_H
#define TBLSIZ 10
#define TBLCHKINT 5000 /* The time between two calls of appsession_refresh in ms */
#include <sys/time.h>
-#include <haproxy/chtbl.h>
-#include <haproxy/hashpjw.h>
-#include <haproxy/list.h>
+#include <common/chtbl.h>
+#include <common/hashpjw.h>
+#include <common/list.h>
#include <types/task.h>
@@ -48,7 +48,7 @@
int appsession_init(void);
void appsession_cleanup(void);
-#endif /* _HAPROXY_APPSESS_H */
+#endif /* _COMMON_APPSESS_H */
/*
* Local variables:
diff --git a/include/haproxy/base64.h b/include/common/base64.h
similarity index 80%
rename from include/haproxy/base64.h
rename to include/common/base64.h
index d22d903..3948962 100644
--- a/include/haproxy/base64.h
+++ b/include/common/base64.h
@@ -1,5 +1,5 @@
/*
- * include/haproxy/base64.h
+ * include/common/base64.h
* Ascii to Base64 conversion as described in RFC1421.
*
* Copyright 2006 Willy Tarreau <w@1wt.eu>
@@ -11,10 +11,10 @@
*
*/
-#ifndef _HAPROXY_BASE64_H
-#define _HAPROXY_BASE64_H
+#ifndef _COMMON_BASE64_H
+#define _COMMON_BASE64_H
int a2base64(char *in, int ilen, char *out, int olen);
extern const char base64tab[];
-#endif /* _HAPROXY_BASE64_H */
+#endif /* _COMMON_BASE64_H */
diff --git a/include/haproxy/cfgparse.h b/include/common/cfgparse.h
similarity index 90%
rename from include/haproxy/cfgparse.h
rename to include/common/cfgparse.h
index f945d9c..35302b3 100644
--- a/include/haproxy/cfgparse.h
+++ b/include/common/cfgparse.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/cfgparse.h
+ include/common/cfgparse.h
Configuration parsing functions.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_CFGPARSE_H
-#define _HAPROXY_CFGPARSE_H
+#ifndef _COMMON_CFGPARSE_H
+#define _COMMON_CFGPARSE_H
/* configuration sections */
#define CFG_NONE 0
@@ -35,7 +35,7 @@
int readcfgfile(char *file);
-#endif /* _HAPROXY_CFGPARSE_H */
+#endif /* _COMMON_CFGPARSE_H */
/*
* Local variables:
diff --git a/include/haproxy/chtbl.h b/include/common/chtbl.h
similarity index 95%
rename from include/haproxy/chtbl.h
rename to include/common/chtbl.h
index fe4de70..38b495f 100644
--- a/include/haproxy/chtbl.h
+++ b/include/common/chtbl.h
@@ -15,8 +15,8 @@
* *
*****************************************************************************/
-#ifndef _HAPROXY_CHTBL_H
-#define _HAPROXY_CHTBL_H
+#ifndef _COMMON_CHTBL_H
+#define _COMMON_CHTBL_H
#include <stdlib.h>
@@ -59,5 +59,5 @@
#define chtbl_size(htbl) ((htbl)->size)
-#endif /* _HAPROXY_CHTBL_H */
+#endif /* _COMMON_CHTBL_H */
diff --git a/include/haproxy/compat.h b/include/common/compat.h
similarity index 92%
rename from include/haproxy/compat.h
rename to include/common/compat.h
index bf4c843..a605da1 100644
--- a/include/haproxy/compat.h
+++ b/include/common/compat.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/compat.h
+ include/common/compat.h
Operating system compatibility interface.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_COMPAT_H
-#define _HAPROXY_COMPAT_H
+#ifndef _COMMON_COMPAT_H
+#define _COMMON_COMPAT_H
/* This is needed on Linux for Netfilter includes */
#include <sys/socket.h>
@@ -52,7 +52,7 @@
#include <strings.h>
#endif
-#endif /* _HAPROXY_COMPAT_H */
+#endif /* _COMMON_COMPAT_H */
/*
* Local variables:
diff --git a/include/haproxy/config.h b/include/common/config.h
similarity index 88%
rename from include/haproxy/config.h
rename to include/common/config.h
index 968e3c1..f9145c5 100644
--- a/include/haproxy/config.h
+++ b/include/common/config.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/config.h
+ include/common/config.h
This files contains most of the user-configurable settings.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,10 +19,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_CONFIG_H
-#define _HAPROXY_CONFIG_H
+#ifndef _COMMON_CONFIG_H
+#define _COMMON_CONFIG_H
-#include <haproxy/defaults.h>
+#include <common/defaults.h>
/* this reduces the number of calls to select() by choosing appropriate
* sheduler precision in milliseconds. It should be near the minimum
@@ -31,4 +31,4 @@
*/
#define SCHEDULER_RESOLUTION 9
-#endif /* _HAPROXY_CONFIG_H */
+#endif /* _COMMON_CONFIG_H */
diff --git a/include/haproxy/defaults.h b/include/common/defaults.h
similarity index 95%
rename from include/haproxy/defaults.h
rename to include/common/defaults.h
index f01dc67..449fc5f 100644
--- a/include/haproxy/defaults.h
+++ b/include/common/defaults.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/defaults.h
+ include/common/defaults.h
Miscellaneous default values.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_DEFAULTS_H
-#define _HAPROXY_DEFAULTS_H
+#ifndef _COMMON_DEFAULTS_H
+#define _COMMON_DEFAULTS_H
/* CONFIG_HAP_MEM_OPTIM
@@ -91,4 +91,4 @@
#define DEFAULT_MAXCONN SYSTEM_MAXCONN
#endif
-#endif /* _HAPROXY_DEFAULTS_H */
+#endif /* _COMMON_DEFAULTS_H */
diff --git a/include/haproxy/epoll.h b/include/common/epoll.h
similarity index 95%
rename from include/haproxy/epoll.h
rename to include/common/epoll.h
index d1bd112..865a3e1 100644
--- a/include/haproxy/epoll.h
+++ b/include/common/epoll.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/epoll.h
+ include/common/epoll.h
epoll definitions for older libc.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -26,8 +26,8 @@
* just a basic definition.
*/
-#ifndef _HAPROXY_EPOLL_H
-#define _HAPROXY_EPOLL_H
+#ifndef _COMMON_EPOLL_H
+#define _COMMON_EPOLL_H
#include <linux/unistd.h>
#include <stdint.h>
@@ -92,7 +92,7 @@
extern int epoll_ctl(int epfd, int op, int fd, struct epoll_event * event);
extern int epoll_wait(int epfd, struct epoll_event * events, int maxevents, int timeout);
-#endif /* _HAPROXY_EPOLL_H */
+#endif /* _COMMON_EPOLL_H */
/*
diff --git a/include/haproxy/hashpjw.h b/include/common/hashpjw.h
similarity index 94%
rename from include/haproxy/hashpjw.h
rename to include/common/hashpjw.h
index 2788395..99a3ad7 100644
--- a/include/haproxy/hashpjw.h
+++ b/include/common/hashpjw.h
@@ -16,8 +16,8 @@
* *
*****************************************************************************/
-#ifndef _HAPROXY_HASHPJW_H
-#define _HAPROXY_HASHPJW_H
+#ifndef _COMMON_HASHPJW_H
+#define _COMMON_HASHPJW_H
/*****************************************************************************
* *
@@ -35,4 +35,4 @@
int hashpjw(const void *key);
-#endif /* _HAPROXY_HASHPJW_H */
+#endif /* _COMMON_HASHPJW_H */
diff --git a/include/haproxy/list.h b/include/common/list.h
similarity index 96%
rename from include/haproxy/list.h
rename to include/common/list.h
index 1689573..4537d8d 100644
--- a/include/haproxy/list.h
+++ b/include/common/list.h
@@ -15,8 +15,8 @@
* *
*****************************************************************************/
-#ifndef _HAPROXY_LIST_H
-#define _HAPROXY_LIST_H
+#ifndef _COMMON_LIST_H
+#define _COMMON_LIST_H
#include <stdlib.h>
@@ -74,7 +74,7 @@
#define list_next(element) ((element)->next)
-#endif /* _HAPROXY_LIST_H */
+#endif /* _COMMON_LIST_H */
/*
* Local variables:
diff --git a/include/haproxy/memory.h b/include/common/memory.h
similarity index 96%
rename from include/haproxy/memory.h
rename to include/common/memory.h
index 3f269d2..820c1d9 100644
--- a/include/haproxy/memory.h
+++ b/include/common/memory.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/memory.h
+ include/common/memory.h
Memory management definitions..
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,12 +19,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_MEMORY_H
-#define _HAPROXY_MEMORY_H
+#ifndef _COMMON_MEMORY_H
+#define _COMMON_MEMORY_H
#include <stdlib.h>
-#include <haproxy/config.h>
+#include <common/config.h>
#define sizeof_requri REQURI_LEN
#define sizeof_capture CAPTURE_LEN
@@ -112,7 +112,7 @@
}
}
-#endif /* _HAPROXY_MEMORY_H */
+#endif /* _COMMON_MEMORY_H */
/*
* Local variables:
diff --git a/include/haproxy/mini-clist.h b/include/common/mini-clist.h
similarity index 97%
rename from include/haproxy/mini-clist.h
rename to include/common/mini-clist.h
index bf9bbe9..47b004d 100644
--- a/include/haproxy/mini-clist.h
+++ b/include/common/mini-clist.h
@@ -4,8 +4,8 @@
*
*/
-#ifndef _HAPROXY_MINI_CLIST_H
-#define _HAPROXY_MINI_CLIST_H
+#ifndef _COMMON_MINI_CLIST_H
+#define _COMMON_MINI_CLIST_H
/* these are circular or bidirectionnal lists only. Each list pointer points to
* another list pointer in a structure, and not the structure itself. The
@@ -91,4 +91,4 @@
for ( ; (iterator) != (end_item); (iterator) = (backup), \
backup = LIST_ELEM((iterator)->struct_member.n, struct_type, struct_member))
-#endif /* _HAPROXY_MINI_CLIST_H */
+#endif /* _COMMON_MINI_CLIST_H */
diff --git a/include/haproxy/regex.h b/include/common/regex.h
similarity index 92%
rename from include/haproxy/regex.h
rename to include/common/regex.h
index 03b4ca6..d9510bf 100644
--- a/include/haproxy/regex.h
+++ b/include/common/regex.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/regex.h
+ include/common/regex.h
This file defines everything related to regular expressions.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,10 +19,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_REGEX_H
-#define _HAPROXY_REGEX_H
+#ifndef _COMMON_REGEX_H
+#define _COMMON_REGEX_H
-#include <haproxy/defaults.h>
+#include <common/defaults.h>
#ifdef USE_PCRE
#include <pcre.h>
@@ -51,7 +51,7 @@
char *check_replace_string(char *str);
char *chain_regex(struct hdr_exp **head, regex_t *preg, int action, char *replace);
-#endif /* _HAPROXY_REGEX_H */
+#endif /* _COMMON_REGEX_H */
/*
* Local variables:
diff --git a/include/haproxy/standard.h b/include/common/standard.h
similarity index 94%
rename from include/haproxy/standard.h
rename to include/common/standard.h
index 05a2b0d..bde42e3 100644
--- a/include/haproxy/standard.h
+++ b/include/common/standard.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/standard.h
+ include/common/standard.h
This files contains some general purpose functions and macros.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,12 +19,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_STANDARD_H
-#define _HAPROXY_STANDARD_H
+#ifndef _COMMON_STANDARD_H
+#define _COMMON_STANDARD_H
#include <netinet/in.h>
-#include <haproxy/defaults.h>
-#include <haproxy/compat.h>
+#include <common/defaults.h>
+#include <common/compat.h>
/****** string-specific macros and functions ******/
@@ -89,4 +89,4 @@
const char escape, const fd_set *map,
const char *string);
-#endif /* _HAPROXY_STANDARD_H */
+#endif /* _COMMON_STANDARD_H */
diff --git a/include/haproxy/template.h b/include/common/template.h
similarity index 87%
rename from include/haproxy/template.h
rename to include/common/template.h
index da2b9d5..431274f 100644
--- a/include/haproxy/template.h
+++ b/include/common/template.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/template.h
+ include/common/template.h
This file serves as a template for future include files.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,11 +19,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_TEMPLATE_H
-#define _HAPROXY_TEMPLATE_H
+#ifndef _COMMON_TEMPLATE_H
+#define _COMMON_TEMPLATE_H
-#endif /* _HAPROXY_TEMPLATE_H */
+#endif /* _COMMON_TEMPLATE_H */
/*
* Local variables:
diff --git a/include/haproxy/time.h b/include/common/time.h
similarity index 97%
rename from include/haproxy/time.h
rename to include/common/time.h
index dd3e701..b258466 100644
--- a/include/haproxy/time.h
+++ b/include/common/time.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/time.h
+ include/common/time.h
Time calculation functions and macros.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_TIME_H
-#define _HAPROXY_TIME_H
+#ifndef _COMMON_TIME_H
+#define _COMMON_TIME_H
#include <stdlib.h>
#include <sys/time.h>
@@ -166,7 +166,7 @@
}
-#endif /* _HAPROXY_TIME_H */
+#endif /* _COMMON_TIME_H */
/*
* Local variables:
diff --git a/include/haproxy/uri_auth.h b/include/common/uri_auth.h
similarity index 96%
rename from include/haproxy/uri_auth.h
rename to include/common/uri_auth.h
index 9eed730..ddfa56b 100644
--- a/include/haproxy/uri_auth.h
+++ b/include/common/uri_auth.h
@@ -10,8 +10,8 @@
*
*/
-#ifndef _HAPROXY_URI_AUTH_H
-#define _HAPROXY_URI_AUTH_H
+#ifndef _COMMON_URI_AUTH_H
+#define _COMMON_URI_AUTH_H
/* here we find a very basic list of base64-encoded 'user:passwd' strings */
struct user_auth {
struct user_auth *next; /* next entry, NULL if none */
@@ -65,4 +65,4 @@
struct uri_auth *stats_add_auth(struct uri_auth **root, char *user);
struct uri_auth *stats_add_scope(struct uri_auth **root, char *scope);
-#endif /* _HAPROXY_URI_AUTH_H */
+#endif /* _COMMON_URI_AUTH_H */
diff --git a/include/haproxy/version.h b/include/common/version.h
similarity index 89%
rename from include/haproxy/version.h
rename to include/common/version.h
index 16e0d54..c1ae43b 100644
--- a/include/haproxy/version.h
+++ b/include/common/version.h
@@ -1,5 +1,5 @@
/*
- include/haproxy/version.h
+ include/common/version.h
This file serves as a template for future include files.
Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _HAPROXY_VERSION_H
-#define _HAPROXY_VERSION_H
+#ifndef _COMMON_VERSION_H
+#define _COMMON_VERSION_H
#ifdef CONFIG_PRODUCT_NAME
#define PRODUCT_NAME CONFIG_PRODUCT_NAME
@@ -36,4 +36,4 @@
#define HAPROXY_DATE "2006/06/26"
#endif
-#endif /* _HAPROXY_VERSION_H */
+#endif /* _COMMON_VERSION_H */
diff --git a/include/proto/buffers.h b/include/proto/buffers.h
index 8555751..b332a4b 100644
--- a/include/proto/buffers.h
+++ b/include/proto/buffers.h
@@ -22,7 +22,7 @@
#ifndef _PROTO_BUFFERS_H
#define _PROTO_BUFFERS_H
-#include <haproxy/defaults.h>
+#include <common/defaults.h>
#include <types/buffers.h>
/* returns 1 if the buffer is empty, 0 otherwise */
diff --git a/include/proto/queue.h b/include/proto/queue.h
index 9f13590..6909cbe 100644
--- a/include/proto/queue.h
+++ b/include/proto/queue.h
@@ -22,8 +22,8 @@
#ifndef _PROTO_QUEUE_H
#define _PROTO_QUEUE_H
-#include <haproxy/memory.h>
-#include <haproxy/mini-clist.h>
+#include <common/memory.h>
+#include <common/mini-clist.h>
#include <types/proxy.h>
#include <types/queue.h>
diff --git a/include/proto/stream_sock.h b/include/proto/stream_sock.h
index bab3c53..14d90cf 100644
--- a/include/proto/stream_sock.h
+++ b/include/proto/stream_sock.h
@@ -26,8 +26,8 @@
#include <sys/socket.h>
#include <sys/types.h>
-#include <haproxy/defaults.h>
-#include <haproxy/config.h>
+#include <common/defaults.h>
+#include <common/config.h>
/* FIXME: merge those ones together */
diff --git a/include/proto/task.h b/include/proto/task.h
index 8aba795..72fd1f1 100644
--- a/include/proto/task.h
+++ b/include/proto/task.h
@@ -25,7 +25,7 @@
#include <sys/time.h>
#include <types/task.h>
-#include <haproxy/memory.h>
+#include <common/memory.h>
/* puts the task <t> in run queue <q>, and returns <t> */
diff --git a/include/types/buffers.h b/include/types/buffers.h
index 2fcf59f..1bbea69 100644
--- a/include/types/buffers.h
+++ b/include/types/buffers.h
@@ -22,8 +22,8 @@
#ifndef _TYPES_BUFFERS_H
#define _TYPES_BUFFERS_H
-#include <haproxy/defaults.h>
-#include <haproxy/memory.h>
+#include <common/defaults.h>
+#include <common/memory.h>
/* describes a chunk of string */
struct chunk {
diff --git a/include/types/fd.h b/include/types/fd.h
index 6e350e5..1b24be3 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -26,7 +26,7 @@
#include <sys/types.h>
#include <unistd.h>
-#include <haproxy/config.h>
+#include <common/config.h>
#include <types/task.h>
/* different possible states for the fd */
diff --git a/include/types/polling.h b/include/types/polling.h
index 3c2a231..cd9fe93 100644
--- a/include/types/polling.h
+++ b/include/types/polling.h
@@ -27,7 +27,7 @@
#include <sys/types.h>
#include <unistd.h>
-#include <haproxy/config.h>
+#include <common/config.h>
/* for POLL_* */
#if defined(ENABLE_POLL)
@@ -39,7 +39,7 @@
#if !defined(USE_MY_EPOLL)
#include <sys/epoll.h>
#else
-#include <haproxy/epoll.h>
+#include <common/epoll.h>
#endif
#endif
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 9685828..d699bc1 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -26,10 +26,10 @@
#include <arpa/inet.h>
#include <sys/socket.h>
-#include <haproxy/appsession.h>
-#include <haproxy/chtbl.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/regex.h>
+#include <common/appsession.h>
+#include <common/chtbl.h>
+#include <common/mini-clist.h>
+#include <common/regex.h>
#include <types/buffers.h>
#include <types/session.h>
diff --git a/include/types/queue.h b/include/types/queue.h
index d35fae9..1e45b28 100644
--- a/include/types/queue.h
+++ b/include/types/queue.h
@@ -22,7 +22,7 @@
#ifndef _TYPES_QUEUE_H
#define _TYPES_QUEUE_H
-#include <haproxy/mini-clist.h>
+#include <common/mini-clist.h>
#include <types/server.h>
#include <types/session.h>
diff --git a/include/types/server.h b/include/types/server.h
index 56a6b63..7c62a3d 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -25,7 +25,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <haproxy/mini-clist.h>
+#include <common/mini-clist.h>
#include <types/buffers.h>
#include <types/proxy.h>
diff --git a/include/types/session.h b/include/types/session.h
index e2ae54d..8a5d0a4 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -28,7 +28,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <haproxy/mini-clist.h>
+#include <common/mini-clist.h>
#include <types/buffers.h>
#include <types/proxy.h>
diff --git a/src/appsession.c b/src/appsession.c
index da7315a..58145e1 100644
--- a/src/appsession.c
+++ b/src/appsession.c
@@ -11,11 +11,12 @@
*/
#include <stdio.h>
+#include <string.h>
-#include <haproxy/appsession.h>
-#include <haproxy/chtbl.h>
-#include <haproxy/list.h>
-#include <haproxy/time.h>
+#include <common/appsession.h>
+#include <common/chtbl.h>
+#include <common/list.h>
+#include <common/time.h>
#include <types/buffers.h>
#include <types/global.h>
diff --git a/src/backend.c b/src/backend.c
index ec99790..df920a0 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -16,8 +16,8 @@
#include <stdlib.h>
#include <syslog.h>
-#include <haproxy/compat.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/time.h>
#include <types/buffers.h>
#include <types/global.h>
diff --git a/src/base64.c b/src/base64.c
index a427d5d..d730328 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -10,7 +10,7 @@
*
*/
-#include <haproxy/base64.h>
+#include <common/base64.h>
const char base64tab[64]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 52b6e08..cfca6c9 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -16,12 +16,12 @@
#include <netdb.h>
#include <ctype.h>
-#include <haproxy/cfgparse.h>
-#include <haproxy/config.h>
-#include <haproxy/memory.h>
-#include <haproxy/standard.h>
-#include <haproxy/time.h>
-#include <haproxy/uri_auth.h>
+#include <common/cfgparse.h>
+#include <common/config.h>
+#include <common/memory.h>
+#include <common/standard.h>
+#include <common/time.h>
+#include <common/uri_auth.h>
#include <types/capture.h>
#include <types/global.h>
diff --git a/src/checks.c b/src/checks.c
index 8fd3e8e..fd0f106 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -13,15 +13,16 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/mini-clist.h>
+#include <common/time.h>
#include <types/global.h>
#include <types/polling.h>
diff --git a/src/chtbl.c b/src/chtbl.c
index c8e794f..7773d40 100644
--- a/src/chtbl.c
+++ b/src/chtbl.c
@@ -18,8 +18,8 @@
#include <stdlib.h>
#include <string.h>
-#include <haproxy/list.h>
-#include <haproxy/chtbl.h>
+#include <common/list.h>
+#include <common/chtbl.h>
/*****************************************************************************
* *
diff --git a/src/client.c b/src/client.c
index d42e8aa..31da594 100644
--- a/src/client.c
+++ b/src/client.c
@@ -14,13 +14,14 @@
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <haproxy/compat.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/time.h>
#include <types/backend.h>
#include <types/buffers.h>
diff --git a/src/fd.c b/src/fd.c
index b7ff8ad..ec0607e 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -29,9 +29,9 @@
#include <sys/time.h>
#include <sys/types.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/time.h>
#include <types/fd.h>
#include <types/global.h>
@@ -64,6 +64,8 @@
fd_set *PrevReadEvent = NULL, *PrevWriteEvent = NULL;
#if defined(USE_MY_EPOLL)
+#include <errno.h>
+#include <sys/syscall.h>
_syscall1 (int, epoll_create, int, size);
_syscall4 (int, epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event);
_syscall4 (int, epoll_wait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout);
diff --git a/src/haproxy.c b/src/haproxy.c
index e339a7b..917e202 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -58,19 +58,19 @@
#include <assert.h>
#endif
-#include <haproxy/appsession.h>
-#include <haproxy/base64.h>
-#include <haproxy/cfgparse.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/defaults.h>
-#include <haproxy/memory.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/regex.h>
-#include <haproxy/standard.h>
-#include <haproxy/time.h>
-#include <haproxy/uri_auth.h>
-#include <haproxy/version.h>
+#include <common/appsession.h>
+#include <common/base64.h>
+#include <common/cfgparse.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/defaults.h>
+#include <common/memory.h>
+#include <common/mini-clist.h>
+#include <common/regex.h>
+#include <common/standard.h>
+#include <common/time.h>
+#include <common/uri_auth.h>
+#include <common/version.h>
#include <types/capture.h>
#include <types/global.h>
diff --git a/src/hashpjw.c b/src/hashpjw.c
index 78c0a5b..69fa1b9 100644
--- a/src/hashpjw.c
+++ b/src/hashpjw.c
@@ -16,8 +16,8 @@
* *
*****************************************************************************/
-#include <haproxy/hashpjw.h>
-#include <haproxy/appsession.h>
+#include <common/hashpjw.h>
+#include <common/appsession.h>
/*****************************************************************************
* *
diff --git a/src/list.c b/src/list.c
index 0eaf6ce..ae79a0c 100644
--- a/src/list.c
+++ b/src/list.c
@@ -18,7 +18,7 @@
#include <stdlib.h>
#include <string.h>
-#include <haproxy/list.h>
+#include <common/list.h>
/*****************************************************************************
* *
diff --git a/src/log.c b/src/log.c
index d311ac8..34cf525 100644
--- a/src/log.c
+++ b/src/log.c
@@ -20,7 +20,7 @@
#include <sys/time.h>
-#include <haproxy/standard.h>
+#include <common/standard.h>
#include <types/backend.h>
#include <types/global.h>
diff --git a/src/polling.c b/src/polling.c
index af01290..9264a50 100644
--- a/src/polling.c
+++ b/src/polling.c
@@ -14,9 +14,9 @@
#include <sys/time.h>
#include <sys/types.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/time.h>
#include <types/fd.h>
#include <types/global.h>
diff --git a/src/proto_http.c b/src/proto_http.c
index 9368362..0c24a05 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -22,15 +22,15 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <haproxy/appsession.h>
-#include <haproxy/compat.h>
-#include <haproxy/config.h>
-#include <haproxy/memory.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/standard.h>
-#include <haproxy/time.h>
-#include <haproxy/uri_auth.h>
-#include <haproxy/version.h>
+#include <common/appsession.h>
+#include <common/compat.h>
+#include <common/config.h>
+#include <common/memory.h>
+#include <common/mini-clist.h>
+#include <common/standard.h>
+#include <common/time.h>
+#include <common/uri_auth.h>
+#include <common/version.h>
#include <types/capture.h>
#include <types/client.h>
diff --git a/src/proxy.c b/src/proxy.c
index b1beb4b..19273db 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -16,9 +16,9 @@
#include <sys/socket.h>
#include <sys/stat.h>
-#include <haproxy/defaults.h>
-#include <haproxy/compat.h>
-#include <haproxy/time.h>
+#include <common/defaults.h>
+#include <common/compat.h>
+#include <common/time.h>
#include <types/global.h>
#include <types/polling.h>
diff --git a/src/queue.c b/src/queue.c
index 67c0d7c..a12f313 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -10,7 +10,7 @@
*
*/
-#include <haproxy/time.h>
+#include <common/time.h>
#include <types/proxy.h>
#include <types/session.h>
diff --git a/src/regex.c b/src/regex.c
index 4c37760..9db3d10 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -14,8 +14,8 @@
#include <stdlib.h>
#include <string.h>
-#include <haproxy/regex.h>
-#include <haproxy/standard.h>
+#include <common/regex.h>
+#include <common/standard.h>
#include <proto/log.h>
/* regex trash buffer used by various regex tests */
diff --git a/src/session.c b/src/session.c
index 0722d0f..e057b15 100644
--- a/src/session.c
+++ b/src/session.c
@@ -11,7 +11,7 @@
*/
#include <stdlib.h>
-#include <haproxy/memory.h>
+#include <common/memory.h>
#include <types/backend.h>
#include <types/capture.h>
diff --git a/src/standard.c b/src/standard.c
index e218055..7ddb88a 100644
--- a/src/standard.c
+++ b/src/standard.c
@@ -16,7 +16,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <haproxy/standard.h>
+#include <common/standard.h>
#include <proto/log.h>
/* enough to store 2^63=18446744073709551615 */
diff --git a/src/stream_sock.c b/src/stream_sock.c
index e305461..d8a99bf 100644
--- a/src/stream_sock.c
+++ b/src/stream_sock.c
@@ -19,8 +19,8 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <haproxy/compat.h>
-#include <haproxy/time.h>
+#include <common/compat.h>
+#include <common/time.h>
#include <types/backend.h>
#include <types/buffers.h>
diff --git a/src/task.c b/src/task.c
index 2c4adee..1f567b9 100644
--- a/src/task.c
+++ b/src/task.c
@@ -10,9 +10,9 @@
*
*/
-#include <haproxy/config.h>
-#include <haproxy/mini-clist.h>
-#include <haproxy/time.h>
+#include <common/config.h>
+#include <common/mini-clist.h>
+#include <common/time.h>
#include <proto/task.h>
diff --git a/src/time.c b/src/time.c
index d495ed1..e573b9d 100644
--- a/src/time.c
+++ b/src/time.c
@@ -11,7 +11,7 @@
*/
#include <sys/time.h>
-#include <haproxy/time.h>
+#include <common/time.h>
struct timeval now; /* the current date at any moment */
struct timeval start_date; /* the process's start date */
diff --git a/src/uri_auth.c b/src/uri_auth.c
index 498d735..661419a 100644
--- a/src/uri_auth.c
+++ b/src/uri_auth.c
@@ -13,8 +13,8 @@
#include <stdlib.h>
#include <string.h>
-#include <haproxy/base64.h>
-#include <haproxy/uri_auth.h>
+#include <common/base64.h>
+#include <common/uri_auth.h>
/*