2018-05-02 08:39:36 +00:00
|
|
|
#ifndef CONFIG_H
|
2014-05-07 22:27:00 +00:00
|
|
|
/* ============================================================
|
|
|
|
* Control compile time options.
|
|
|
|
* ============================================================
|
|
|
|
*
|
|
|
|
* Compile time options have moved to config.mk.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/* ============================================================
|
|
|
|
* Compatibility defines
|
|
|
|
* ============================================================ */
|
2016-03-17 21:24:50 +00:00
|
|
|
#if defined(_MSC_VER) && _MSC_VER < 1900
|
|
|
|
# define snprintf sprintf_s
|
2017-02-20 21:20:00 +00:00
|
|
|
# define EPROTO ECONNABORTED
|
2016-03-17 21:24:50 +00:00
|
|
|
#endif
|
|
|
|
|
2014-05-07 22:27:00 +00:00
|
|
|
#ifdef WIN32
|
2014-10-26 21:17:08 +00:00
|
|
|
# ifndef strcasecmp
|
|
|
|
# define strcasecmp strcmpi
|
|
|
|
# endif
|
2018-08-16 10:16:16 +00:00
|
|
|
# define strtok_r strtok_s
|
|
|
|
# define strerror_r(e, b, l) strerror_s(b, l, e)
|
|
|
|
typedef SSIZE_T ssize_t;
|
2014-05-07 22:27:00 +00:00
|
|
|
#endif
|
2014-09-17 21:58:46 +00:00
|
|
|
|
|
|
|
|
2015-04-19 21:10:59 +00:00
|
|
|
#define uthash_malloc(sz) mosquitto__malloc(sz)
|
|
|
|
#define uthash_free(ptr,sz) mosquitto__free(ptr)
|
2014-09-17 21:58:46 +00:00
|
|
|
|
2018-05-02 10:50:47 +00:00
|
|
|
#ifdef __APPLE__
|
|
|
|
# define __DARWIN_C_SOURCE
|
2018-08-15 16:02:56 +00:00
|
|
|
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__SYMBIAN32__) || defined(__QNX__)
|
|
|
|
# define _XOPEN_SOURCE 700
|
|
|
|
# define __BSD_VISIBLE 1
|
|
|
|
# define HAVE_NETINET_IN_H
|
2018-05-02 10:50:47 +00:00
|
|
|
#else
|
2018-08-15 16:27:02 +00:00
|
|
|
# define _XOPEN_SOURCE 700
|
2018-05-02 10:50:47 +00:00
|
|
|
# define _DEFAULT_SOURCE 1
|
|
|
|
# define _POSIX_C_SOURCE 200809L
|
|
|
|
#endif
|
2018-05-02 08:39:36 +00:00
|
|
|
|
|
|
|
#endif
|