this makes it possible to explicitly share compile options, without
using the `add_definition` function. This function declares options for
the current directory and below (in our case also for `deps`).
Adding -Wall, -Wconversion and -Wextra to at least make compiler
warnings visible for the cmake build.
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
This patch adds support for two new format specifiers (%f and %d)
to print float and double data.
Generally it's not save to directly take native binary data of one machine and
print it on another one (since mosquitto is multiarch). But in case of floats
it's save to print representation of it, if __STDC_IEC_559__ is defined.
In C99 Annex F, standard we can read:
> This annex specifies C language support for the
> IEC 60559 floating-point standard.
> (...)
> An implementation that defines __STDC_IEC_559__
> shall conform to the specifications in this annex
All float printing code is behind __STDC_IEC_559__, so if that is not
defined, floating print will be disabled and error returned to user.
Documentation also describes restrictions about printing floats.
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
This older Microsoft compiler does not support mixing declarations and
code and misses some error defines. This commit enables building with
VS2008 by moving up some variable declarations and defining error
codes to their WinSock counterparts in case they're not defined.
Signed-off-by: Christian Beier <info@christianbeier.net>
This disables all TLS options for that instance. This is useful for
negating TLS options provided in a config file, or to disable the
automatic use of TLS when using port 8883.
Closes#2180. Thanks to Elliott Balsley.
If sending mosquitto_sub output to a pipe, mosquitto_sub will now detect
that the pipe has closed and disconnect.
Closes#2164. Thanks to Frantisek Fuka.