// system.h -- general definitions for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+// Copyright (C) 2006-2020 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
# define _LIBGETTEXT_H
#endif
-// Always include <clocale> first to avoid conflicts with the macros
-// used when ENABLE_NLS is not defined.
-#include <clocale>
-
#ifdef ENABLE_NLS
+// On some systems, things go awry when <libintl.h> comes after <clocale>.
# include <libintl.h>
+# include <clocale>
# define _(String) gettext (String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# define N_(String) (String)
# endif
#else
+// Include <clocale> first to avoid conflicts with these macros.
+# include <clocale>
# define gettext(Msgid) (Msgid)
# define dgettext(Domainname, Msgid) (Msgid)
# define dcgettext(Domainname, Msgid, Category) (Msgid)
-# define textdomain(Domainname) do {} while (0) /* nothing */
-# define bindtextdomain(Domainname, Dirname) do {} while (0) /* nothing */
+# define ngettext(Msgid1, Msgid2, n) \
+ (n == 1 ? Msgid1 : Msgid2)
+# define dngettext(Domainname, Msgid1, Msgid2, n) \
+ (n == 1 ? Msgid1 : Msgid2)
+# define dcngettext(Domainname, Msgid1, Msgid2, n, Category) \
+ (n == 1 ? Msgid1 : Msgid2)
+# define textdomain(Domainname) do {} while (0)
+# define bindtextdomain(Domainname, Dirname) do {} while (0)
# define _(String) (String)
# define N_(String) (String)
#endif
// Figure out how to get a hash set and a hash map.
-#if defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \
- && defined(HAVE_TR1_UNORDERED_MAP_REHASH)
+#if defined(HAVE_UNORDERED_SET) && defined(HAVE_UNORDERED_MAP)
+
+#include <unordered_set>
+#include <unordered_map>
+
+// We need a template typedef here.
+
+#define Unordered_set std::unordered_set
+#define Unordered_map std::unordered_map
+#define Unordered_multimap std::unordered_multimap
+
+#define reserve_unordered_map(map, n) ((map)->rehash(n))
+
+#elif defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \
+ && defined(HAVE_TR1_UNORDERED_MAP_REHASH)
#include <tr1/unordered_set>
#include <tr1/unordered_map>