diff -ru a/mosquitto.h b/mosquitto.h --- a/mosquitto.h 2018-12-10 21:33:36.527448557 +1300 +++ b/mosquitto.h 2018-12-10 21:33:07.715295078 +1300 @@ -17,32 +17,9 @@ #ifndef MOSQUITTO_H #define MOSQUITTO_H -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(WIN32) && !defined(WITH_BROKER) && !defined(LIBMOSQUITTO_STATIC) -# ifdef libmosquitto_EXPORTS -# define libmosq_EXPORT __declspec(dllexport) -# else -# define libmosq_EXPORT __declspec(dllimport) -# endif -#else -# define libmosq_EXPORT -#endif - -#if defined(_MSC_VER) && _MSC_VER < 1900 -# ifndef __cplusplus -# define bool char -# define true 1 -# define false 0 -# endif -#else -# ifndef __cplusplus -# include -# endif -#endif +#define libmosq_EXPORT +#include #include #define LIBMOSQUITTO_MAJOR 1 @@ -86,14 +63,14 @@ MOSQ_ERR_PLUGIN_DEFER = 17, MOSQ_ERR_MALFORMED_UTF8 = 18, MOSQ_ERR_KEEPALIVE = 19, - MOSQ_ERR_LOOKUP = 20, + MOSQ_ERR_LOOKUP = 20 }; /* Error values */ enum mosq_opt_t { MOSQ_OPT_PROTOCOL_VERSION = 1, MOSQ_OPT_SSL_CTX = 2, - MOSQ_OPT_SSL_CTX_WITH_DEFAULTS = 3, + MOSQ_OPT_SSL_CTX_WITH_DEFAULTS = 3 }; /* MQTT specification restricts client ids to a maximum of 23 characters */ @@ -1765,8 +1742,4 @@ */ libmosq_EXPORT void *mosquitto_userdata(struct mosquitto *mosq); -#ifdef __cplusplus -} -#endif - #endif