commit 76311f9249f7313a5068c2cf73521a874fb2e654 parent 7f534d0df766b946a118c479a65d112fc69189d7 Author: Evgeny Grin (Karlson2k) <k2k@narod.ru> Date: Mon, 22 Dec 2014 19:41:33 +0000 tsearch.c/.h: support compiling by MSVC Diffstat:
| M | src/microhttpd/tsearch.c | | | 4 | +++- |
| M | src/microhttpd/tsearch.h | | | 11 | +++++++++++ |
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/tsearch.c b/src/microhttpd/tsearch.c @@ -11,9 +11,11 @@ * Totally public domain. */ +#ifndef _MSC_FULL_VER #include <sys/cdefs.h> +#endif //! _MSC_FULL_VER #define _SEARCH_PRIVATE -#include <tsearch.h> +#include "tsearch.h" #include <stdlib.h> /* find or insert datum into search tree */ diff --git a/src/microhttpd/tsearch.h b/src/microhttpd/tsearch.h @@ -9,7 +9,18 @@ #ifndef _SEARCH_H_ #define _SEARCH_H_ +#ifndef _MSC_FULL_VER #include <sys/cdefs.h> +#endif /* _MSC_FULL_VER */ +#if !defined(__BEGIN_DECLS) || !defined(__END_DECLS) +#if defined(__cplusplus) +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS }; +#else /* !__cplusplus */ +#define __BEGIN_DECLS +#define __END_DECLS +#endif /* !__cplusplus */ +#endif /* !__BEGIN_DECLS || !__END_DECLS */ #include <sys/types.h> typedef enum {