forked from lix-project/lix
* If std::tr1::unordered_set is unavailable, use std::set.
This commit is contained in:
parent
36a23e86b6
commit
95f4f2cf61
|
@ -140,11 +140,18 @@ AC_LANG_POP(C++)
|
|||
AC_CHECK_HEADER([err.h], [], [bsddiff_compat_include="-Icompat-include"])
|
||||
AC_SUBST([bsddiff_compat_include])
|
||||
|
||||
|
||||
# Check whether we have the personality() syscall, which allows us to
|
||||
# do i686-linux builds on x86_64-linux machines.
|
||||
AC_CHECK_HEADERS([sys/personality.h])
|
||||
|
||||
|
||||
# Check for tr1/unordered_set.
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CHECK_HEADERS([tr1/unordered_set], [], [], [])
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
|
||||
AC_DEFUN([NEED_PROG],
|
||||
[
|
||||
AC_PATH_PROG($1, $2)
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#ifndef __SYMBOL_TABLE_H
|
||||
#define __SYMBOL_TABLE_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
#if HAVE_TR1_UNORDERED_SET
|
||||
#include <tr1/unordered_set>
|
||||
#endif
|
||||
|
||||
#include "types.hh"
|
||||
|
||||
|
@ -60,7 +65,11 @@ inline std::ostream & operator << (std::ostream & str, const Symbol & sym)
|
|||
class SymbolTable
|
||||
{
|
||||
private:
|
||||
#if HAVE_TR1_UNORDERED_SET
|
||||
typedef std::tr1::unordered_set<string> Symbols;
|
||||
#else
|
||||
typedef std::set<string> Symbols;
|
||||
#endif
|
||||
Symbols symbols;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue