summaryrefslogtreecommitdiff
path: root/lib/cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add missing include for the security testsTobias Mayer2023-03-182-0/+2
|
* lib/cpp: Fix MSVC warning C4706 (BinaryProtocol)dejank-isystem2023-02-211-2/+2
| | | MSVC warning C4706: assignment within conditional expression
* Fix VisualStudio project files and upgrade to VS2015Zlika2023-02-214-95/+73
|
* Fix Security Tests for OpenSSLv3Tobias Mayer2023-02-192-6/+8
|
* lib: cpp: transport: include thrift/config.h in TFDTransportChris Friedt2022-11-221-5/+7
| | | | | | | | | | | | | | | | | The `PlatformSocket.h` defines some macros that reference symbols in the libc without including the necessary headers. Moreover, the headers are protected by config macros (i.e. `#ifdef HAVE_UNISTD_H`). This makes header ordering rather fragile. Explicitly include `<thrift/config.h>` and conditionally include `<unistd.h>` prior to referencing them. A future improvement to reduce fragility would be to add includes directly in `PlatformSocket.h`. Signed-off-by: Chris Friedt <cfriedt@meta.com>
* lib: cpp: automake: ship thrift/numeric_cast.hChris Friedt2022-11-221-0/+1
| | | | | | | | The `<thrift/numeric_cast.h>` header should be part of the installed thrift artifacts since it is included by other installed headers. Signed-off-by: Chris Friedt <cfriedt@meta.com>
* lib: cpp: TTransportException: create thrift::numeric_castChristopher Friedt2022-11-202-2/+73
| | | | | | | | | | | | | This adds an equivalent implementation of `boost::numeric_cast` written purely in standard c++. The implementation is relatively trivial and reduces the dependency on `boost`. Adapted from https://stackoverflow.com/a/49658950/5636218 Signed-off-by: Chris Friedt <cfriedt@meta.com>
* THRIFT-5666: lib: cpp: prefer poll.h over sys/poll.hChris Friedt2022-11-204-0/+12
| | | | | | | | | | | The `<sys/poll.h>` header is not actually where `poll(2)` must be defined according to the spec. However, it may be the case that some random UNIX-like OS uses `<sys/poll.h>` instead. Both use cases can be supported simply by including the proper header, if it exists. Signed-off-by: Chris Friedt <cfriedt@meta.com>
* THRIFT-5663: lib: cpp: usleep was not declared in this scopeChris Friedt2022-11-202-8/+8
| | | | | | | | | | | | | | | | | Several build failures in Travis resulted from an include-order problem in `TFileTransport.cpp`. It would probably be better to simply include the right header files in `PlatformSocket.h` but it's possible that might slow down compilation. ``` error: 'usleep' was not declared in this scope .. # define THRIFT_SLEEP_USEC usleep ``` Also fixing the same (potential) problem in `TFDTransport.cpp`. Signed-off-by: Chris Friedt <cfriedt@meta.com>
* lib: cpp: protocol: declare when methods overrideChristopher Friedt2022-10-263-12/+12
| | | | | | | This avoids compiler warnings about inconsistent use of `override`. Signed-off-by: Chris Friedt <cfriedt@meta.com>
* lib: cpp: TOutput: add zephyr-specific strerror_s implementationChris Friedt2022-10-251-0/+4
| | | | | | | | In Zephyr, optimize `TOutput::strerror_s` to minimize (stack) space. The string error table is in ROM in any case, so string values will not be overwritten (if they happen to be compiled-in). Signed-off-by: Chris Friedt <cfriedt@fb.com>
* lib: cpp: TProtocol: support zephyr byteorderChris Friedt2022-10-251-0/+14
| | | | | | | | | | | Zephyr's byteorder is defined in `<zephyr/sys/byteorder.h>`. However, the `bswap_xx` macros are also defined there. They need to be `#undef`d first when building for big-endian architectures, since the Thrift byteorder macros are no-ops for little-endian architectures. Signed-off-by: Chris Friedt <cfriedt@fb.com>
* lib: cpp: add missing functional and cmath includesChris Friedt2022-10-235-3/+11
| | | | | | | | Manual runs of the autotools docker script were failing due to `std::functional` not being a member of `std`. Similar error messages for `std::ceil` and `std::log`. Signed-off-by: Chris Friedt <cfriedt@meta.com>
* lib: cpp: thrift: include functional in TServerFrameworkChris Friedt2022-10-231-0/+1
| | | | | | Use of `std::placeholders::_1` requires `<functional>`. Signed-off-by: Chris Friedt <cfriedt@fb.com>
* Merge pull request #2644 from lorteddie/use-openssl-zlib-targetsMario Emmenlauer2022-09-121-2/+8
|\ | | | | Use openssl and zlib targets
| * prefer openssl and zlib targets over library pathsTobias Weihs2022-09-111-2/+8
| |
* | fixed a ton of missing ASF headers in *.thrift filesJens Geyer2022-09-111-0/+19
| |
* | Merge pull request #2630 from kou/cpp-scoped-array-to-unique-ptrMario Emmenlauer2022-09-104-10/+7
|\ \ | | | | | | THRIFT-5602: Use std::unique_ptr instead of boost::scoped_array
| * | THRIFT-5602: Use std::unique_ptr instead of boost::scoped_arraySutou Kouhei2022-09-094-10/+7
| |/ | | | | | | | | | | Client: cpp We can use std::unique_ptr because we require C++11 or later.
* | lib/cpp/src/thrift/transport/TFileTransport.cpp: Removed deprecated 'boost' ↵Mario Emmenlauer2022-09-091-2/+0
| | | | | | | | include
* | lib/cpp/test/CMakeLists.txt: Trivial whitespace changeMario Emmenlauer2022-09-091-2/+2
|/
* Replace ThriftTest.thrift with v0.16/ThriftTest.thrift to allow for merging ↵Jens Geyer2022-09-052-4/+4
| | | | the partially completed uuid implementation to master
* Remove execute bit from plain text files in git (#2611)Christopher Tubbs2022-05-248-0/+0
| | | | | | | Trivially change file mode from 755 to 644 for files in git that shouldn't be marked as executable. These were probably marked as executable due to some contributors developing on Windows using a filesystem that doesn't support POSIX file modes, or aggressively marks everything as executable.
* THRIFT-5093: lib: cpp: test: clarify effect of MemoryPolicy on TMemoryBufferChristopher Friedt2022-04-191-3/+249
| | | | | | | | Client: cpp Tests to clarify the effect of each MemoryPolicy on TMemoryBuffer. Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
* THRIFT-5515: TConnection::workSocket reads all pending oneway requests.Tamas Kovacs2022-03-141-122/+129
|
* Fix winsock capitalization for case sensitive cross-compilationJeremiah2022-02-086-6/+6
|
* [THRIFT-5510] On Windows NOMINMAX and WIN32_LEAN_AND_MEAN are unset even if ↵Dirk Sandbrink2022-02-041-0/+12
| | | | | set before Only define and undefine NOMINMAX and WIN32_LEAN_AND_MEAN if they have not been set before.
* Fix warning C4515: 'protocol': namespace uses itselfDirk Sandbrink2022-01-173-6/+0
| | | | This warning can been seen when compiling generated code using Visual Studio 16.11.
* THRIFT-5482: Fix memory leak during SSL handshake in C++ libraryAnshul M Gupta2021-12-061-0/+16
| | | | Client: C++
* Compile TWebSocketServer with CMake only when OpenSSL is foundKevin Wojniak2021-12-061-2/+2
| | | | When compiling the C++ library and OpenSSL wasn't found, TWebSocketServer will fail as it includes OpenSSL headers.
* THRIFT-5456 Disable SIGPIPE on TSocketServerKevin Wojniak2021-10-212-0/+22
| | | | | | | CLient: cpp Patch: Kevin Wojniak This closes #2440
* Merge pull request #2451 from BioDataAnalysis/bda_cmake_cleanupMario Emmenlauer2021-09-024-52/+57
|\ | | | | Minor cmake cleanup
| * Use modern OpenSSL cmake syntax (if available), and larger cmake cleanupMario Emmenlauer2021-09-024-52/+57
| |
* | Reduce the usage of Windows.h, and add macros to slim Windows.hMario Emmenlauer2021-09-024-4/+7
|/
* Updated TNonblockingServerSocket to better match TServerSocketMario Emmenlauer2021-09-013-50/+104
|
* Added support for Unix domain sockets on WindowsMario Emmenlauer2021-08-315-65/+69
|
* Use the cmake-generated thrift config also on MSVCMario Emmenlauer2021-08-301-2/+1
|
* TNonblockingServer.cpp: Replace deprecated bzero with memset (more portable)Mario Emmenlauer2021-08-301-1/+1
|
* Added new method isUnixDomainSocket() to check type of socketMario Emmenlauer2021-08-134-26/+48
|
* Include signal.h depending on HAVE_SIGNAL_H, not depending on __linux__Mario Emmenlauer2021-08-134-4/+7
|
* TCompactProtocol.tcc: add missing include cstdlibMario Emmenlauer2021-08-131-0/+1
|
* lib/cpp/test/CMakeLists.txt: Added missing boost::chronoMario Emmenlauer2021-08-131-1/+1
|
* TSocket.cpp: Print THRIFT_EAGAIN (timed out) to global errorMario Emmenlauer2021-08-131-0/+1
|
* lib/cpp/src/thrift/transport/TBufferTransports.h: Minor whitespace changesMario Emmenlauer2021-08-131-9/+9
|
* lib/cpp/test/ToStringTest.cpp: Disabled locale-based tests on WindowsMario Emmenlauer2021-08-121-2/+7
|
* uncaught_exception -> uncaught_exceptionsJens Geyer2021-06-301-0/+4
| | | | | | | Client: cpp Author: Rune Olesen This closes #2287
* Adds support for building C++ codegen on SolarisBenjamin Naecker2021-06-301-0/+3
| | | | | | | | | | | Client: cpp Author: Benjamin Naecker This closes #2380 Solaris-derived systems split some functionality that is usually found in `sys/ioctl.h` into `sys/filio.h`. In this case, the `FIONREAD` constant is in the latter file.
* Android restricts use of AI_V4MAPPED flag.Ruslan2021-06-231-0/+4
| | | | | | | Client: cpp Patch: Ruslan <thgall@mail.ru> This closes #2406
* Merge pull request #2401 from aaronmjones/THRIFT-3840Mario Emmenlauer2021-06-092-0/+26
|\ | | | | THRIFT-3840: C++ TJSONProtocol still using locale dependent formatting
| * Add better unit tests and imbue C locale in floating point to_stringubuntu2021-06-073-24/+24
| | | | | | | | | | | | | | | | ToStringTest.cpp is a better place than JSONProtoTest.cpp for to_string tests. Move global locale-related unit tests there. Also imbue the C locale in the floating point to_string functions to avoid decimal number strings formatted with comma instead of decimal point. In Dockerfiles, install de_DE locale because it uses decimal comma.