Commit Graph

1765 Commits

Author SHA1 Message Date
Matej Kenda
54f0feb282 fix(ci): Partially revert "add sendfile method for streamsocket (#4007)"
This reverts commit 24b7122f43.
2023-12-12 22:13:00 +01:00
Matej Kenda
4f1cf68307
Stricter DateTimeParser for known formats (fixes #569) (#4330)
* GH #569: Cherry pick and correct code from devel-experimental.

* GH #569: Add missing timezone codes.

* enh(Foundation): DateTimeParser: stricter checks of timezones, more tests for invalid inputs. (#569)

* enh(Foundation): Small fixes of issues detected by CodeQL

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2023-12-11 14:48:33 +01:00
Alexander B
24b7122f43
add sendfile method for streamsocket (#4007)
* add sendfile method for streamsocket

* add mswsock.lib to the project files and templates

* remove /DPOCO_NO_AUTOMATIC_LIBS for cmake windows build

* merge from upstream

* merge from upstream

* fix code stile
add NotImplemented exception for unsupported platforms
exculude <sys/sendfile.h> for POCO_EMSCRIPTEN, because https://
github.com/emscripten-core/emscripten/pull/16234

* add iostream include for std::cout

* fix compilation for emscripten (wrap sendfile)
2023-12-11 10:47:03 +01:00
Matej Kenda
689a81c4c4 enh(File): Throw FileNotReadyException in File::exists() (Win32) (#2403) 2023-12-11 09:07:45 +01:00
Aleksandar Fabijanic
1e90f64bbf
4307/8/9/10 data races (#4312)
* fix(NumericString): properly mark uIntToString deprecated #4304

* dev(runLibtests): allow to specify test to run

* fix(NotificationCenter): data race #4307

* fix(DirectoryWatcher): data race #4308

* fix(ArchiveStrategy): data race #4309

* fix(ActiveThread): data race #4310

* fix(Task): Cancelled Task shouldn't start running #4311 (WIP)

* fix(String): ignore clang loop unrolling warnings

* fix(TaskManager): task ownership #4311

* chore(FIFOEventTest): fix unused var warning; disable benchmark in test

* fix(Task): remove unnecessary mutex (and prevent cyclic locking reported by TSAN)

* fix(CryptoTest): disable testEncryptDecryptGCM

* fix(ci): typo

* fix(NotificationCenter): disable and clear observers in dtor (#4307)

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2023-12-09 21:16:24 +01:00
Matej Kenda
35e1490b26
fix(platform): Fixes to compile with emscripten 3.1.5 (fixes #2707) (#4318)
* fix(platform): Fixes to compile with emscripten 3.1.5 on Ubuntu 22.04 #2707

* enh(Platform): add test check with emscripten on Linux
2023-12-07 01:48:14 +01:00
Matej Kenda
607b0863ce
enh(Foundation): Path of the current process Path::self() (#2282)
* Merge remote-tracking branch 'jackywoo/add_self_to_path' into 2282-path-self
* fix(Foundation): minor code cleanup. #2282
* enh(Foundation): Windows unit test for Path::self and exception for non-implemented platform.
* fix(Foundation): Path::self() throws SystemException when the path can't be acquired. #2282

Co-developed-by: Jackie Woo <wuchienchao@qq.com>
Co-developed-by: Matej Kenda <matejken@gmail.com>
2023-12-05 07:55:07 +01:00
Günter Obiltschnig
94418e5bc8 #4320: Integer overflow in Poco::UTF32Encoding 2023-12-04 15:27:06 +01:00
Matej Kenda
5c9217663e fix(Foundation): Format.h uses Poco::format explicitly to avoid ambiguity with std::format (C++-20). #4028 2023-12-01 09:51:23 +01:00
Aleksandar Fabijanic
57bc0bbbb5
3102 json lowercase hex (#4306)
* Made it possible to use lowercase hex numbers, also when encoding JSON (#3102)

Co-authored-by: Thomas Weyn <Thomas.Weyn@cebir.be>

* fix(JSONString): Remove deprecated toJSON functions #4305

* fix(NumericString): conversions inconsistencies #4304

---------

Co-authored-by: Archipel <thomas@weynwebworks.com>
Co-authored-by: Thomas Weyn <Thomas.Weyn@cebir.be>
2023-11-27 22:43:20 +01:00
Aleksandar Fabijanic
cc67fb36ea enh(Ascii): improve performance for toLower/toUpper #3462 2023-11-26 18:56:54 -06:00
Aleksandar Fabijanic
11de40399c
fix(sharedMemory): x64 size error #2976 (#4295)
* fix(sharedMemory): x64 size error #2976

* chore: add Util dependency to Prometheus samples

* fix(HTTPClientSession): not working with UNIX_LOCAL SocketAddress #2578

* fix(WebSocketTest): supress connection reset exception assertion

* fix(PollSet): wait on premature epoll_wait return; reinforce tests for windows

* fix(build): add DataTest dependency to Makefile

* fix(Task): intermittently hanging test and some other improvements

* fix(Net): PollSet loop; suppress test WebSocket handler shutdown IOExeption
2023-11-26 04:57:39 +01:00
Pavle Dragisic
70bb3a40de
Add ProcessRunner and PIDFile (#4225)
* feat(Foundation): PIDFile and ProcessRunner #4064
* feat(Thread): optional signal blocking on POSIX #2978
* fix(ProcessRunner):remove logger, code enhancement #4225
* feat(Foundation): add PIDFile and ProcessRunner Tests #4064
* fix(Foundation): failing ProcessRunner Test #4064
* fix(PIDFile): remove append argument #4064
* remove Windows TODO from ProcessRunner #4064
* feat(ProcessRunnerTest): add line to checkTimeout #4064
* fix(ProcessRunner): add done flag to run() #4064
* fix(ProcessRunnerTest): add missing pidFile argument #4064
* chore(ProcessRunner): remove comments #4064
* fix(ProcessRunner): add runCount flag #4064
* fix(test): SharedLibrary and Class tests paths
* fix(ProcessRunner): thread sanitizer reported data races #4064
* fix(build): pass env var to testrunner #4064
* chore(PIDFile): remove ; in comments #4064
* feat(ProcessRunner): add Win argument format #4064
* fix(Tests): add ProcessRunnerTest to vcxproj #4064
* fix(Tests): change path to TestApp #4064
* feat(Tests): windows processrunner tests #4064
* fix(Tests): duplicate  ProcessRunnerTest in TestSuite vcxproj  #4064
* fix(CodeQL): sw declaration hides variable  #4064
* fix test binaries path for cmake
* fix(Build): missing include/PIDFile.h buildWin #4064
* fix(Build): add PocoFoundation depend in buildWin #4064
* feat(ProcessRunner): test process launching multiple threads #2976

---------

Co-authored-by: Pavle <pavle@debian-gnu-linux-11.localdomain>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2023-11-24 20:22:01 +01:00
Sokolov Yura
904075e1f1
AutoPtr: do 'duplicate' before 'release' (#4068)
Common knowledge in reference counting is "on assignment increment first
then decrement", because "just to be deleted" object could hold last
reference to "just to be assigned" one.

Fixes #3979
2023-11-23 04:49:10 +01:00
Alexander B
4a9285c997
Improve FifoEvent, ActiveMethod, ActiveResult (#4211)
Co-authored-by: Alexander B <bas524@ya.ru>
2023-11-22 00:59:24 +01:00
Andrew Auclair
39e35c316d
SplitterChannel::addChannel() should only add a channel once
SplitterChannel::addChannel() should only add a channel once to the internal vector. This prevents issues where the channel is accidentally added twice but only removed once because removeChannel stops at the first result. (#4270)
2023-11-21 04:17:19 +01:00
Pavle Dragisic
5e88502b7f
Fix Poco::Process::launch (UNIX) - memory leak when launching invalid command (#4267)
* fix: memory leak in ProcessImpl  #2366

* fix(Process): variable masking and spelling #2366

* feat(ProcessTest): invalid command launch test #2366

* fix(ProcessTest): handle failed launch on win #2366

* fix(ProcessTest): undefined exception #2366

---------

Co-authored-by: Pavle <pavle@debian-gnu-linux-11.localdomain>
2023-11-21 03:04:02 +01:00
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
Gleb Popov
f6c3017b3e
Do not incur insane stack limit in Foundation-ThreadPool test. (#3861)
This fixes the test on FreeBSD.
2023-03-17 16:09:38 -05:00
Samuel Thibault
d05d689622
Add GNU Hurd support (#3946)
Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
2023-03-17 15:24:57 -05:00
Jay
c79ae36c2a Fix build for QNX 2023-02-14 14:27:31 +09:00
Gleb Popov
b668742447
Fix typo in the exception message (#3858) 2023-01-27 05:26:33 -06:00
Fabio R. Sluzala
c693b0b1b2
Remove unnecessary duplication of std::string in NumberParser::tryParseFloat (#3864) 2023-01-24 01:00:15 -06:00
Byungjun Lee
5430b4c5b6
Fix Aix Build (#3860)
* Fix : Aix System NumberFormatter Build Error

* Fix : Aix System OpenSSL 3.0 Build Support

 - https://github.com/openssl/openssl/blob/openssl-3.0.0/NOTES-UNIX.md?plain=1#L110

* Add : Aix System Gcc Build Support

* Revert "Add : Aix System Gcc Build Support"

This reverts commit b9a4b90e39.

* Add : Aix System Gcc Build Support
2023-01-24 00:55:17 -06:00
R. Savchenko
079b50e0c1
Guard NOMINMAX ifdef (#3906) 2023-01-24 00:42:43 -06:00
Alex Fabijanic
4ceb731bba feat(Process): Add options to disable STDIO in child process #3867 2023-01-23 12:23:03 +01:00
Alex Fabijanic
feee864950 fix(TZInfo): Static FastMutex fails to lock when issued from another thread on linux #3918 2023-01-23 08:06:55 +01:00
Günter Obiltschnig
4e8837db9e GH #3876: Replace sprintf with snprintf in Environment and NumberFormatter to avoid deprecation warnings 2022-11-17 11:44:46 +01:00
Günter Obiltschnig
5a252fddcb #3859: zlib headers not updated 2022-11-10 19:15:55 +01:00
Alexander B
aa48d39dbd
testDynamicStructEmptyString always failed (#3863)
There was 1 failure:
 1: N7CppUnit10TestCallerI7VarTestEE.testDynamicStructEmptyString
    "expected: "{ "Empty": "", "Space":   }" but was: "{ "Empty": "", "Space": " " }""
    in "src/VarTest.cpp", line 2294

It's happen because in test we call aStruct.toString(false).
It's mean that we don't expect wrapping, but expected result was written with wrapping
2022-11-08 02:11:10 -06:00
Günter Obiltschnig
d67e2de42a #3846: Upgrade bundled zlib to 1.2.13 [fixes CVE] 2022-10-24 09:00:59 +02:00
Alex Fabijanic
9c8a92da3d fix(DynamicStruct): toString not wrapping empty strings #3835 2022-10-13 15:25:35 +02:00
Alex Fabijanic
a2c09c29d8 feat(DynamicStruct): toString() escaping #3833 2022-10-13 11:50:53 +02:00
Alex Fabijanic
d11e48f851 fix(Environment): Possibility of memory leak in Windows Environment nodeIdImpl? #3823 2022-10-06 21:19:04 +02:00
Alex Fabijanic
49f6def959 feat(Logger): Optimize multi-arg logger methods to only call format() if log level allows #2332 2022-08-30 09:29:53 +02:00
tomaz-beltram
f03e7de03f
Fixed converting/correcting pre-gregorian dates (#3723). (#3769)
Co-authored-by: Tomaz Beltram <tomaz.beltram@topit.si>
2022-08-27 04:40:31 -05:00
haorui wang
22d2865de2
chore(Foundation) : correct spelling (#3750) 2022-08-14 07:39:03 -05:00
Alex Fabijanic
46d5d58bc8 chore: 1.12.3 version 2022-08-10 15:32:29 +02:00
Alex Fabijanic
2006327198 fix(Event): Poco EventImpl for Win32 breaks INFINITE wait #3737 2022-08-10 14:10:12 +02:00
Alex Fabijanic
4f5f30936b chore: 1.12.2 versions and notes 2022-08-07 11:54:22 +02:00
Alex Fabijanic
d7ced77529 release 1.12.1 2022-08-07 11:52:21 +02:00
Alex Fabijanic
dbb7b5f8e2 fix: g++ C++20 warnings #3734 2022-08-06 22:28:45 +02:00
Alex Fabijanic
42b6d3ace4 fix(format): Poco::format and C++20 #3733 2022-08-06 22:24:41 +02:00
Alex Fabijanic
cedb34d3c3 fix(Platform): LoongArch support #3460 2022-08-02 18:19:40 +02:00
Alex Fabijanic
10dfe9fe92 fix(SpinlockMutex): VS2022 compilation issues #3693 2022-07-27 16:19:06 -04:00
Aleksandar Fabijanic
86a4f0045e
Fix/posix sleep (#3705)
* fix(Thread_POSIX): sleep() poor performance #3703

* chore(vscode): add file associations

* fix(TaskManager): waits for all threads in the ThreadPool #3704

* fix(Thread): call std::this_thread::sleep_for() to sleep #3703

* fix(PollSet): wakeup fd is never read #3708

* feat(Thread): Add Thread::set/getAffinity() #3709

* doc(Thread): Thread::trySleep() assertion #3710

* fix(PollSet): wakeup fd is never read (windows portion and some other optimizations) #3708

* feat(SocketReactor): improvements #3713

* chore(ThreadTest): add missing include

* fix(PollSet): wakeup fd is never read #3708

* fix(Any): #3682 #3683 #3692 #3712

* fix(mingw): lowercase winsock2 and iphlpapi to allow cross compile #3711

* feat(Thread): Add Thread::set/getAffinity() #3709

* chore(SocketReactor): one-liners inlined, removed redundant try/catch in dospatch, remove unused onBusy()

* feat(SocketReactor): add socket to ErrorNotification

* fix(SocketReactor): pollTimeout assignment and ConnectorTest leak
2022-07-26 06:54:56 -05:00
Alex Fabijanic
d9ea0f5d75 fix(Event): POSIX Event state need not be atomic #3699 2022-07-19 17:58:13 +02:00
JackyWoo
1d28d2d42d
set thread name (#3664)
* set thread name

* fix dead lock

* fix code style & return fake name

* fix code style

* fix code style

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2022-07-18 05:21:33 -05:00
junwufan
2a36359bc7
Update Var.h (#3684)
Add `Poco` namespace for `format` function, because it conficts with std::format.
2022-07-14 08:09:44 -05:00
Alex Fabijanic
f049898c8b fix(cmake): PocoFoundationConfig.cmake should now check for PCRE2 #3677 2022-07-09 19:13:04 +02:00
Aleksandar Fabijanic
85e8b89061
Release 1.12.0 (#3676)
* updated README.md

* Create close-inactive-issues.yml

* PocoDoc: fix iframe sandboxing

* create poco-1.11.3 branch, bump version

* update copyright date

* #3567: check legacy provider existence for legacy exception #3567

* fix(OpenSSLInitializer): unload provider on uninitialize (#3567)

* fix(OpenSSLInitializer): fix provider unloading (#3567)

* fix(OpenSSLInitializer): revert unload provider on uninitialize (#3567)

* fix(MySQL): MySQL UUID binding temporary string #3587

* update CI link in README.md

* #3632: add overloads to ctor and connect() to allow passing a Poco::Net::StreamSocket/Poco::Net::SecureStreamSocket to enable TLS connections without introduding a direct dependency to NetSSL.

* updated changelog

* devel-release-1.12.0 (#3673)

* Fix percent-encoded fragment modification in Poco::URI

Before this commit using Poco::URI class to parse specific URIs that had
percent-encoded fragment identifier resulted in the loss of information
concerning the way the fragment identifier was encoded. There could be the cases
when the  result of Poco::URI object serialization to string did not match the
original URI string Poco::URI object was created from.

In this commit we change the internal logic of fragment processing in Poco::URI,
so that the fragment is stored inside the class in raw form (the same way as
query string). The methods getFragment and setFragment work the old way (with
percent-decoded fragment values), new methods getRawFragment and setRawFragment
are added to get access to the original fragment representation.

* Remove SDK version from VS2022 test projects (#3607)

* Remaining changes for Windows on ARM64 support (#3608)

* Add ARM64 to Foundation

* Changed lib, and bin folders of ARM64 builds

* Updated buildwin.cmd

* Added missing closing </File> tags (#3610)

* feat(Platform): LoongArch support #3460

* fix(PollSet): default enable epoll on linux

* default disable new state on move

* fix(UDPHandler): data race #3613; clean up all Net tsan warnings

* ProGen vs170 projects with Win32,x64,ARM64 (#3612)

* fix(TCPServer): #1884 #1965

* fix(LogFile): LogFile_STD (LogFileImpl) fails to recover from getting out of space #2084

* Avoid clang 10 -Wimplicit-int-float-conversion warning/error when converting int into float (#2943)

Example of warning (error when using -Werror) we get with clang 10:

/remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:444:14: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion]
                if (from > std::numeric_limits<T>::max())
                         ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:332:4: note: in instantiation of function template specialization 'Poco::Dynamic::VarHolder::checkUpperLimitFloat<float, int>' requested here
                        checkUpperLimitFloat<F,T>(from);
                        ^
/remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:2175:3: note: in instantiation of function template specialization 'Poco::Dynamic::VarHolder::convertToSmaller<float, int>' requested here
                convertToSmaller(_val, val);
                ^

* chore(ci): run ci on pull requests

* #2569: Added TIMESTAMP data type support on MySQL (#3471)

* Unit test for TIMESTAMP data type in MySQL.

* Added support for TIMESTAMP data type.

Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com>

* MongoDB::Array: int --> size_t in get for consistency with size(), new helper functions to add elements to an array. (#3016)

* fix(CppUnit): enable_if disarm numeric notEqualsMessage

* fix(CppUnit): CppUnit notEqualsMessage causing compile errors #3615

* Syslog: Include Facility to Syslog Message (#3452)

* Fixed indentation

* Added Facility to Message in RemoteSyslogListener

* Net: make MessageHeader limits configurable (#3404)

* Add Message::getAll (#3104)

* chore(Message): fix formatting for #3104

* Output to stderr in Poco::WindowsConsoleChannel (#3058)

- Fixes #3056

* HTTPDigestCredentials added support for RFC7616 algorithms (#3026)

* chore(SHA2Engine): fix formatting for #3026

* Added support for SQLite transaction types using Session property (#3018)

* chore(SQLite): fix enum names case for #3018

* fix(HTTPResponse): Add 425 / HTTP_TOO_EARLY to HTTPResponse::HTTPStatus #3592

* fix(SQLite): windows build (global var does not link) #3018

* Added missing SocketProactor class to ProGen source (#3616)

* Added missing SocketProactor class to ProGen source

* ProGen'd VS2022 Net project

* chore(Net): regenerate VS 140,150,160 projects #3614

* Handle MariaDB JSON columns since they are stored as `longtext` (#3621)

* Also extract BLOBs when reading longtext columns as std::string

* Fix error message in unit test

* Added unit test to read longtext columns as std::string

* Use `tx_isolation` when connected to MariaDB regardless of version (#3622)

* Use `tx_isolation` when connected to MariaDB regardless of version

* Rename variable

* Handle MariaDB server info in the middle of the string

* Updated to PCRE version 8.45  (#3623)

* Add missing changes from zlib update

* Updated to PCRE version 8.45

Build on Win32 and Linux, RegularExpressionTest was successful

* Fix/tsan (#3617)

* fix(Foundation): tsan warnings fixes

* fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress

* fix(Util): tsan fixes

* fix(netSSL_OpenSSL): tsan fixes

* fix(Data): tsan warnings fixes

* feat(ci): add tsan job

* feat(ci): add tsan job, another attempt

* feat(ci): add tsan job, 3rd attempt

* fix(Foundation): tsan warnings fixes

* fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress

* fix(Util): tsan fixes

* fix(netSSL_OpenSSL): tsan fixes

* fix(Data): tsan warnings fixes

* feat(ci): add tsan job

* feat(ci): add tsan job, another attempt

* feat(ci): add tsan job, 3rd attempt

* fix(ResultMetadata): memory leak #3474

* feat(ci): disable ActiveDispatcher tests for tsan runs

* feat(ci): try to fix tsan options file detection (again)

* chore(TestLibrary: correct spelling

* fix(ci): fix tsan run; add -y to apt; disable samples build for some jobs

* fix(ci): add mysql ports

* feat(ci): add VS asan

* feat(double-conversion): Upgrade double-conversion to v3.2.0 #3624

* chore(asan): disable msvc asan build (dll not found)

* chore(double-conversion): move NumericString.h before double-conversion includes to prevent min/max collision; reinstate lost loongarch64

* chore(JSON): sync pdjson with upstream

* fix(Statement): Poco::Data::Statement becomes unusable after exception #2287

* added facility to SyslogChannel (#3453)

* TCPServerDispatcher.h: missing <atomic> (#2961)

Fixes: b8af168151fe0147fb06557029002ae226dcc549
Fixes: #1965

* Windows embedded OpenSSL: Fixed bogus warning during compilation (External OpenSSL defined but internal headers used - possible mismatch!) (#3627)

* fix(double-conversion): nios2 and riscv defines

* fix(double-conversion): riscv defines

* fix(cmake): TestLibrary debug postfix

* fix(cmake): add WebNotifier to samples #3184

* doc(Crypto): Fix error in find_package example #3088

* fix(Event): Event data race #3629

* fix(AsyncChannel): race condition in AsyncChannel close/log #1039

* fix(Zip): Zip 64-bit extensions not set #2590 (tentative) (#3604)

* PocoDoc: fix handling of font-style tags if tag is immediately followed by punctuation

* Static code analyzer warnings #2688

* MinGW: fatal error: kernelspecs.h: No such file #2691

* Poco::Data::SessionPool change connection timeout #3241

* Makefile: space(s) following target name will break build (during link) #3062

* json format PrintHandler #2678

* indicate compiler that functions will never return (#3639)

* fix warning C4717: 'format<std::vector<std::any,std::allocatorstd::an… (#3640)

* fix warning C4717: 'format<std::vector<std::any,std::allocatorstd::any > >': recursive on all control paths, function will cause runtime stack overflow

* keep origin format.

* fix(format): scope

* fix(Crypto): libPocoCrypto.so: undefined reference to pthread_atfork when linking statically with OpenSSL 1.1 #3073

* chore(LocalConfigurationView): fix style #3529

* fix(ConfigurationView): ConfigurationView and JSON is broken for array access #3635

* FifoBuffer.advance method not throw exception when length==0 (#3641)

* fifobuffer not throw error when length = 0

* Update FIFOBuffer.h

fix indentation

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>

* fix(URI): Decoding URI query parameters ( ::getQueryParameters) incompatible with Spring 5 #2619

* fix(NTPClient): NTPClient ignores second fractions #2614

* chore(JSON): add test for #2612

* fix(Platform): MinGW also defines __GNUC__. #3195

* Fix some clang 10 -Wsign-compare warnings (#2960)

In file included from /data/mwrep/res/osp/Poco/JSON/20-0-0-0/include/Poco/JSON/Object.h:22:
In file included from /data/mwrep/res/osp/Poco/JSON/20-0-0-0/include/Poco/JSON/Array.h:23:
In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/Dynamic/Var.h:26:
In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/Dynamic/VarHolder.h:22:
In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumberFormatter.h:22:
/data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:220:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare]
                                if ((limitCheck - result) < add) return false;
                                     ~~~~~~~~~~~~~~~~~~~  ^ ~~~
/data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:229:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare]
                                if ((limitCheck - result) < add) return false;
                                     ~~~~~~~~~~~~~~~~~~~  ^ ~~~
/data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:240:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare]
                                if ((limitCheck - result) < add) return false;
                                     ~~~~~~~~~~~~~~~~~~~  ^ ~~~
/data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:249:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare]
                                if ((limitCheck - result) < add) return false;
                                     ~~~~~~~~~~~~~~~~~~~  ^ ~~~
4 errors generated.

* chore(README): Add vcpkg installation instructions #2940

* fix(SQLite): SQLite::Connector::open() crashes on db file with non existing directory #2285

* fix(MailMessage): read hangs on missing final multipart boundary #2401

* fix(NumberParser): Rounds very large negative numbers to the incorrect values #3580

* fix(JSON::Stringifier): JSON Serializing NAN #3251

* feat(Timespan): Add std::chrono support #2576 #2623

* fix(strToInt): overflows #3580

* fix(strToInt): thousand separator regression #3580

* fix(MySQL::Extractor): MySQL Extractor #2521

* feat(FTPClientSession): activeDataConnection 1.11.0 cannot set specific data port #3372

* feat(Cipher): No access to padding in Cipher #3374

* feat(TypeHandler): DB into() does not compile for more than 20 members in a tuple #3342

* fix(NumberFormatter): Negative precision in NumberFormatter::format() #2511

* Make ParallelSocketReactor thread namable (#3642)

make ParallelSocketReactor thread namable

* fix(Redis): Poco::Redis after executing auth command next command always return OK #2457

* chore(NumberParserTest): add test for #2441

* avoid clang tidy warning (#3646)

* Revert "avoid clang tidy warning (#3646)" (#3648)

This reverts commit b23488d6fe.

* fix(VarHolder): limits check

* As of C++11, std::swap is noexcept. #2386 (#3645)

* As of C++11, std::swap is noexcept. #2386

* fix(Any): remove throw on swap

* fix(Any): As of C++11, std::swap is noexcept. #2386

* fix(Any): make size const #2386

* fix(SimpleRowFormatter): clang won't compile noexcept #2386

* a couple of arm fixes

* fix(Any): As of C++11, std::swap is noexcept. #2386

* fix(AnyTest): local() for POCO_NO_SOO# 2386

* test(RSACipher): RSA encryption without private key #2367

* chore(RSACipherTest): delete ciphers #2367

* add separate accessors and mutators for connect, send and receive tim… (#3476)

* add separate accessors and mutators for connect, send and receive timeouts

* implement timeout methods outside of class declaration to conform to existing code structure

* Update HTTPSession.h

Co-authored-by: bfoster <bfoster@malwarebytes.com>
Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>

* Make poll set interruptable (#3644)

* Make poll set interruptable

* open test for poll set

* fix poll set wake up test

* fix build error

* feat(SecureSocketImpl): how to set the socket of SecureSocketImpl to no-blocking? #2352

* better socket reactor wake up (#3647)

* better socket reactor wake up

* Remove documentation comment from source file

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>

* test(MailMesage): MailMessage::read() chokes on Content-disposition #3650

* chore(Net/samples): tcpserver missing from Net/samples/CMakeLists.txt #3651

* fix(CMake): Linking with Foundation on Android gives error #3652 #3653

* #2821: Poco::Buffer: full on creation? - add documentation describing the behavior.

* add note regarding receiveFrame with Poco::Buffer

* merge changes from 1.11.3

* #3633: Redis: Support Authentication

* #3658: Support for chunked transfer encoding trailer

* formatHex with lower case (#3657)

* feat(Socket): add lastErrorDesc()

* fix(Socket): Socket::select EPOLL implementation returns socket in exceptList when empty list is given #3655; mark select as deprecated #1459

* Fix/poll set race (#3630)

* fix(PollSet): PollSet data race #3628

* fix(SocketConnector): SocketConnector test #2875

* fix(PollSet): optimize the amount of locked code; fix and simplify wakeUp logic

* fix(SocketConnectorTest): fix test memleak (data not flowing, handlers not deleted) #2875

* fix(PollSet): clear() and tests

* fix(PollSet): #1459 #3628 #3655 #3661

* fix(PollSet): Integrate windows epoll #2091, #3649

* chore(ProGen): MSVC does not properly recognize std version #3665

* fix(PollSet): eventfd call arg; add wepoll to CMakelists.txt

* fix(PollSet): CMakelists.txt

* fix(cmake): MSVC does not properly recognize std version #3665

* chore(vscode): add mac config

* fix(PollSet): PollSet::add()/update() semantics #3661

* Feat/pcre2 (#3663)

* upgrade to pcre2

* use pcre2_*_8 names

* fix pcre2 lib name for unbundled build

* CMake changes for PCRE2

* add missing macro for unbundled build

* add PCRE2_STATIC

* updated VS project files for pcre2

Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com>

* Revert "formatHex with lower case (#3657)" (#3670)

This reverts commit b1823b61c0.

* Always set thread names on POSIX platforms (#3384)

* chore: gitignore vim .swp files

* feat(POSIX): Always set thread names.

I'm not sure about the original intent to hide it under a DEBUG macro.

Naming the threads in release mode makes it easier to see runtime
application and know which thread pool uses how many threads and what
their names are. Firefox, Chromium and many other apps do this on Linux.

* Remove trailing whitespace (#3668)

* doc: update CHANGLEOG

Co-authored-by: Daniil Zotkin <zotkin@rutoken.ru>
Co-authored-by: Hernan Martinez <hernan.c.martinez@gmail.com>
Co-authored-by: Romain Geissler @ Amadeus <romain.geissler@amadeus.com>
Co-authored-by: hectots <monkey.instinct@gmail.com>
Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com>
Co-authored-by: Matej Kenda <matejken@gmail.com>
Co-authored-by: BeBinder <93721965+BeBinder@users.noreply.github.com>
Co-authored-by: Tavi Cacina <tavi-cacina@users.noreply.github.com>
Co-authored-by: Mathieu Stefani <m.stefani@abc-arbitrage.com>
Co-authored-by: Fritz Elfert <fritz@fritz-elfert.de>
Co-authored-by: Maksim Kita <kitaetoya@gmail.com>
Co-authored-by: Spaky <Spaky@users.noreply.github.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Co-authored-by: Matej Kenda <matej.kenda@topit.si>
Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com>
Co-authored-by: Guillermo Frontera <gfrontera86@gmail.com>
Co-authored-by: junwufan <shelllet.com@gmail.com>
Co-authored-by: JackyWoo <wuchienchao@qq.com>
Co-authored-by: Ben Foster <bfoster7593@gmail.com>
Co-authored-by: bfoster <bfoster@malwarebytes.com>
Co-authored-by: Arun Chandrasekaran <arun@paravision.ai>
Co-authored-by: John Vandenberg <jayvdb@gmail.com>

Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com>
Co-authored-by: Daniil Zotkin <zotkin@rutoken.ru>
Co-authored-by: Hernan Martinez <hernan.c.martinez@gmail.com>
Co-authored-by: Romain Geissler @ Amadeus <romain.geissler@amadeus.com>
Co-authored-by: hectots <monkey.instinct@gmail.com>
Co-authored-by: Hector Toledo Soto <hsoto@transperfect.com>
Co-authored-by: Matej Kenda <matejken@gmail.com>
Co-authored-by: BeBinder <93721965+BeBinder@users.noreply.github.com>
Co-authored-by: Tavi Cacina <tavi-cacina@users.noreply.github.com>
Co-authored-by: Mathieu Stefani <m.stefani@abc-arbitrage.com>
Co-authored-by: Fritz Elfert <fritz@fritz-elfert.de>
Co-authored-by: Maksim Kita <kitaetoya@gmail.com>
Co-authored-by: Spaky <Spaky@users.noreply.github.com>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
Co-authored-by: Matej Kenda <matej.kenda@topit.si>
Co-authored-by: Guillermo Frontera <gfrontera86@gmail.com>
Co-authored-by: junwufan <shelllet.com@gmail.com>
Co-authored-by: JackyWoo <wuchienchao@qq.com>
Co-authored-by: Ben Foster <bfoster7593@gmail.com>
Co-authored-by: bfoster <bfoster@malwarebytes.com>
Co-authored-by: Arun Chandrasekaran <arun@paravision.ai>
Co-authored-by: John Vandenberg <jayvdb@gmail.com>
2022-07-08 11:31:16 -05:00
John Vandenberg
0e6e16645c
Remove trailing whitespace (#3668) 2022-07-07 04:18:20 -05:00
Arun Chandrasekaran
0af9524e16
Always set thread names on POSIX platforms (#3384)
* chore: gitignore vim .swp files

* feat(POSIX): Always set thread names.

I'm not sure about the original intent to hide it under a DEBUG macro.

Naming the threads in release mode makes it easier to see runtime
application and know which thread pool uses how many threads and what
their names are. Firefox, Chromium and many other apps do this on Linux.
2022-07-07 04:08:47 -05:00
Aleksandar Fabijanic
674446d44d
Revert "formatHex with lower case (#3657)" (#3670)
This reverts commit b1823b61c0.
2022-07-07 02:43:52 -05:00
Aleksandar Fabijanic
bbe09e48d1
Feat/pcre2 (#3663)
* upgrade to pcre2

* use pcre2_*_8 names

* fix pcre2 lib name for unbundled build

* CMake changes for PCRE2

* add missing macro for unbundled build

* add PCRE2_STATIC

* updated VS project files for pcre2

Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com>
2022-07-06 10:46:38 -05:00
Alex Fabijanic
a1b21d2a0d chore(ProGen): MSVC does not properly recognize std version #3665 2022-07-06 11:39:47 +02:00
JackyWoo
b1823b61c0
formatHex with lower case (#3657) 2022-07-04 14:25:02 -05:00
Günter Obiltschnig
2daf323afc #2821: Poco::Buffer: full on creation? - add documentation describing the behavior. 2022-07-03 15:55:36 +02:00
Günter Obiltschnig
b6dcb5bbd3
Merge pull request #2959 from dahek/get_raw_fragment
Fix percent-encoded fragment modification in Poco::URI
2022-07-03 15:12:23 +02:00
Alex Fabijanic
36d8507a48 fix(CMake): Linking with Foundation on Android gives error #3652 #3653 2022-06-30 05:49:08 +02:00
Aleksandar Fabijanic
168f1eb6e2
As of C++11, std::swap is noexcept. #2386 (#3645)
* As of C++11, std::swap is noexcept. #2386

* fix(Any): remove throw on swap

* fix(Any): As of C++11, std::swap is noexcept. #2386

* fix(Any): make size const #2386

* fix(SimpleRowFormatter): clang won't compile noexcept #2386

* a couple of arm fixes

* fix(Any): As of C++11, std::swap is noexcept. #2386

* fix(AnyTest): local() for POCO_NO_SOO# 2386

* test(RSACipher): RSA encryption without private key #2367

* chore(RSACipherTest): delete ciphers #2367
2022-06-28 12:14:36 -05:00
Alex Fabijanic
c37780726d fix(VarHolder): limits check 2022-06-27 13:33:10 +02:00
Aleksandar Fabijanic
309aff3579
Revert "avoid clang tidy warning (#3646)" (#3648)
This reverts commit b23488d6fe.
2022-06-27 05:44:52 -05:00
JackyWoo
b23488d6fe
avoid clang tidy warning (#3646) 2022-06-27 01:57:20 -05:00
Alex Fabijanic
a785705a5c chore(NumberParserTest): add test for #2441 2022-06-26 20:14:05 +02:00
Alex Fabijanic
ae00f1c8eb fix(NumberFormatter): Negative precision in NumberFormatter::format() #2511 2022-06-24 09:59:30 +02:00
Alex Fabijanic
b93713087d fix(strToInt): thousand separator regression #3580 2022-06-23 00:09:55 +02:00
Alex Fabijanic
284a141432 fix(strToInt): overflows #3580 2022-06-22 23:13:39 +02:00
Alex Fabijanic
6a97657df8 feat(Timespan): Add std::chrono support #2576 #2623 2022-06-22 14:25:07 +02:00
Alex Fabijanic
5cbe30e199 fix(NumberParser): Rounds very large negative numbers to the incorrect values #3580 2022-06-22 12:12:30 +02:00
Romain Geissler @ Amadeus
3e563492ef
Fix some clang 10 -Wsign-compare warnings (#2960)
In file included from /data/mwrep/res/osp/Poco/JSON/20-0-0-0/include/Poco/JSON/Object.h:22:
In file included from /data/mwrep/res/osp/Poco/JSON/20-0-0-0/include/Poco/JSON/Array.h:23:
In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/Dynamic/Var.h:26:
In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/Dynamic/VarHolder.h:22:
In file included from /data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumberFormatter.h:22:
/data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:220:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare]
                                if ((limitCheck - result) < add) return false;
                                     ~~~~~~~~~~~~~~~~~~~  ^ ~~~
/data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:229:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare]
                                if ((limitCheck - result) < add) return false;
                                     ~~~~~~~~~~~~~~~~~~~  ^ ~~~
/data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:240:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare]
                                if ((limitCheck - result) < add) return false;
                                     ~~~~~~~~~~~~~~~~~~~  ^ ~~~
/data/mwrep/res/osp/Poco/Foundation/20-0-0-0/include/Poco/NumericString.h:249:31: error: comparison of integers of different signs: 'unsigned long' and 'char' [-Werror,-Wsign-compare]
                                if ((limitCheck - result) < add) return false;
                                     ~~~~~~~~~~~~~~~~~~~  ^ ~~~
4 errors generated.
2022-06-21 11:01:05 -05:00
Alex Fabijanic
15e242b4bc fix(Platform): MinGW also defines __GNUC__. #3195 2022-06-21 17:57:09 +02:00
Alex Fabijanic
c77f558d0e chore(JSON): add test for #2612 2022-06-21 10:55:20 +02:00
Alex Fabijanic
6dc79c05f9 fix(URI): Decoding URI query parameters ( ::getQueryParameters) incompatible with Spring 5 #2619 2022-06-21 06:04:46 +02:00
JackyWoo
4938185ff0
FifoBuffer.advance method not throw exception when length==0 (#3641)
* fifobuffer not throw error when length = 0

* Update FIFOBuffer.h

fix indentation

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2022-06-20 15:09:40 -05:00
Alex Fabijanic
dc201ade08 fix(format): scope 2022-06-19 18:54:24 +02:00
junwufan
283321a11d
fix warning C4717: 'format<std::vector<std::any,std::allocatorstd::an… (#3640)
* fix warning C4717: 'format<std::vector<std::any,std::allocatorstd::any > >': recursive on all control paths, function will cause runtime stack overflow

* keep origin format.
2022-06-19 11:45:38 -05:00
Guillermo Frontera
5cc73c6223
indicate compiler that functions will never return (#3639) 2022-06-18 14:45:23 -05:00
Alex Fabijanic
7f4bdca6e0 Static code analyzer warnings #2688 2022-06-17 22:36:16 +02:00
Alex Fabijanic
2bd71b4ea4 fix(AsyncChannel): race condition in AsyncChannel close/log #1039 2022-06-10 19:56:29 -05:00
Alex Fabijanic
fbdb6120aa fix(Event): Event data race #3629 2022-06-02 11:40:40 -05:00
Alex Fabijanic
420664ea99 fix(cmake): TestLibrary debug postfix 2022-06-02 08:18:40 -05:00
Alex Fabijanic
7035844108 fix(double-conversion): riscv defines 2022-06-02 08:11:53 -05:00
Alex Fabijanic
2967db2778 fix(double-conversion): nios2 and riscv defines 2022-06-02 08:10:04 -05:00
Matej Kenda
eaf88cca34
Windows embedded OpenSSL: Fixed bogus warning during compilation (External OpenSSL defined but internal headers used - possible mismatch!) (#3627) 2022-06-02 08:00:14 -05:00
BeBinder
ec41521ca5
added facility to SyslogChannel (#3453) 2022-06-02 00:04:27 -05:00
Aleksandar Fabijanic
ff879f5905
Fix/tsan (#3617)
* fix(Foundation): tsan warnings fixes

* fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress

* fix(Util): tsan fixes

* fix(netSSL_OpenSSL): tsan fixes

* fix(Data): tsan warnings fixes

* feat(ci): add tsan job

* feat(ci): add tsan job, another attempt

* feat(ci): add tsan job, 3rd attempt

* fix(Foundation): tsan warnings fixes

* fix(Thread_POSIX): tsan warnings fixes; add tsan.suppress

* fix(Util): tsan fixes

* fix(netSSL_OpenSSL): tsan fixes

* fix(Data): tsan warnings fixes

* feat(ci): add tsan job

* feat(ci): add tsan job, another attempt

* feat(ci): add tsan job, 3rd attempt

* fix(ResultMetadata): memory leak #3474

* feat(ci): disable ActiveDispatcher tests for tsan runs

* feat(ci): try to fix tsan options file detection (again)

* chore(TestLibrary: correct spelling

* fix(ci): fix tsan run; add -y to apt; disable samples build for some jobs

* fix(ci): add mysql ports

* feat(ci): add VS asan

* feat(double-conversion): Upgrade double-conversion to v3.2.0 #3624

* chore(asan): disable msvc asan build (dll not found)

* chore(double-conversion): move NumericString.h before double-conversion includes to prevent min/max collision; reinstate lost loongarch64

* chore(JSON): sync pdjson with upstream

* fix(Statement): Poco::Data::Statement becomes unusable after exception #2287
2022-06-01 23:47:26 -05:00
Spaky
17fec1b985
Updated to PCRE version 8.45 (#3623)
* Add missing changes from zlib update

* Updated to PCRE version 8.45

Build on Win32 and Linux, RegularExpressionTest was successful
2022-05-31 13:13:06 -05:00
Alex Fabijanic
2b7b9531f1 chore(SHA2Engine): fix formatting for #3026 2022-05-29 21:54:40 -05:00
Maksim Kita
fe59436763
HTTPDigestCredentials added support for RFC7616 algorithms (#3026) 2022-05-29 21:52:39 -05:00
Fritz Elfert
1f587cfd3b
Output to stderr in Poco::WindowsConsoleChannel (#3058)
- Fixes #3056
2022-05-29 21:48:41 -05:00
Alex Fabijanic
f860c26b3d chore(Message): fix formatting for #3104 2022-05-29 21:42:33 -05:00
Mathieu Stefani
8fa4d5273d
Add Message::getAll (#3104) 2022-05-29 21:37:31 -05:00
Romain Geissler @ Amadeus
75eb0ca7cb
Avoid clang 10 -Wimplicit-int-float-conversion warning/error when converting int into float (#2943)
Example of warning (error when using -Werror) we get with clang 10:

/remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:444:14: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion]
                if (from > std::numeric_limits<T>::max())
                         ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:332:4: note: in instantiation of function template specialization 'Poco::Dynamic::VarHolder::checkUpperLimitFloat<float, int>' requested here
                        checkUpperLimitFloat<F,T>(from);
                        ^
/remote/intdeliv/components/osp/Poco/Foundation/19-0-0-6/include/Poco/Dynamic/VarHolder.h:2175:3: note: in instantiation of function template specialization 'Poco::Dynamic::VarHolder::convertToSmaller<float, int>' requested here
                convertToSmaller(_val, val);
                ^
2022-05-28 21:14:04 -05:00
Alex Fabijanic
b52ec8cc47 fix(LogFile): LogFile_STD (LogFileImpl) fails to recover from getting out of space #2084 2022-05-28 20:50:29 -05:00
Alex Fabijanic
71a3a79ec9 fix(UDPHandler): data race #3613; clean up all Net tsan warnings 2022-05-27 21:57:34 -05:00
Alex Fabijanic
216d5ae3a4 default disable new state on move 2022-05-27 13:32:24 -05:00
Alex Fabijanic
0df6a6a7d9 feat(Platform): LoongArch support #3460 2022-05-27 09:52:24 -05:00
Hernan Martinez
6cf3a53997
Remaining changes for Windows on ARM64 support (#3608)
* Add ARM64 to Foundation

* Changed lib, and bin folders of ARM64 builds

* Updated buildwin.cmd
2022-05-26 22:40:30 -05:00
Hernan Martinez
76fa43062f
Remove SDK version from VS2022 test projects (#3607) 2022-05-26 22:39:28 -05:00
Alex Fabijanic
d24bbd636d fix(Foundation): remove SDK version from VS 2022 project #3605 2022-05-26 12:53:21 -05:00