mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Merge pull request #58166 from azat/poco-safe-ios
[RFC] Adjust all std::ios implementations in poco to set failbit/badbit by default
This commit is contained in:
commit
b061535b4a
@ -69,6 +69,9 @@
|
||||
// init() is called in the MyIOS constructor.
|
||||
// Therefore we replace each call to init() with
|
||||
// the poco_ios_init macro defined below.
|
||||
//
|
||||
// Also this macro will adjust exceptions() flags, since by default std::ios
|
||||
// will hide exceptions, while in ClickHouse it is better to pass them through.
|
||||
|
||||
|
||||
#if !defined(POCO_IOS_INIT_HACK)
|
||||
@ -79,7 +82,10 @@
|
||||
#if defined(POCO_IOS_INIT_HACK)
|
||||
# define poco_ios_init(buf)
|
||||
#else
|
||||
# define poco_ios_init(buf) init(buf)
|
||||
# define poco_ios_init(buf) do { \
|
||||
init(buf); \
|
||||
this->exceptions(std::ios::failbit | std::ios::badbit); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user