Skip to content

Commit d19f4ac

Browse files
committed
cxxtools: support building with -std=c++20 and reorder patches
From upstream: maekitalo/cxxtools@354ddfe
1 parent 6b32d19 commit d19f4ac

7 files changed

+43
-0
lines changed

packages/addons/addon-depends/cxxtools/patches/cxxtools-2.2-Char_operator_eq_unsigned_int.patch renamed to packages/addons/addon-depends/cxxtools/patches/cxxtools-0001-2.2-Char_operator_eq_unsigned_int.patch

File renamed without changes.

packages/addons/addon-depends/cxxtools/patches/cxxtools-2.2-hdstream_stdio.patch renamed to packages/addons/addon-depends/cxxtools/patches/cxxtools-0002-2.2-hdstream_stdio.patch

File renamed without changes.

packages/addons/addon-depends/cxxtools/patches/cxxtools-2.2.1-make-cxxtools-char-a-trivial-class-by-defining-the-default.patch renamed to packages/addons/addon-depends/cxxtools/patches/cxxtools-0003-2.2.1-make-cxxtools-char-a-trivial-class-by-defining-the-default.patch

File renamed without changes.

packages/addons/addon-depends/cxxtools/patches/cxxtools-3.0-gcc12-time.patch renamed to packages/addons/addon-depends/cxxtools/patches/cxxtools-0004-3.0-gcc12-time.patch

File renamed without changes.

packages/addons/addon-depends/cxxtools/patches/cxxtools-3.0-lld-linking-openssl.patch renamed to packages/addons/addon-depends/cxxtools/patches/cxxtools-0005-3.0-lld-linking-openssl.patch

File renamed without changes.

packages/addons/addon-depends/cxxtools/patches/cxxtools-crosscompile.patch renamed to packages/addons/addon-depends/cxxtools/patches/cxxtools-0006-crosscompile.patch

File renamed without changes.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From 354ddfecd33067d8aac339437defdcf0b8c32b68 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Tommi=20M=C3=A4kitalo?= <tommi@tntnet.org>
3+
Date: Tue, 25 Apr 2023 13:44:17 +0200
4+
Subject: [PATCH] Fix for C++20
5+
6+
some typedefs are removed from std::allocator
7+
---
8+
include/cxxtools/string.h | 8 ++++----
9+
src/charmapcodec.cpp | 2 +-
10+
2 files changed, 5 insertions(+), 5 deletions(-)
11+
12+
diff --git a/include/cxxtools/string.h b/include/cxxtools/string.h
13+
index e8ea4f25..020bb043 100644
14+
--- a/include/cxxtools/string.h
15+
+++ b/include/cxxtools/string.h
16+
@@ -51,10 +51,10 @@ class basic_string< cxxtools::Char > {
17+
typedef char_traits< cxxtools::Char > traits_type;
18+
typedef std::allocator<cxxtools::Char> allocator_type;
19+
typedef allocator_type::difference_type difference_type;
20+
- typedef allocator_type::reference reference;
21+
- typedef allocator_type::const_reference const_reference;
22+
- typedef allocator_type::pointer pointer;
23+
- typedef allocator_type::const_pointer const_pointer;
24+
+ typedef value_type& reference;
25+
+ typedef const value_type& const_reference;
26+
+ typedef value_type* pointer;
27+
+ typedef const value_type* const_pointer;
28+
typedef value_type* iterator;
29+
typedef const value_type* const_iterator;
30+
31+
diff --git a/src/charmapcodec.cpp b/src/charmapcodec.cpp
32+
index 5eb08136..2e01b2a9 100644
33+
--- a/src/charmapcodec.cpp
34+
+++ b/src/charmapcodec.cpp
35+
@@ -82,7 +82,7 @@ CharMapCodec::result CharMapCodec::do_out(MBState& /*s*/, const Char* fromBegin,
36+
while (fromNext < fromEnd && toNext < toEnd)
37+
{
38+
*toNext = toChar(_charMap, *fromNext);
39+
- log_debug(fromNext->value() << " => " << static_cast<unsigned>(static_cast<unsigned char>(*toNext)));
40+
+ log_debug(static_cast<unsigned>(fromNext->value()) << " => " << static_cast<unsigned>(static_cast<unsigned char>(*toNext)));
41+
++fromNext;
42+
++toNext;
43+
}

0 commit comments

Comments
 (0)