|
| 1 | +--- contrib/restricted/abseil-cpp/absl/base/internal/sysinfo.cc (index) |
| 2 | ++++ contrib/restricted/abseil-cpp/absl/base/internal/sysinfo.cc (working tree) |
| 3 | +@@ -50,6 +50,10 @@ |
| 4 | + #include <zircon/process.h> |
| 5 | + #endif |
| 6 | + |
| 7 | ++#if defined(__FREERTOS__) |
| 8 | ++#include <task.h> |
| 9 | ++#endif |
| 10 | ++ |
| 11 | + #include <string.h> |
| 12 | + |
| 13 | + #include <cassert> |
| 14 | +@@ -466,6 +470,12 @@ pid_t GetTID() { |
| 15 | + return static_cast<pid_t>(zx_thread_self()); |
| 16 | + } |
| 17 | + |
| 18 | ++#elif defined(__FREERTOS__) |
| 19 | ++ |
| 20 | ++pid_t GetTID() { |
| 21 | ++ return static_cast<pid_t>(uxTaskGetTaskNumber(xTaskGetCurrentTaskHandle())); |
| 22 | ++} |
| 23 | ++ |
| 24 | + #else |
| 25 | + |
| 26 | + // Fallback implementation of `GetTID` using `pthread_self`. |
| 27 | +--- contrib/restricted/abseil-cpp/absl/debugging/internal/elf_mem_image.h (index) |
| 28 | ++++ contrib/restricted/abseil-cpp/absl/debugging/internal/elf_mem_image.h (working tree) |
| 29 | +@@ -35,7 +35,7 @@ |
| 30 | + #if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \ |
| 31 | + !defined(__asmjs__) && !defined(__wasm__) && !defined(__HAIKU__) && \ |
| 32 | + !defined(__sun) && !defined(__VXWORKS__) && !defined(__hexagon__) && \ |
| 33 | +- !defined(__XTENSA__) |
| 34 | ++ !defined(__XTENSA__) && !defined(__FREERTOS__) |
| 35 | + #define ABSL_HAVE_ELF_MEM_IMAGE 1 |
| 36 | + #endif |
| 37 | + |
| 38 | +--- contrib/restricted/abseil-cpp/absl/log/internal/log_message.cc (index) |
| 39 | ++++ contrib/restricted/abseil-cpp/absl/log/internal/log_message.cc (working tree) |
| 40 | +@@ -221,13 +221,13 @@ LogMessage::LogMessageData::LogMessageData(absl::string_view file, |
| 41 | + void LogMessage::LogMessageData::InitializeEncodingAndFormat() { |
| 42 | + EncodeStringTruncate(EventTag::kFileName, entry.source_filename(), |
| 43 | + &encoded_remaining()); |
| 44 | +- EncodeVarint(EventTag::kFileLine, entry.source_line(), &encoded_remaining()); |
| 45 | ++ EncodeVarint(EventTag::kFileLine, static_cast<int32_t>(entry.source_line()), &encoded_remaining()); |
| 46 | + EncodeVarint(EventTag::kTimeNsecs, absl::ToUnixNanos(entry.timestamp()), |
| 47 | + &encoded_remaining()); |
| 48 | + EncodeVarint(EventTag::kSeverity, |
| 49 | + ProtoSeverity(entry.log_severity(), entry.verbosity()), |
| 50 | + &encoded_remaining()); |
| 51 | +- EncodeVarint(EventTag::kThreadId, entry.tid(), &encoded_remaining()); |
| 52 | ++ EncodeVarint(EventTag::kThreadId, static_cast<int32_t>(entry.tid()), &encoded_remaining()); |
| 53 | + } |
| 54 | + |
| 55 | + void LogMessage::LogMessageData::FinalizeEncodingAndFormat() { |
| 56 | +--- contrib/restricted/abseil-cpp/absl/log/internal/proto.h (index) |
| 57 | ++++ contrib/restricted/abseil-cpp/absl/log/internal/proto.h (working tree) |
| 58 | +@@ -79,6 +79,9 @@ inline bool EncodeVarint(uint64_t tag, uint32_t value, absl::Span<char> *buf) { |
| 59 | + inline bool EncodeVarint(uint64_t tag, int32_t value, absl::Span<char> *buf) { |
| 60 | + return EncodeVarint(tag, static_cast<uint64_t>(value), buf); |
| 61 | + } |
| 62 | ++inline bool EncodeVarint(uint64_t tag, bool value, absl::Span<char> *buf) { |
| 63 | ++ return EncodeVarint(tag, static_cast<uint64_t>(value), buf); |
| 64 | ++} |
| 65 | + |
| 66 | + // Encodes the specified integer as a varint field using ZigZag encoding and |
| 67 | + // returns true if it fits. |
| 68 | +--- contrib/restricted/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc (index) |
| 69 | ++++ contrib/restricted/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc (working tree) |
| 70 | +@@ -81,6 +81,15 @@ auto tm_zone(const std::tm& tm) -> decltype(tzname[0]) { |
| 71 | + const bool is_dst = tm.tm_isdst > 0; |
| 72 | + return tzname[is_dst]; |
| 73 | + } |
| 74 | ++#elif defined(__FREERTOS__) |
| 75 | ++long int tm_gmtoff(const std::tm& tm) { |
| 76 | ++ (void)tm; |
| 77 | ++ return 0; |
| 78 | ++} |
| 79 | ++const char* tm_zone(const std::tm& tm) { |
| 80 | ++ (void)tm; |
| 81 | ++ return "UTC"; |
| 82 | ++} |
| 83 | + #else |
| 84 | + // Adapt to different spellings of the struct std::tm extension fields. |
| 85 | + #if defined(tm_gmtoff) |
0 commit comments