summaryrefslogtreecommitdiff
path: root/lib/cpp/src
Commit message (Collapse)AuthorAgeFilesLines
* lib/cpp: Fix MSVC warning C4706 (BinaryProtocol)dejank-isystem2023-02-211-2/+2
| | | MSVC warning C4706: assignment within conditional expression
* 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: 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 #2630 from kou/cpp-scoped-array-to-unique-ptrMario Emmenlauer2022-09-103-9/+6
|\ | | | | THRIFT-5602: Use std::unique_ptr instead of boost::scoped_array
| * THRIFT-5602: Use std::unique_ptr instead of boost::scoped_arraySutou Kouhei2022-09-093-9/+6
| | | | | | | | | | | | 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
* THRIFT-5515: TConnection::workSocket reads all pending oneway requests.Tamas Kovacs2022-03-141-122/+129
|
* Fix winsock capitalization for case sensitive cross-compilationJeremiah2022-02-085-5/+5
|
* [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++
* 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-021-2/+2
|\ | | | | Minor cmake cleanup
| * Use modern OpenSSL cmake syntax (if available), and larger cmake cleanupMario Emmenlauer2021-09-021-2/+2
| |
* | 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
|
* TCompactProtocol.tcc: add missing include cstdlibMario Emmenlauer2021-08-131-0/+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
|
* 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-091-0/+5
|\ | | | | THRIFT-3840: C++ TJSONProtocol still using locale dependent formatting
| * Add better unit tests and imbue C locale in floating point to_stringubuntu2021-06-071-0/+3
| | | | | | | | | | | | | | | | 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.
| * Add unit test for system locale with thousands separator commaubuntu2021-05-311-0/+2
| | | | | | | | Install en_US.UTF-8 locale in Dockerfile
* | Robustness improvements when loading OpenSSL certificatesMarco Schroeter2021-06-041-9/+24
|/
* consume remaining MessageSize but never reset, we should reset remainin ↵Irelian2021-05-151-0/+1
| | | | | | | | | MessageSize after readEnd Client: cpp Patch: Irelian <240290942@qq.com> This closes #2390
* THRIFT-5355 Do not rely on compiler and check boundariesTriton2021-02-191-1/+5
| | | | | | | Client: cpp Patch: Triton <19377203+EnigmaTriton@users.noreply.github.com> This closes #2305
* Added TNonCopyable.h in favor of boost dependencyMario Emmenlauer2021-02-1210-23/+67
|
* CMake: Pass linker dependencies transitively to downstream projectsMario Emmenlauer2021-02-121-2/+2
|
* THRIFT-5237 Implement MAX_MESSAGE_SIZE and consolidate limits into a ↵Jens Geyer2021-02-031-3/+3
| | | | | | | | | TConfiguration class (cpp) Client: cpp Patch: Jens Geyer Fixes an issue introduced with that ticket
* TServerSocket.cpp::isOpen(): Check that a domain socket file already existsMario Emmenlauer2020-12-191-0/+32
|
* THRIFT-5295 makeThread and ThreadFactory extensiblerglarix2020-12-082-8/+15
| | | | | | | | | Client: cpp Patch: Riccardo Ghetta This closes #2260 Signed-off-by: rglarix <rglarix@users.noreply.github.com>
* Make ~TException() virtualMario Emmenlauer2020-12-031-1/+1
| | | | | | | Client: cpp Patch: Mario Emmenlauer This closes #2281
* Merge pull request #2235 from deiv/fix-abstract-unix-socket-nameZezeng Wang2020-09-225-68/+154
|\ | | | | Fix abstract unix socket name
| * Fix abstract unix socket nameDavid Suárez2020-09-215-68/+154
| | | | | | | | | | | | | | | | | | For the abstract unix socket address type, the string in the 'sun_path' field of the 'sockaddr_un' struct, is a not null-terminated string (see unix(7)). Fix the lentgh calculation of the 'sun_path' field to not add the termination null byte.
* | TServerSocket.cpp: Ensure the server is really listening (via helper ↵Mario Emmenlauer2020-09-151-2/+8
| | | | | | | | | | | | | | | | | | variable listening_) Client: cpp Patch: Mario Emmenlauer This closes #2232
* | Added getter and setter for domain socket path, and minor fix for printing ↵Mario Emmenlauer2020-09-152-2/+29
| | | | | | | | | | | | | | | | | | abstract domain socket paths Client: cpp Patch: Mario Emmenlauer This closes #2233
* | Deprecated WinXP and Server2003 methodsMario Emmenlauer2020-09-123-70/+4
|/ | | | | | | Client: cpp Patch: Mario Emmenlauer This closes #2165