0002-Avoid-deprecated-bind-placeholders-in-global-namespace.patch 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  1. From bbcf7fd0646d74b7f169b3aa4231d9150028ed0d Mon Sep 17 00:00:00 2001
  2. From: Rob Peters <info@domoticz.com>
  3. Date: Sun, 17 May 2020 11:46:37 +0200
  4. Subject: [PATCH] Avoid deprecated bind placeholders in global namespace
  5. [Retrieved (and slightly updated to backport it) from:
  6. https://github.com/domoticz/domoticz/commit/bbcf7fd0646d74b7f169b3aa4231d9150028ed0d]
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. ---
  9. hardware/ASyncSerial.cpp | 2 +-
  10. hardware/ASyncTCP.cpp | 4 +++-
  11. hardware/Comm5Serial.cpp | 2 ++
  12. hardware/CurrentCostMeterSerial.cpp | 4 +++-
  13. hardware/DavisLoggerSerial.cpp | 4 +++-
  14. hardware/DenkoviUSBDevices.cpp | 2 ++
  15. hardware/EnOceanESP2.cpp | 4 +++-
  16. hardware/EnOceanESP3.cpp | 4 +++-
  17. hardware/EvohomeRadio.cpp | 3 +++
  18. hardware/EvohomeSerial.cpp | 2 ++
  19. hardware/KMTronic433.cpp | 4 +++-
  20. hardware/KMTronicBase.cpp | 2 +-
  21. hardware/KMTronicSerial.cpp | 4 +++-
  22. hardware/MQTT.cpp | 2 ++
  23. hardware/Meteostick.cpp | 4 +++-
  24. hardware/MySensorsBase.cpp | 2 +-
  25. hardware/MySensorsSerial.cpp | 4 +++-
  26. hardware/OTGWBase.cpp | 2 +-
  27. hardware/OTGWSerial.cpp | 4 +++-
  28. hardware/OpenWebNetUSB.cpp | 3 ++-
  29. hardware/P1MeterSerial.cpp | 4 +++-
  30. hardware/Pinger.cpp | 2 ++
  31. hardware/RAVEn.cpp | 2 ++
  32. hardware/RFLinkSerial.cpp | 2 ++
  33. hardware/RFXComSerial.cpp | 4 +++-
  34. hardware/RFXComTCP.cpp | 2 --
  35. hardware/Rego6XXSerial.cpp | 4 +++-
  36. hardware/S0MeterBase.cpp | 2 +-
  37. hardware/S0MeterSerial.cpp | 4 +++-
  38. hardware/TCPProxy/tcpproxy_server.cpp | 2 ++
  39. hardware/TeleinfoSerial.cpp | 4 +++-
  40. hardware/USBtin.cpp | 4 +++-
  41. hardware/XiaomiGateway.cpp | 2 +-
  42. hardware/Yeelight.h | 1 -
  43. hardware/ZiBlueSerial.cpp | 2 ++
  44. hardware/plugins/PluginTransports.cpp | 2 ++
  45. main/WebServer.cpp | 4 +++-
  46. main/mainworker.cpp | 2 ++
  47. push/FibaroPush.cpp | 2 ++
  48. push/GooglePubSubPush.cpp | 2 ++
  49. push/HttpPush.cpp | 2 ++
  50. push/InfluxPush.cpp | 2 ++
  51. push/WebsocketPush.cpp | 2 ++
  52. tcpserver/TCPServer.cpp | 2 +-
  53. webserver/cWebem.cpp | 2 +-
  54. webserver/connection.cpp | 4 +++-
  55. webserver/connection_manager.cpp | 4 +++-
  56. webserver/proxyclient.cpp | 2 ++
  57. webserver/server.cpp | 4 +++-
  58. 49 files changed, 107 insertions(+), 32 deletions(-)
  59. diff --git a/hardware/ASyncSerial.cpp b/hardware/ASyncSerial.cpp
  60. index 2c9a5e27e9..36dd402fa7 100644
  61. --- a/hardware/ASyncSerial.cpp
  62. +++ b/hardware/ASyncSerial.cpp
  63. @@ -34,7 +34,7 @@
  64. #include <algorithm>
  65. #include <iostream>
  66. #include <boost/asio.hpp>
  67. -#include <boost/bind.hpp>
  68. +#include <boost/bind/bind.hpp>
  69. #include <boost/function.hpp>
  70. #include <boost/thread.hpp>
  71. #include <boost/smart_ptr/shared_array.hpp> // for shared_array
  72. diff --git a/hardware/ASyncTCP.cpp b/hardware/ASyncTCP.cpp
  73. index 8990c24300..7f7b1e0f24 100644
  74. --- a/hardware/ASyncTCP.cpp
  75. +++ b/hardware/ASyncTCP.cpp
  76. @@ -1,10 +1,12 @@
  77. #include "stdafx.h"
  78. #include "ASyncTCP.h"
  79. #include <boost/asio.hpp>
  80. -#include <boost/bind.hpp>
  81. +#include <boost/bind/bind.hpp>
  82. #include <boost/system/error_code.hpp> // for error_code
  83. #include "../main/Logger.h"
  84. +//using namespace boost::placeholders;
  85. +
  86. struct hostent;
  87. #ifndef WIN32
  88. diff --git a/hardware/Comm5Serial.cpp b/hardware/Comm5Serial.cpp
  89. index 9b44496fb5..f1c1f706d2 100644
  90. --- a/hardware/Comm5Serial.cpp
  91. +++ b/hardware/Comm5Serial.cpp
  92. @@ -5,6 +5,8 @@
  93. #include "../main/Logger.h"
  94. #include "../main/RFXtrx.h"
  95. +using namespace boost::placeholders;
  96. +
  97. /*
  98. This driver allows Domoticz to control any I/O module from the MA-4xxx Family
  99. diff --git a/hardware/CurrentCostMeterSerial.cpp b/hardware/CurrentCostMeterSerial.cpp
  100. index 05bac73d6a..bf9d35cab7 100644
  101. --- a/hardware/CurrentCostMeterSerial.cpp
  102. +++ b/hardware/CurrentCostMeterSerial.cpp
  103. @@ -10,10 +10,12 @@
  104. #include <string>
  105. #include <iostream>
  106. -#include <boost/bind.hpp>
  107. +#include <boost/bind/bind.hpp>
  108. #include <ctime>
  109. +using namespace boost::placeholders;
  110. +
  111. //
  112. //Class CurrentCostMeterSerial
  113. //
  114. diff --git a/hardware/DavisLoggerSerial.cpp b/hardware/DavisLoggerSerial.cpp
  115. index 9c44539beb..44c9dbde5c 100644
  116. --- a/hardware/DavisLoggerSerial.cpp
  117. +++ b/hardware/DavisLoggerSerial.cpp
  118. @@ -8,13 +8,15 @@
  119. #include <string>
  120. #include <algorithm>
  121. #include <iostream>
  122. -#include <boost/bind.hpp>
  123. +#include <boost/bind/bind.hpp>
  124. #include "../main/localtime_r.h"
  125. #include "../main/mainworker.h"
  126. #include <ctime>
  127. +using namespace boost::placeholders;
  128. +
  129. #ifdef _DEBUG
  130. //#define DEBUG_DAVIS
  131. #endif
  132. diff --git a/hardware/DenkoviUSBDevices.cpp b/hardware/DenkoviUSBDevices.cpp
  133. index a7977d82c8..53a27e5583 100644
  134. --- a/hardware/DenkoviUSBDevices.cpp
  135. +++ b/hardware/DenkoviUSBDevices.cpp
  136. @@ -5,6 +5,8 @@
  137. #include "../main/localtime_r.h"
  138. #include "../main/mainworker.h"
  139. +using namespace boost::placeholders;
  140. +
  141. #define MAX_POLL_INTERVAL 3600*1000
  142. #define DAE_IO_TYPE_RELAY 2
  143. diff --git a/hardware/EnOceanESP2.cpp b/hardware/EnOceanESP2.cpp
  144. index f20ff9c0cb..fd08c55f63 100644
  145. --- a/hardware/EnOceanESP2.cpp
  146. +++ b/hardware/EnOceanESP2.cpp
  147. @@ -8,7 +8,7 @@
  148. #include <string>
  149. #include <algorithm>
  150. #include <iostream>
  151. -#include <boost/bind.hpp>
  152. +#include <boost/bind/bind.hpp>
  153. #include "hardwaretypes.h"
  154. #include "../main/localtime_r.h"
  155. @@ -16,6 +16,8 @@
  156. #include <cmath>
  157. #include <ctime>
  158. +using namespace boost::placeholders;
  159. +
  160. #define ENOCEAN_RETRY_DELAY 30
  161. #define round(a) ( int ) ( a + .5 )
  162. diff --git a/hardware/EnOceanESP3.cpp b/hardware/EnOceanESP3.cpp
  163. index 6866eeb0d0..2afa0e1e36 100644
  164. --- a/hardware/EnOceanESP3.cpp
  165. +++ b/hardware/EnOceanESP3.cpp
  166. @@ -8,7 +8,7 @@
  167. #include <string>
  168. #include <algorithm>
  169. #include <iostream>
  170. -#include <boost/bind.hpp>
  171. +#include <boost/bind/bind.hpp>
  172. #include "hardwaretypes.h"
  173. #include "../main/localtime_r.h"
  174. @@ -16,6 +16,8 @@
  175. #include <cmath>
  176. #include <ctime>
  177. +using namespace boost::placeholders;
  178. +
  179. #if _DEBUG
  180. #define ENOCEAN_BUTTON_DEBUG
  181. #endif
  182. diff --git a/hardware/EvohomeRadio.cpp b/hardware/EvohomeRadio.cpp
  183. index 4da983538b..6ba97158cd 100644
  184. --- a/hardware/EvohomeRadio.cpp
  185. +++ b/hardware/EvohomeRadio.cpp
  186. @@ -23,6 +23,9 @@
  187. #include "../main/WebServer.h"
  188. #include "../webserver/cWebem.h"
  189. #include "../json/json.h"
  190. +#include <boost/bind/bind.hpp>
  191. +
  192. +using namespace boost::placeholders;
  193. extern std::string szUserDataFolder;
  194. diff --git a/hardware/EvohomeSerial.cpp b/hardware/EvohomeSerial.cpp
  195. index 4a54988291..c74cf576cc 100644
  196. --- a/hardware/EvohomeSerial.cpp
  197. +++ b/hardware/EvohomeSerial.cpp
  198. @@ -7,6 +7,8 @@
  199. #include "../main/localtime_r.h"
  200. #include <boost/exception/diagnostic_information.hpp>
  201. +using namespace boost::placeholders;
  202. +
  203. CEvohomeSerial::CEvohomeSerial(const int ID, const std::string &szSerialPort, const int baudrate, const std::string &UserContID) :
  204. CEvohomeRadio(ID, UserContID)
  205. {
  206. diff --git a/hardware/KMTronic433.cpp b/hardware/KMTronic433.cpp
  207. index da81b20f9f..f9832a5a74 100644
  208. --- a/hardware/KMTronic433.cpp
  209. +++ b/hardware/KMTronic433.cpp
  210. @@ -9,11 +9,13 @@
  211. #include <string>
  212. #include <algorithm>
  213. #include <iostream>
  214. -#include <boost/bind.hpp>
  215. +#include <boost/bind/bind.hpp>
  216. #include <boost/exception/diagnostic_information.hpp>
  217. #include <ctime>
  218. +using namespace boost::placeholders;
  219. +
  220. //#define DEBUG_KMTronic
  221. #define RETRY_DELAY 30
  222. diff --git a/hardware/KMTronicBase.cpp b/hardware/KMTronicBase.cpp
  223. index b343108966..d9c45872b5 100644
  224. --- a/hardware/KMTronicBase.cpp
  225. +++ b/hardware/KMTronicBase.cpp
  226. @@ -10,7 +10,7 @@
  227. #include <sstream>
  228. #include <algorithm>
  229. #include <iostream>
  230. -#include <boost/bind.hpp>
  231. +#include <boost/bind/bind.hpp>
  232. #include <ctime>
  233. diff --git a/hardware/KMTronicSerial.cpp b/hardware/KMTronicSerial.cpp
  234. index 4e07f2c37a..6240f941bd 100644
  235. --- a/hardware/KMTronicSerial.cpp
  236. +++ b/hardware/KMTronicSerial.cpp
  237. @@ -10,12 +10,14 @@
  238. #include <string>
  239. #include <algorithm>
  240. #include <iostream>
  241. -#include <boost/bind.hpp>
  242. +#include <boost/bind/bind.hpp>
  243. #include <boost/exception/diagnostic_information.hpp>
  244. #include <ctime>
  245. //#define DEBUG_KMTronic
  246. +using namespace boost::placeholders;
  247. +
  248. #define RETRY_DELAY 30
  249. KMTronicSerial::KMTronicSerial(const int ID, const std::string& devname)
  250. diff --git a/hardware/MQTT.cpp b/hardware/MQTT.cpp
  251. index 8de3671853..19750bb75b 100644
  252. --- a/hardware/MQTT.cpp
  253. +++ b/hardware/MQTT.cpp
  254. @@ -11,6 +11,8 @@
  255. #define __STDC_FORMAT_MACROS
  256. #include <inttypes.h>
  257. +using namespace boost::placeholders;
  258. +
  259. #define RETRY_DELAY 30
  260. #define CLIENTID "Domoticz"
  261. diff --git a/hardware/Meteostick.cpp b/hardware/Meteostick.cpp
  262. index 9793f4b57b..10da69d6e3 100644
  263. --- a/hardware/Meteostick.cpp
  264. +++ b/hardware/Meteostick.cpp
  265. @@ -9,12 +9,14 @@
  266. #include <string>
  267. #include <algorithm>
  268. #include <iostream>
  269. -#include <boost/bind.hpp>
  270. +#include <boost/bind/bind.hpp>
  271. #include "../main/localtime_r.h"
  272. #include "../main/mainworker.h"
  273. #include <ctime>
  274. +using namespace boost::placeholders;
  275. +
  276. #define RETRY_DELAY 30
  277. #define round(a) ( int ) ( a + .5 )
  278. diff --git a/hardware/MySensorsBase.cpp b/hardware/MySensorsBase.cpp
  279. index af976fba95..42bf58fad5 100644
  280. --- a/hardware/MySensorsBase.cpp
  281. +++ b/hardware/MySensorsBase.cpp
  282. @@ -13,7 +13,7 @@
  283. #include <sstream>
  284. #include <algorithm>
  285. #include <iostream>
  286. -#include <boost/bind.hpp>
  287. +#include <boost/bind/bind.hpp>
  288. #include "../webserver/cWebem.h"
  289. #include <json/json.h>
  290. diff --git a/hardware/MySensorsSerial.cpp b/hardware/MySensorsSerial.cpp
  291. index 44f8692d2b..42f3e05409 100644
  292. --- a/hardware/MySensorsSerial.cpp
  293. +++ b/hardware/MySensorsSerial.cpp
  294. @@ -8,12 +8,14 @@
  295. #include "hardwaretypes.h"
  296. #include <algorithm>
  297. -#include <boost/bind.hpp>
  298. +#include <boost/bind/bind.hpp>
  299. #include <boost/exception/diagnostic_information.hpp>
  300. #include <ctime>
  301. #include <iostream>
  302. #include <string>
  303. +using namespace boost::placeholders;
  304. +
  305. //#define DEBUG_MYSENSORS
  306. #define RETRY_DELAY 30
  307. diff --git a/hardware/OTGWBase.cpp b/hardware/OTGWBase.cpp
  308. index 322574458b..ded3a31c2c 100644
  309. --- a/hardware/OTGWBase.cpp
  310. +++ b/hardware/OTGWBase.cpp
  311. @@ -12,7 +12,7 @@
  312. #include <string>
  313. #include <algorithm>
  314. #include <iostream>
  315. -#include <boost/bind.hpp>
  316. +#include <boost/bind/bind.hpp>
  317. #include "../json/json.h"
  318. #include <ctime>
  319. diff --git a/hardware/OTGWSerial.cpp b/hardware/OTGWSerial.cpp
  320. index 4ade70e063..5a3416548f 100644
  321. --- a/hardware/OTGWSerial.cpp
  322. +++ b/hardware/OTGWSerial.cpp
  323. @@ -8,12 +8,14 @@
  324. #include "../main/localtime_r.h"
  325. #include <algorithm>
  326. -#include <boost/bind.hpp>
  327. +#include <boost/bind/bind.hpp>
  328. #include <boost/exception/diagnostic_information.hpp>
  329. #include <ctime>
  330. #include <iostream>
  331. #include <string>
  332. +using namespace boost::placeholders;
  333. +
  334. #define RETRY_DELAY 30
  335. #define OTGW_READ_INTERVAL 10
  336. diff --git a/hardware/OpenWebNetUSB.cpp b/hardware/OpenWebNetUSB.cpp
  337. index bf23049844..352a2220e9 100644
  338. --- a/hardware/OpenWebNetUSB.cpp
  339. +++ b/hardware/OpenWebNetUSB.cpp
  340. @@ -19,11 +19,12 @@ License: Public domain
  341. #include <algorithm>
  342. #include <ctime>
  343. -#include <boost/bind.hpp>
  344. +#include <boost/bind/bind.hpp>
  345. #include <boost/exception/diagnostic_information.hpp>
  346. #include <iostream>
  347. #include <string>
  348. +using namespace boost::placeholders;
  349. COpenWebNetUSB::COpenWebNetUSB(const int ID, const std::string& devname, unsigned int baud_rate)
  350. {
  351. diff --git a/hardware/P1MeterSerial.cpp b/hardware/P1MeterSerial.cpp
  352. index 566b451fa5..7dc3e0782e 100644
  353. --- a/hardware/P1MeterSerial.cpp
  354. +++ b/hardware/P1MeterSerial.cpp
  355. @@ -14,10 +14,12 @@
  356. #include <string>
  357. #include <algorithm>
  358. #include <iostream>
  359. -#include <boost/bind.hpp>
  360. +#include <boost/bind/bind.hpp>
  361. #include <ctime>
  362. +using namespace boost::placeholders;
  363. +
  364. #ifdef _DEBUG
  365. //#define DEBUG_P1_R
  366. #endif
  367. diff --git a/hardware/Pinger.cpp b/hardware/Pinger.cpp
  368. index d3e2fda942..b6dc78a786 100644
  369. --- a/hardware/Pinger.cpp
  370. +++ b/hardware/Pinger.cpp
  371. @@ -19,6 +19,8 @@
  372. #include <iostream>
  373. +using namespace boost::placeholders;
  374. +
  375. #if BOOST_VERSION >= 107000
  376. #define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
  377. #else
  378. diff --git a/hardware/RAVEn.cpp b/hardware/RAVEn.cpp
  379. index d9efc7480a..b6a4399d04 100644
  380. --- a/hardware/RAVEn.cpp
  381. +++ b/hardware/RAVEn.cpp
  382. @@ -8,6 +8,8 @@
  383. #include "../tinyxpath/tinyxml.h"
  384. #include "hardwaretypes.h"
  385. +using namespace boost::placeholders;
  386. +
  387. //Rainforest RAVEn USB ZigBee Smart Meter Adapter
  388. //https://rainforestautomation.com/rfa-z106-raven/
  389. diff --git a/hardware/RFLinkSerial.cpp b/hardware/RFLinkSerial.cpp
  390. index c5cae0f739..4ab07ed88e 100644
  391. --- a/hardware/RFLinkSerial.cpp
  392. +++ b/hardware/RFLinkSerial.cpp
  393. @@ -5,6 +5,8 @@
  394. #include "../main/localtime_r.h"
  395. #include <boost/exception/diagnostic_information.hpp>
  396. +using namespace boost::placeholders;
  397. +
  398. CRFLinkSerial::CRFLinkSerial(const int ID, const std::string& devname) :
  399. m_szSerialPort(devname)
  400. {
  401. diff --git a/hardware/RFXComSerial.cpp b/hardware/RFXComSerial.cpp
  402. index dc85f4832d..4c39520510 100644
  403. --- a/hardware/RFXComSerial.cpp
  404. +++ b/hardware/RFXComSerial.cpp
  405. @@ -12,7 +12,7 @@
  406. #include <string>
  407. #include <algorithm>
  408. #include <iostream>
  409. -#include <boost/bind.hpp>
  410. +#include <boost/bind/bind.hpp>
  411. #include <ctime>
  412. @@ -23,6 +23,8 @@
  413. #include <pwd.h>
  414. #endif
  415. +using namespace boost::placeholders;
  416. +
  417. #define RETRY_DELAY 30
  418. #define RFX_WRITE_DELAY 300
  419. diff --git a/hardware/RFXComTCP.cpp b/hardware/RFXComTCP.cpp
  420. index 7c6b3954b8..0e4856fbfb 100644
  421. --- a/hardware/RFXComTCP.cpp
  422. +++ b/hardware/RFXComTCP.cpp
  423. @@ -1,8 +1,6 @@
  424. #include "stdafx.h"
  425. #include "RFXComTCP.h"
  426. #include "../main/Logger.h"
  427. -//#include <boost/bind.hpp>
  428. -//#include <boost/asio.hpp>
  429. #include "../main/Helper.h"
  430. #include "../main/localtime_r.h"
  431. #include "../main/mainworker.h"
  432. diff --git a/hardware/Rego6XXSerial.cpp b/hardware/Rego6XXSerial.cpp
  433. index b94bd291bc..15d22f869a 100644
  434. --- a/hardware/Rego6XXSerial.cpp
  435. +++ b/hardware/Rego6XXSerial.cpp
  436. @@ -16,11 +16,13 @@
  437. #include <string>
  438. #include <algorithm>
  439. #include <iostream>
  440. -#include <boost/bind.hpp>
  441. +#include <boost/bind/bind.hpp>
  442. #include "hardwaretypes.h"
  443. #include <ctime>
  444. +using namespace boost::placeholders;
  445. +
  446. #define Rego6XX_RETRY_DELAY 30
  447. #define Rego6XX_COMMAND_DELAY 5
  448. #define Rego6XX_READ_BUFFER_MASK (Rego6XX_READ_BUFFER_SIZE - 1)
  449. diff --git a/hardware/S0MeterBase.cpp b/hardware/S0MeterBase.cpp
  450. index 9cffa67022..75a06e2cc1 100644
  451. --- a/hardware/S0MeterBase.cpp
  452. +++ b/hardware/S0MeterBase.cpp
  453. @@ -13,7 +13,7 @@
  454. #include <string>
  455. #include <algorithm>
  456. #include <iostream>
  457. -#include <boost/bind.hpp>
  458. +#include <boost/bind/bind.hpp>
  459. #include <ctime>
  460. diff --git a/hardware/S0MeterSerial.cpp b/hardware/S0MeterSerial.cpp
  461. index 1dc16b2b3e..f474d1c766 100644
  462. --- a/hardware/S0MeterSerial.cpp
  463. +++ b/hardware/S0MeterSerial.cpp
  464. @@ -8,11 +8,13 @@
  465. #include <algorithm>
  466. #include <ctime>
  467. -#include <boost/bind.hpp>
  468. +#include <boost/bind/bind.hpp>
  469. #include <boost/exception/diagnostic_information.hpp>
  470. #include <iostream>
  471. #include <string>
  472. +using namespace boost::placeholders;
  473. +
  474. #ifdef _DEBUG
  475. //#define DEBUG_S0
  476. #define TOT_DEBUG_LINES 6
  477. diff --git a/hardware/TCPProxy/tcpproxy_server.cpp b/hardware/TCPProxy/tcpproxy_server.cpp
  478. index 60445d9c28..82ba3559d9 100644
  479. --- a/hardware/TCPProxy/tcpproxy_server.cpp
  480. +++ b/hardware/TCPProxy/tcpproxy_server.cpp
  481. @@ -15,6 +15,8 @@
  482. #include "stdafx.h"
  483. #include "tcpproxy_server.h"
  484. +using namespace boost::placeholders;
  485. +
  486. #if BOOST_VERSION >= 107000
  487. #define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
  488. #else
  489. diff --git a/hardware/TeleinfoSerial.cpp b/hardware/TeleinfoSerial.cpp
  490. index 85f9a6240f..fa794802e9 100644
  491. --- a/hardware/TeleinfoSerial.cpp
  492. +++ b/hardware/TeleinfoSerial.cpp
  493. @@ -28,9 +28,11 @@ History :
  494. #include "../main/localtime_r.h"
  495. #include "../main/Logger.h"
  496. -#include <boost/bind.hpp>
  497. +#include <boost/bind/bind.hpp>
  498. #include <boost/exception/diagnostic_information.hpp>
  499. +using namespace boost::placeholders;
  500. +
  501. CTeleinfoSerial::CTeleinfoSerial(const int ID, const std::string& devname, const int datatimeout, unsigned int baud_rate, const bool disable_crc, const int ratelimit)
  502. {
  503. m_HwdID = ID;
  504. diff --git a/hardware/USBtin.cpp b/hardware/USBtin.cpp
  505. index c3e3656319..ce6f542df3 100644
  506. --- a/hardware/USBtin.cpp
  507. +++ b/hardware/USBtin.cpp
  508. @@ -27,7 +27,7 @@ History :
  509. #include "../main/SQLHelper.h"
  510. #include <algorithm>
  511. -#include <boost/bind.hpp>
  512. +#include <boost/bind/bind.hpp>
  513. #include <boost/exception/diagnostic_information.hpp>
  514. #include <cstdlib>
  515. #include <ctime>
  516. @@ -35,6 +35,8 @@ History :
  517. #include <string>
  518. #include <time.h>
  519. +using namespace boost::placeholders;
  520. +
  521. #define USBTIN_BAUD_RATE 115200
  522. #define USBTIN_PARITY boost::asio::serial_port_base::parity::none
  523. #define USBTIN_CARACTER_SIZE 8
  524. diff --git a/hardware/XiaomiGateway.cpp b/hardware/XiaomiGateway.cpp
  525. index f4567ec62f..e4998faa6a 100644
  526. --- a/hardware/XiaomiGateway.cpp
  527. +++ b/hardware/XiaomiGateway.cpp
  528. @@ -12,7 +12,7 @@
  529. #include "XiaomiHardware.h"
  530. #include <openssl/aes.h>
  531. #include <boost/asio.hpp>
  532. -#include <boost/bind.hpp>
  533. +#include <boost/bind/bind.hpp>
  534. #ifndef WIN32
  535. #include <ifaddrs.h>
  536. diff --git a/hardware/Yeelight.h b/hardware/Yeelight.h
  537. index b063f79743..64fd6f5479 100644
  538. --- a/hardware/Yeelight.h
  539. +++ b/hardware/Yeelight.h
  540. @@ -2,7 +2,6 @@
  541. #include "DomoticzHardware.h"
  542. #include <boost/asio.hpp>
  543. -#include <boost/bind.hpp>
  544. class Yeelight : public CDomoticzHardwareBase
  545. {
  546. diff --git a/hardware/ZiBlueSerial.cpp b/hardware/ZiBlueSerial.cpp
  547. index 9e9db2aff1..8e896897fc 100644
  548. --- a/hardware/ZiBlueSerial.cpp
  549. +++ b/hardware/ZiBlueSerial.cpp
  550. @@ -6,6 +6,8 @@
  551. #include <boost/exception/diagnostic_information.hpp>
  552. +using namespace boost::placeholders;
  553. +
  554. #define ZiBlue_RETRY_DELAY 30
  555. CZiBlueSerial::CZiBlueSerial(const int ID, const std::string& devname) :
  556. diff --git a/hardware/plugins/PluginTransports.cpp b/hardware/plugins/PluginTransports.cpp
  557. index c7e065529f..7fc1cb953e 100644
  558. --- a/hardware/plugins/PluginTransports.cpp
  559. +++ b/hardware/plugins/PluginTransports.cpp
  560. @@ -13,6 +13,8 @@
  561. #include "icmp_header.hpp"
  562. #include "ipv4_header.hpp"
  563. +using namespace boost::placeholders;
  564. +
  565. namespace Plugins {
  566. void CPluginTransport::handleRead(const boost::system::error_code& e, std::size_t bytes_transferred)
  567. diff --git a/main/WebServer.cpp b/main/WebServer.cpp
  568. index 0a19319669..ed92f06e32 100644
  569. --- a/main/WebServer.cpp
  570. +++ b/main/WebServer.cpp
  571. @@ -1,7 +1,7 @@
  572. #include "stdafx.h"
  573. #include "WebServer.h"
  574. #include "WebServerHelper.h"
  575. -#include <boost/bind.hpp>
  576. +#include <boost/bind/bind.hpp>
  577. #include <iostream>
  578. #include <fstream>
  579. #include "mainworker.h"
  580. @@ -65,6 +65,8 @@
  581. #define __STDC_FORMAT_MACROS
  582. #include <inttypes.h>
  583. +using namespace boost::placeholders;
  584. +
  585. #define round(a) ( int ) ( a + .5 )
  586. extern std::string szStartupFolder;
  587. diff --git a/main/mainworker.cpp b/main/mainworker.cpp
  588. index 505f59f49d..5fb2ee9042 100644
  589. --- a/main/mainworker.cpp
  590. +++ b/main/mainworker.cpp
  591. @@ -174,6 +174,8 @@
  592. #include <fstream>
  593. #endif
  594. +using namespace boost::placeholders;
  595. +
  596. #define round(a) ( int ) ( a + .5 )
  597. extern std::string szStartupFolder;
  598. diff --git a/push/FibaroPush.cpp b/push/FibaroPush.cpp
  599. index 0bc54e6cfd..350a8fa893 100644
  600. --- a/push/FibaroPush.cpp
  601. +++ b/push/FibaroPush.cpp
  602. @@ -14,6 +14,8 @@
  603. #define __STDC_FORMAT_MACROS
  604. #include <inttypes.h>
  605. +using namespace boost::placeholders;
  606. +
  607. CFibaroPush::CFibaroPush()
  608. {
  609. m_PushType = PushType::PUSHTYPE_FIBARO;
  610. diff --git a/push/GooglePubSubPush.cpp b/push/GooglePubSubPush.cpp
  611. index 6d0fc82d40..a5b720f219 100644
  612. --- a/push/GooglePubSubPush.cpp
  613. +++ b/push/GooglePubSubPush.cpp
  614. @@ -21,6 +21,8 @@ extern "C" {
  615. #include <boost/python.hpp>
  616. #endif
  617. +using namespace boost::placeholders;
  618. +
  619. extern std::string szUserDataFolder;
  620. // this should be filled in by the preprocessor
  621. diff --git a/push/HttpPush.cpp b/push/HttpPush.cpp
  622. index 8132ca2b43..3d1d51d52e 100644
  623. --- a/push/HttpPush.cpp
  624. +++ b/push/HttpPush.cpp
  625. @@ -15,6 +15,8 @@
  626. #define __STDC_FORMAT_MACROS
  627. #include <inttypes.h>
  628. +using namespace boost::placeholders;
  629. +
  630. CHttpPush::CHttpPush()
  631. {
  632. m_PushType = PushType::PUSHTYPE_HTTP;
  633. diff --git a/push/InfluxPush.cpp b/push/InfluxPush.cpp
  634. index 0a8e99414f..745fdf0496 100644
  635. --- a/push/InfluxPush.cpp
  636. +++ b/push/InfluxPush.cpp
  637. @@ -15,6 +15,8 @@
  638. #define __STDC_FORMAT_MACROS
  639. #include <inttypes.h>
  640. +using namespace boost::placeholders;
  641. +
  642. CInfluxPush::CInfluxPush() :
  643. m_InfluxPort(8086),
  644. m_bInfluxDebugActive(false)
  645. diff --git a/push/WebsocketPush.cpp b/push/WebsocketPush.cpp
  646. index 0fb71f96ec..3c2ce7ed54 100644
  647. --- a/push/WebsocketPush.cpp
  648. +++ b/push/WebsocketPush.cpp
  649. @@ -3,6 +3,8 @@
  650. #include "../webserver/WebsocketHandler.h"
  651. #include "../main/mainworker.h"
  652. +using namespace boost::placeholders;
  653. +
  654. extern boost::signals2::signal<void(const std::string &Subject, const std::string &Text, const std::string &ExtraData, const int Priority, const std::string & Sound, const bool bFromNotification)> sOnNotificationReceived;
  655. diff --git a/tcpserver/TCPServer.cpp b/tcpserver/TCPServer.cpp
  656. index d3b0a94847..3b8d0b9b76 100644
  657. --- a/tcpserver/TCPServer.cpp
  658. +++ b/tcpserver/TCPServer.cpp
  659. @@ -11,7 +11,7 @@
  660. #include "../main/localtime_r.h"
  661. #include <boost/asio.hpp>
  662. #include <algorithm>
  663. -#include <boost/bind.hpp>
  664. +#include <boost/bind/bind.hpp>
  665. namespace tcp {
  666. namespace server {
  667. diff --git a/webserver/cWebem.cpp b/webserver/cWebem.cpp
  668. index f015be097f..63c96f789f 100644
  669. --- a/webserver/cWebem.cpp
  670. +++ b/webserver/cWebem.cpp
  671. @@ -5,7 +5,7 @@
  672. //Modified, extended etc by Robbert E. Peters/RTSS B.V.
  673. #include "stdafx.h"
  674. #include "cWebem.h"
  675. -#include <boost/bind.hpp>
  676. +#include <boost/bind/bind.hpp>
  677. #include "reply.hpp"
  678. #include "request.hpp"
  679. #include "mime_types.hpp"
  680. diff --git a/webserver/connection.cpp b/webserver/connection.cpp
  681. index d3485fe923..afe700e5d7 100644
  682. --- a/webserver/connection.cpp
  683. +++ b/webserver/connection.cpp
  684. @@ -9,7 +9,7 @@
  685. //
  686. #include "stdafx.h"
  687. #include "connection.hpp"
  688. -#include <boost/bind.hpp>
  689. +#include <boost/bind/bind.hpp>
  690. #include <boost/algorithm/string.hpp>
  691. #include "connection_manager.hpp"
  692. #include "request_handler.hpp"
  693. @@ -17,6 +17,8 @@
  694. #include "../main/localtime_r.h"
  695. #include "../main/Logger.h"
  696. +using namespace boost::placeholders;
  697. +
  698. namespace http {
  699. namespace server {
  700. extern std::string convert_to_http_date(time_t time);
  701. diff --git a/webserver/connection_manager.cpp b/webserver/connection_manager.cpp
  702. index b6c20de53f..bf1d9882d0 100644
  703. --- a/webserver/connection_manager.cpp
  704. +++ b/webserver/connection_manager.cpp
  705. @@ -10,10 +10,12 @@
  706. #include "stdafx.h"
  707. #include "connection_manager.hpp"
  708. #include <algorithm>
  709. -#include <boost/bind.hpp>
  710. +#include <boost/bind/bind.hpp>
  711. #include <iostream>
  712. #include "../main/Logger.h"
  713. +using namespace boost::placeholders;
  714. +
  715. namespace http {
  716. namespace server {
  717. diff --git a/webserver/proxyclient.cpp b/webserver/proxyclient.cpp
  718. index c2bcd3178f..423ee0fb4b 100644
  719. --- a/webserver/proxyclient.cpp
  720. +++ b/webserver/proxyclient.cpp
  721. @@ -8,6 +8,8 @@
  722. #include "../tcpserver/TCPServer.h"
  723. #include "sha1.hpp"
  724. +using namespace boost::placeholders;
  725. +
  726. // RK: some defines to make mydomoticz also work when openssl not compiled in
  727. #ifdef WWW_ENABLE_SSL
  728. #define PROXY_PORT 443
  729. diff --git a/webserver/server.cpp b/webserver/server.cpp
  730. index 1eb2137ef2..6025b1cdb5 100644
  731. --- a/webserver/server.cpp
  732. +++ b/webserver/server.cpp
  733. @@ -3,7 +3,7 @@
  734. // ~~~~~~~~~~
  735. //
  736. #include "stdafx.h"
  737. -#include <boost/bind.hpp>
  738. +#include <boost/bind/bind.hpp>
  739. #include "server.hpp"
  740. #include <fstream>
  741. #include "../main/Logger.h"
  742. @@ -11,6 +11,8 @@
  743. #include "../main/localtime_r.h"
  744. #include "../main/mainworker.h"
  745. +using namespace boost::placeholders;
  746. +
  747. extern bool g_bIsWSL;
  748. namespace http {