summaryrefslogtreecommitdiff
path: root/freefilesync/ffs_no_gcc12.patch
diff options
context:
space:
mode:
Diffstat (limited to 'freefilesync/ffs_no_gcc12.patch')
-rw-r--r--freefilesync/ffs_no_gcc12.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/freefilesync/ffs_no_gcc12.patch b/freefilesync/ffs_no_gcc12.patch
new file mode 100644
index 0000000..88b0d27
--- /dev/null
+++ b/freefilesync/ffs_no_gcc12.patch
@@ -0,0 +1,72 @@
+Message: Because we do not use gcc 12, we have an error with unordered_map and std::pair.
+Author: zensubz
+Date-Modified: 2022-05-24
+Version: 11.21
+--- a/FreeFileSync/Source/base/db_file.cpp
++++ b/FreeFileSync/Source/base/db_file.cpp
+@@ -642,7 +642,7 @@
+
+ void process(const ContainerObject::FolderList& currentFolders, const Zstring& parentRelPath, InSyncFolder::FolderList& dbFolders)
+ {
+- std::unordered_map<ZstringNorm, const FolderPair*> toPreserve;
++ std::map<ZstringNorm, const FolderPair*> toPreserve;
+
+ for (const FolderPair& folder : currentFolders)
+ if (!folder.isPairEmpty())
+--- a/FreeFileSync/Source/base/db_file.h
++++ b/FreeFileSync/Source/base/db_file.h
+@@ -67,9 +67,9 @@
+ InSyncStatus status = DIR_STATUS_STRAW_MAN;
+
+ //------------------------------------------------------------------
+- using FolderList = std::unordered_map<ZstringNorm, InSyncFolder >; //
+- using FileList = std::unordered_map<ZstringNorm, InSyncFile >; // key: file name (ignoring Unicode normal forms)
+- using SymlinkList = std::unordered_map<ZstringNorm, InSyncSymlink>; //
++ using FolderList = std::map<ZstringNorm, InSyncFolder >; //
++ using FileList = std::map<ZstringNorm, InSyncFile >; // key: file name (ignoring Unicode normal forms)
++ using SymlinkList = std::map<ZstringNorm, InSyncSymlink>; //
+ //------------------------------------------------------------------
+
+ FolderList folders;
+--- a/FreeFileSync/Source/base/file_hierarchy.h
++++ b/FreeFileSync/Source/base/file_hierarchy.h
+@@ -7,12 +7,14 @@
+ #ifndef FILE_HIERARCHY_H_257235289645296
+ #define FILE_HIERARCHY_H_257235289645296
+
++#include <map>
+ #include <string>
+ #include <memory>
+ #include <list>
+ #include <functional>
+ #include <unordered_set>
+-#include <unordered_map>
++#include <zen/zstring.h>
++#include <zen/stl_tools.h>
+ #include "structures.h"
+ #include "path_filter.h"
+ #include "../afs/abstract.h"
+@@ -94,9 +96,9 @@
+ //------------------------------------------------------------------
+ //key: raw file name, without any (Unicode) normalization, preserving original upper-/lower-case
+ //"Changing data [...] to NFC would cause interoperability problems. Always leave data as it is."
+- using FolderList = std::unordered_map<Zstring, std::pair<FolderAttributes, FolderContainer>>;
+- using FileList = std::unordered_map<Zstring, FileAttributes>;
+- using SymlinkList = std::unordered_map<Zstring, LinkAttributes>;
++ using FolderList = std::map<Zstring, std::pair<FolderAttributes, FolderContainer>>;
++ using FileList = std::map<Zstring, FileAttributes>;
++ using SymlinkList = std::map<Zstring, LinkAttributes>;
+ //------------------------------------------------------------------
+
+ FolderContainer() = default;
+--- a/zen/json.h
++++ b/zen/json.h
+@@ -41,7 +41,7 @@
+
+ Type type = Type::null;
+ std::string primVal; //for primitive types
+- std::unordered_map<std::string, JsonValue> objectVal; //"[...] most implementations of JSON libraries do not accept duplicate keys [...]" => fine!
++ std::map<std::string, JsonValue> objectVal; //"[...] most implementations of JSON libraries do not accept duplicate keys [...]" => fine!
+ std::vector<JsonValue> arrayVal;
+ };
+
bgstack15