Commit Graph

1648 Commits

Author SHA1 Message Date
Alexander B
6a5387ec21
add visitor pattern implementation for Poco::Dynamic::Var (#4144)
* add visitor pattern implementation for Poco::Dynamic::Var

* add changes to Makefile and vcxproj for VarVisitor

* resolve review comments Poco::Dynamic::Var

---------

Co-authored-by: Alexander B <bas524@ya.ru>
2023-11-11 19:18:12 +01:00
Aleksandar Fabijanic
10ad89594a
Win build fix (#4260)
* fix(SQLParser): use Data_API if available

* fix(ProGen): wrong AdditionalOptions separator #4259

* fix(SQLParser): add default export define when embedded
2023-11-11 11:08:18 +01:00
Aleksandar Fabijanic
bda0cd1a07
Merge branch 'devel' into 4230-data-fixes-improvements 2023-11-10 12:18:25 +01:00
Aleksandar Fabijanic
78234857bf feat(ProGen): default to c++17 2023-11-05 23:40:47 +01:00
Aleksandar Fabijanic
324424b7a7 fix(build): align Foundation and CppUnit #4207 2023-11-05 22:19:25 +01:00
Alex Fabijanic
81d7307fa7 fix(Data):
adjust make and CMake for SQLParser and DataTest lib
separate samples from tests in CMake
remove unused StatementImpl from Data testsuite
2023-11-04 23:11:38 +01:00
Nino Belušić
90dd3821ed
CI improvements (#4236)
* feat(ci): run pull request runs only on pull request open #4205

* feat(ci): add retry action for tsan #4205

* feat(ci): use local action for retrying tsan #4205

* fix(ci): use correct version of retry action #4205

* fix: make POSIX event thread safe

* feat(ci): add info on retry action to ci.yml header #4205

* feat(ci): add linux mysql test #4205

* feat(ci): remove unused mysql containers from tests#4205

* feat(ci): add linux postgre test #4205

* feat(ci): add linux redis test #4205

* feat(ci): add linux mongodb tests #4205

* feat(ci): add mysql odbc test #4205

* chore(ci): rename tests #4205

* chore(ci): pin postgres and mysql versions #4205

* feat(ci): add odbc postgres tests #4205

* chore(ci): mysql odbc comment #4205

* chore(ci): disable windows 2019 job #4205

* feat(ci): add linux oracle tests #4205

* chore(ci): disable oracle tests #4205

* feat(ci): add sql server tests #4205

* chore(ci): disable postgres tests #4205

* chore(ci): add logging for task test #4205

* feat(ci): add local retry action #4205

* feat(ci): ignore process kill failure in action #4205

* feat(ci): send SIGKILL instead of SIGTERM in action #4205

* chore(ci): add updated action #4205

* chore(ci): reduce tsan timeout #4205

* feat(ci): kill process without children #4205

* feat(ci): send SIGTERM to child in action #4205

* feat(ci): prolong tsan timeout #4205

* chore(ci): add missing newlines #4205

* fix(ci): revert sql server test FreeTDS version #4205

* feat(ci): add retry to all jobs #4205

* feat(ci): setup python for codeQL #4205

* chore(ci): disable throwing on codeql error #4205
2023-11-03 14:34:31 +01:00
Alex Fabijanic
8b620e7476 enh(poco): std::string literals #4216 2023-11-02 22:12:23 +01:00
Günter Obiltschnig
743da564eb #4241: Poco::FileInputStream broken in 1.12.5 and 1.11.8. 2023-11-02 12:10:21 +01:00
Alex Fabijanic
757fc32199 fix(build): add missing include path 2023-11-01 16:29:49 +01:00
Alex Fabijanic
6dad8502d3 fix(Data):
* make bool Session::isTransaction() return Poco::Optional
* move parsing to Statement
* SQLParser make build
* other fixes and improvemets #4230
2023-11-01 00:25:46 +01:00
Aleksandar Fabijanic
8c4b166737 fix(LinearHashTable): fix std::iterator deprecated warnings; test warnings #4235 2023-10-29 14:44:15 +01:00
cunj123
0d696eaf57 fix: make POSIX event thread safe 2023-10-24 21:00:58 +02:00
Alex Fabijanic
5e01472359 upgrade: double-conversion to 3.3.0 #4218 2023-10-24 21:00:20 +02:00
Alex Fabijanic
cd12420495 fix(Foundation): use after free warnings #4189 2023-10-23 23:47:56 +02:00
Alex Fabijanic
c163237221 fix(Thread): Fix pthread_setname not declared #4210 2023-10-23 18:02:35 +02:00
Aleksandar Fabijanic
e40f07099d
fix(Net): Add Unix socket support on windows #4208 (#4209)
* fix(Net): Add Unix socket support on windows #4208

* feat(Net): add abstract local socket support #4208

* fix(PollSet): use localhost socket in PollSet on windows when available #4208

* fix(PollSetTest): comment checking unconnected sockets status (Linux epoll signals them as readable/writable)
2023-10-23 13:33:46 +02:00
Pavle Dragisic
c918c70e68
Fix pthread_setname not declared (#4210)
* Fix pthread_setname not declared #4063

* Fix include prctl.h for specific OS #4063

* Fix getThreadName for specific OS #4063

---------

Co-authored-by: root <root@debian-gnu-linux-11.localdomain>
Co-authored-by: Pavle <pavle@debian-gnu-linux-11.localdomain>
2023-10-23 08:17:51 +02:00
Aleksandar Fabijanic
c0f7257ccd chore: eliminate some compile warnings 2023-10-21 19:15:57 +02:00
Günter Obiltschnig
8a268d4413 #4195: Poco::File::created() on macOS should use birthtime 2023-10-18 08:01:07 +02:00
Alex Fabijanic
69fd22c4e0 fix a couple of g++ warnings 2023-10-16 22:05:33 +02:00
Alex Fabijanic
cdd783a9f0 fix(FileChannel): setRotation overflow #3786 2023-10-16 17:59:09 +02:00
Alex Fabijanic
5fd6a45ea7 fix(MD*Engine) g++ array-bounds warning 2023-10-16 12:12:10 +02:00
Aleksandar Fabijanic
5e1904b5f8 fix: Sync 1.11.-1.12-devel(1.13) #4187 2023-10-16 00:16:06 +02:00
Aleksandar Fabijanic
5103d46e9e chore(build): add missing distclean 2023-10-15 17:56:48 +02:00
Günter Obiltschnig
06a03d1ada Poco::TemporaryFile: fix possible naming collisions due to random zero increment 2023-10-14 11:35:43 +02:00
Günter Obiltschnig
ed43543113 #4184: Poco::TemporaryFile: make filenames less predictable 2023-10-13 14:31:01 +02:00
Günter Obiltschnig
cb58e09304 #4177: Upgrade bundled pcre2 to 10.42 2023-10-07 09:22:47 +02:00
Günter Obiltschnig
70bb8f13f9 CppUnit: demangle class names 2023-10-02 07:16:48 +02:00
Günter Obiltschnig
a66a298bf6 fix test on Windows 2023-09-30 21:13:26 +02:00
Günter Obiltschnig
d5966acdb5 fix FileStream test 2023-09-30 18:07:54 +02:00
Günter Obiltschnig
4244c3251f #4170: Poco::FileStream is always opened with std::ios::in | std::ios::out 2023-09-30 12:26:11 +02:00
Günter Obiltschnig
1db6fb9a2e bump version 2023-09-30 12:23:31 +02:00
Günter Obiltschnig
2fb5e60e79 #4169: Upgrade bundled zlib to 1.3 2023-09-30 12:20:35 +02:00
Philip Ye
43bcc553fe
Fix typo in document of TaskManager::start() (#4155) 2023-09-21 13:30:52 +02:00
Romain Geissler
5fb67c452a
Fix typos in #4086 and #4087. 2023-07-18 07:30:29 +00:00
Günter Obiltschnig
346ec77dbd
Merge pull request #4087 from Romain-Geissler-1A/remove-different-signedness-comparison-warning
Silence gcc -Wsign-compare warning when instantiating Poco::Dynamic::VarHolder::convertSignedToUnsigned.
2023-07-18 09:21:15 +02:00
Romain Geissler
615e7773b8
Silence gcc -Wsign-compare warning when instantiating Poco::Dynamic::VarHolder::convertSignedToUnsigned.
/data/mwrep/res/osp/Poco/Foundation/23-0-0-0/include/Poco/Dynamic/VarHolder.h: In instantiation of 'void Poco::Dynamic::VarHolder::checkUpperLimit(const F&) const [with F = signed char; T = unsigned int; typename std::enable_if<std::is_integral<_Tp>::value, bool>::type <anonymous> = true]':
/data/mwrep/res/osp/Poco/Foundation/23-0-0-0/include/Poco/Dynamic/VarHolder.h:361:23:   required from 'void Poco::Dynamic::VarHolder::convertSignedToUnsigned(const F&, T&) const [with F = signed char; T = unsigned int]'
/data/mwrep/res/osp/Poco/Foundation/23-0-0-0/include/Poco/Dynamic/VarHolder.h:799:26:   required from here
/data/mwrep/res/osp/Poco/Foundation/23-0-0-0/include/Poco/Dynamic/VarHolder.h:405:26: error: comparison of integer expressions of different signedness: 'const signed char' and 'unsigned int' [-Werror=sign-compare]
  405 |                 if (from > std::numeric_limits<T>::max())
      |                     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-07-18 07:16:24 +00:00
Romain Geissler
d28129cbc4
Remove std::aligned_storage as it is deprecated in C++23.
Instead, replace it with std::max_align_t in the Any implementation, as
really we would like to be able to store any object with any alignment
in the small object optimization case. Typically the size and alignment
of std::max_align_t is 8 or 16 on most platforms. Added a static assert
to ensure that this change doesn't result in wasting more unused memory
in case the size of the storage buffer is smaller than this maximum
alignment (which is right now 64, so shall be ok on all platforms).
2023-07-18 07:05:32 +00:00
Alexander B
bce5f961dd
optimize checkUpperLimit and checkLowerLimit in VarHolder.h avoid (#4072)
compile-time warnings when argument type is float and condition always
true

Co-authored-by: Alexander B <bas524@ya.ru>
2023-07-11 08:08:35 -05:00
Sergey Detsina
ed2613dfc5 Fixed Poco::format specifier for error code 2023-05-21 10:40:20 +03:00
Alexander B
75b378e540
fix #4005 Poco::Path::getExtension() returns name of the hidden file if no extension is present (#4011) 2023-05-05 11:49:56 -05:00
Alexander B
c7ac8574f8
Complimentary to #3918 (std::*mutex wrapper) (#3954)
* Complimentary to #3918
I think that we can use Poco::Mutex and Poco::FastMutex as wrappers for std::recursive_mutex and std::mutex instead of replacing

For using std::*mutexes switch on cmake-option POCO_ENABLE_STD_MUTEX

* add define POCO_ENABLE_STD_MUTEX to the Config.h
remove empty if-else from CMakeLists.txt
2023-05-05 09:49:06 -05:00
Vojin Ilic
b8d1792fa0 Fix hang in destructor
Consider following situation. A class owns a timer. In destructor of that class we call .cancel() asynchronous on timer before it's destruction.
Now timer is executing cancel in it's own internal thread, while it's doing that destructor of timer is called from owner's destructor. Timer destructor enqueues stop notification. If that enqueue is happening just after while loop from cancel notification, stop notification is gonna be dropped and timer will never stop.
Fix: Add new method in TimedNotificationQueue which will return a notification regardless of the time it needs to be executed.
Get number of pending tasks in the queue. Flush out that many notifications from queue while taking special consideration of pending Stop and Cancel notifications.
Add test for new method in TimedNotificationQueue and fix cancel all tests to actually check if notification got executed.
fixes #3986
2023-04-04 12:08:49 +02:00
David Hedbor
4cc956483d
Fix thread compilation issues on FreeBSD (#3989)
- Use pthread_set_name_np on FreeBSD 12.
- Implement currentOsTidImpl() using thr_self() on FreeBSD.
2023-03-30 04:49:04 -05:00
Aleksandar Fabijanic
bcae06f423
3808 icmp statistics (#3982)
* fix(ICMPClinet): ICMPEventArgs Statistics bugs #3808

* fix(SpinlockMutex): 100 % CPU usage on single-core system #3852
2023-03-22 09:11:13 -05:00
Matej Kenda
3838070146
Resolves #3484: support for OP_MSG in Poco::MongoDB (#3902)
* Binary writer/reader: add writeCString and readCString.

* MongoDB::Database: add queryBuildInfo and queryServerHello; add WireVersion enum.

* MongoDB: Introduce OpMsgMessage (request and reply) and related changes in Connection, Database, MessageHeader.

* MongoDB: First unit test changes for OpMsgMessage.

* MongoDB::Document: new functions addNewArray and remove.

* MongoDB: OP_MSG unacknowledged write and many improvements

* MongoDB: new cursor using OP_MSG

* MongoDB: bunch of new tests for OP_MSG wire protocol.

* BinaryWriter::WriteCString: use write instead of operator <<.

* MongoDB::OpMsgCursor: Slightly modified prototype code for using moreToCome flag.

* MongoDB: Add OpMsg* files to Makefiles.

* MongoDB: Add OpMsg* files to VS project files.

* Compile fixes.

* MongoDB::Database: Add factory function for database commands createOpMsgMessage() and cursors createOpMsgCursor()
2023-03-20 01:50:15 -05:00
Alexander B
7ab7a5291d
Improve implementation of logging macros. #2331 (#3862)
* Improve implementation of logging macros. #2331

The GNU compiler emits a warning if nested "if" statements are followed by
an "else" statement and braces are not used to explicitly disambiguate the
"else" binding.  This leads to problems with code like:

   if (gate)
     ASSERT_*(condition) << "Some message";

The "switch (0) case 0:" idiom is used to suppress this.

* I was wrong.
do-while better then switch-case approach for "ambiguous else blocker"
https://godbolt.org/z/W5nnYrzx6

* try to fix tabs

* again fix tabs

* again fix tabs

* again fix tabs
2023-03-18 05:21:32 -05:00
Alexander B
3852a6b6c2
Solaris.build fix #3843 and #3643 (#3939)
* try fix compilation for solaris

* this commit for issue #3843 and #3643
changes in Types.h allow ignore problem with declaration of std::int8_t. int8_t can be defined as char or signed char. IMHO we need strong types for Poco::Int's

Envelop.cpp contains initializer for EVP_CIPHER_CTX_init, because this function prototype depends on openssl version.

Application.cpp contains includes especial for SOLARIS, for ioctl support

ClassLoaderTest.cpp and SharedLibraryTest.cpp contains changes because loadlibrary(dlopen) doesn't load library from current directory by default

LocalDateTimeTest.cpp contains changes because SOLARIS use std::tm without tm_gmtoff

* fix : define of SOLARIOS OS in LocalDateTimeTest

* remove unnecessary wrapper

* fix output dir for windows build with multi-config build

* try to fix bug with unixodbc version in linux-builds
[read here](https://github.com/microsoft/linux-package-repositories/issues/36)

* try to fix bug with unixodbc version in linux-builds
[read here](https://github.com/microsoft/linux-package-repositories/issues/36)

* fix : warning in main cmake for if-condition for multi-config build
fix : error for linux-gcc-make-cxx20, use --allow-downgrades for unixodbc

* fix : warning for cmake windows builds
revert changes for linux-gcc-make-cxx20

* revert ci.yml, remove unixodbc version

* try re-run build

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2023-03-18 01:28:47 -05:00
Andrew Auclair
66e93f98cc
Custom rotate, archive and purge strategies for FileChannel (#3810)
* Adding the ability to set custom rotate, archive and purge strategies.

* Force CI
2023-03-18 01:28:25 -05:00