Initial CVS checkin of gold
[deliverable/binutils-gdb.git] / gold / gold.h
CommitLineData
bae7f79e
ILT
1// gold.h -- general definitions for gold -*- C++ -*-
2
3#ifndef GOLD_GOLD_H
4
5#include "config.h"
6#include "ansidecl.h"
7
8#ifdef ENABLE_NLS
9# include <libintl.h>
10# define _(String) gettext (String)
11# ifdef gettext_noop
12# define N_(String) gettext_noop (String)
13# else
14# define N_(String) (String)
15# endif
16#else
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)
24#endif
25
26// Figure out how to get a hash set and a hash map. The fallback is
27// to just use set and map.
28
29#include <tr1/unordered_set>
30#include <tr1/unordered_map>
31
32// We need a template typedef here.
33
34#define Unordered_set std::tr1::unordered_set
35#define Unordered_map std::tr1::unordered_map
36
37namespace gold
38{
39
40// The name of the program as used in error messages.
41extern const char* program_name;
42
43// This function is called to exit the program. Status is true to
44// exit success (0) and false to exit failure (1).
45extern void
46gold_exit(bool status) ATTRIBUTE_NORETURN;
47
48// This function is called to emit an unexpected error message and a
49// newline, and then exit with failure. If PERRNO is true, it reports
50// the error in errno.
51extern void
52gold_fatal(const char* msg, bool perrno) ATTRIBUTE_NORETURN;
53
54// This is function is called in some cases if we run out of memory.
55extern void
56gold_nomem() ATTRIBUTE_NORETURN;
57
58// This function is called in cases which can not arise if the code is
59// written correctly.
60extern void
61gold_unreachable() ATTRIBUTE_NORETURN;
62
63} // End namespace gold.
64
65#endif // !defined(GOLD_GOLD_H)
This page took 0.025339 seconds and 4 git commands to generate.