1 // gold.h -- general definitions for gold -*- C++ -*-
10 # define _(String) gettext (String)
12 # define N_(String) gettext_noop (String)
14 # define N_(String) (String)
17 # define gettext(Msgid) (Msgid)
18 # define dgettext(Domainname, Msgid) (Msgid)
19 # define dcgettext(Domainname, Msgid, Category) (Msgid)
20 # define textdomain(Domainname) while (0) /* nothing */
21 # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
22 # define _(String) (String)
23 # define N_(String) (String)
26 // Figure out how to get a hash set and a hash map.
28 #if defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP)
30 #include <tr1/unordered_set>
31 #include <tr1/unordered_map>
33 // We need a template typedef here.
35 #define Unordered_set std::tr1::unordered_set
36 #define Unordered_map std::tr1::unordered_map
38 #elif defined(HAVE_EXT_HASH_MAP) && defined(HAVE_EXT_HASH_SET)
40 #include <ext/hash_map>
41 #include <ext/hash_set>
44 #define Unordered_set __gnu_cxx::hash_set
45 #define Unordered_map __gnu_cxx::hash_map
51 struct hash
<std::string
>
54 operator()(std::string s
) const
55 { return __stl_hash_string(s
.c_str()); }
62 operator()(T
* p
) const
63 { return reinterpret_cast<size_t>(p
); }
70 // The fallback is to just use set and map.
75 #define Unordered_set std::set
76 #define Unordered_map std::map
83 // The name of the program as used in error messages.
84 extern const char* program_name
;
86 // This function is called to exit the program. Status is true to
87 // exit success (0) and false to exit failure (1).
89 gold_exit(bool status
) ATTRIBUTE_NORETURN
;
91 // This function is called to emit an unexpected error message and a
92 // newline, and then exit with failure. If PERRNO is true, it reports
93 // the error in errno.
95 gold_fatal(const char* msg
, bool perrno
) ATTRIBUTE_NORETURN
;
97 // This is function is called in some cases if we run out of memory.
99 gold_nomem() ATTRIBUTE_NORETURN
;
101 // This function is called in cases which can not arise if the code is
102 // written correctly.
104 gold_unreachable() ATTRIBUTE_NORETURN
;
106 } // End namespace gold.
108 #endif // !defined(GOLD_GOLD_H)
This page took 0.03225 seconds and 5 git commands to generate.