Skip to content

Commit

Permalink
Fix compile errors in the absence of std::unordered_set
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeth committed Apr 14, 2022
1 parent 19c0ca7 commit 886513f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ChangeLog for eix - Ebuild IndeX for portage

*eix-0.36.2
Martin Väth <martin at mvath.de>:
- Fix compile errors in the absence of std::unordered_set, see
https://bugs.gentoo.org/838358

*eix-0.36.1
Jannik Glückert <https://github.com/Jannik2099>:
- Remove unsupported ATTRIBUTE_SIGNAL
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dnl each item is listed in a separate line with indent level increased;
dnl in such a case the opening/closing braces are isolated.
dnl 2. The AC_INIT macro must be in one line since it is parsed by
dnl primitive scripts.
AC_INIT([eix], [0.36.1], [https://github.com/vaeth/eix/issues/], [eix], [https://github.com/vaeth/eix/])
AC_INIT([eix], [0.36.2], [https://github.com/vaeth/eix/issues/], [eix], [https://github.com/vaeth/eix/])
AC_PREREQ([2.64])

m4_ifdef([AC_CONFIG_MACRO_DIR],
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('eix', 'cpp',
version : '0.36.1',
version : '0.36.2',
license : 'GPLv2',
default_options : [
'prefix=/usr',
Expand Down
2 changes: 2 additions & 0 deletions src/eixTk/stringutils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,11 @@ void split_string(WordSet *vec, const string& str, bool handle_escape, const cha
split_string_template<WordSet>(vec, str, handle_escape, at, ignore_empty);
}

#ifdef HAVE_UNORDERED_SET
void split_string(WordUnorderedSet *vec, const string& str, bool handle_escape, const char *at, bool ignore_empty) {
split_string_template<WordUnorderedSet>(vec, str, handle_escape, at, ignore_empty);
}
#endif

WordVec split_string(const string& str, bool handle_escape, const char *at, bool ignore_empty) {
WordVec vec;
Expand Down
38 changes: 20 additions & 18 deletions src/eixTk/stringutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,44 +207,46 @@ Split a string into multiple strings.
removing escapes for \\ or "at" symbols from result.
**/
ATTRIBUTE_NONNULL_ void split_string(WordVec *vec, const std::string& str, bool handle_escape, const char *at, bool ignore_empty);
ATTRIBUTE_NONNULL_ void split_string(WordSet *vec, const std::string& str, bool handle_escape, const char *at, bool ignore_empty);
ATTRIBUTE_NONNULL_ void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape, const char *at, bool ignore_empty);
ATTRIBUTE_NONNULL_ inline static void split_string(WordVec *vec, const std::string& str, bool handle_escape, const char *at);
inline static void split_string(WordVec *vec, const std::string& str, bool handle_escape, const char *at) {
split_string(vec, str, handle_escape, at, true);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordSet *vec, const std::string& str, bool handle_escape, const char *at);
inline static void split_string(WordSet *vec, const std::string& str, bool handle_escape, const char *at) {
split_string(vec, str, handle_escape, at, true);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape, const char *at);
inline static void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape, const char *at) {
split_string(vec, str, handle_escape, at, true);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordVec *vec, const std::string& str, bool handle_escape);
inline static void split_string(WordVec *vec, const std::string& str, bool handle_escape) {
split_string(vec, str, handle_escape, spaces);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordSet *vec, const std::string& str, bool handle_escape);
inline static void split_string(WordSet *vec, const std::string& str, bool handle_escape) {
split_string(vec, str, handle_escape, spaces);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape);
inline static void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape) {
split_string(vec, str, handle_escape, spaces);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordVec *vec, const std::string& str);
inline static void split_string(WordVec *vec, const std::string& str) {
split_string(vec, str, false);
}
ATTRIBUTE_NONNULL_ void split_string(WordSet *vec, const std::string& str, bool handle_escape, const char *at, bool ignore_empty);
ATTRIBUTE_NONNULL_ inline static void split_string(WordSet *vec, const std::string& str, bool handle_escape, const char *at);
inline static void split_string(WordSet *vec, const std::string& str, bool handle_escape, const char *at) {
split_string(vec, str, handle_escape, at, true);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordSet *vec, const std::string& str, bool handle_escape);
inline static void split_string(WordSet *vec, const std::string& str, bool handle_escape) {
split_string(vec, str, handle_escape, spaces);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordSet *vec, const std::string& str);
inline static void split_string(WordSet *vec, const std::string& str) {
split_string(vec, str, false);
}
#ifdef HAVE_UNORDERED_SET
ATTRIBUTE_NONNULL_ void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape, const char *at, bool ignore_empty);
ATTRIBUTE_NONNULL_ inline static void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape, const char *at);
inline static void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape, const char *at) {
split_string(vec, str, handle_escape, at, true);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape);
inline static void split_string(WordUnorderedSet *vec, const std::string& str, bool handle_escape) {
split_string(vec, str, handle_escape, spaces);
}
ATTRIBUTE_NONNULL_ inline static void split_string(WordUnorderedSet *vec, const std::string& str);
inline static void split_string(WordUnorderedSet *vec, const std::string& str) {
split_string(vec, str, false);
}
#endif

/**
Check if slot contains a subslot and if yes, split it away.
Expand Down

0 comments on commit 886513f

Please sign in to comment.