mosquitto/config.h

43 lines
1.1 KiB
C
Raw Normal View History

#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
* ============================================================ */
#if defined(_MSC_VER) && _MSC_VER < 1900
# define snprintf sprintf_s
2017-02-20 21:20:00 +00:00
# define EPROTO ECONNABORTED
#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)
2014-05-07 22:27:00 +00:00
#endif
#define uthash_malloc(sz) mosquitto__malloc(sz)
#define uthash_free(ptr,sz) mosquitto__free(ptr)
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
#endif