summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-03-04 08:44:53 +0000
committerJon A. Cruz <jon@joncruz.org>2010-03-04 08:44:53 +0000
commit46fd0e8c49da44226151096546905589819bbdf5 (patch)
treec9f48e2a3dfbf78059b8fdb236f4ff08ef6ca494 /src/util
parentRemoved unused static pixmap reference. (diff)
downloadinkscape-46fd0e8c49da44226151096546905589819bbdf5.tar.gz
inkscape-46fd0e8c49da44226151096546905589819bbdf5.zip
Fixing build breakage with more proper autoconf usage.
(bzr r9138)
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Makefile_insert1
-rw-r--r--src/util/set-types.h55
2 files changed, 56 insertions, 0 deletions
diff --git a/src/util/Makefile_insert b/src/util/Makefile_insert
index 87a974768..3d3c88940 100644
--- a/src/util/Makefile_insert
+++ b/src/util/Makefile_insert
@@ -16,6 +16,7 @@ ink_common_sources += \
util/map-list.h \
util/mathfns.h \
util/reverse-list.h \
+ util/set-types.h \
util/share.h \
util/share.cpp \
util/tuple.h \
diff --git a/src/util/set-types.h b/src/util/set-types.h
new file mode 100644
index 000000000..f6752fb64
--- /dev/null
+++ b/src/util/set-types.h
@@ -0,0 +1,55 @@
+#ifndef SEEN_SET_TYPES_H
+#define SEEN_SET_TYPES_H
+
+
+/** @file
+ * Simple wrapper to disambiguate hash/unordered lists & sets.
+ */
+/* Authors:
+ * Jon A. Cruz <jon@joncruz.org>
+ *
+ * Copyright (C) 2010 Authors
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#if defined(HAVE_TR1_UNORDERED_SET)
+
+# include <tr1/unordered_set>
+# include <tr1/unordered_map>
+# define optim_set std::tr1::unordered_set
+# define optim_map std::tr1::unordered_map
+
+// TODO test on platform with this detected:
+//#elif defined(HAVE_UNORDERED_SET)
+//
+//# include <unordered_set>
+//# include <unordered_map>
+//#define optim_set std::unordered_set
+//#define optim_map std::unordered_map
+
+#elif defined(HAVE_EXT_HASH_SET)
+
+# include <ext/hash_set>
+# include <ext/hash_map>
+# define optim_set __gnu_cxx::hash_set
+# define optim_map __gnu_cxx::hash_map
+# define USE_GNU_HASHES 1
+
+#endif
+
+
+#endif // SEEN_SET_TYPES_H
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :