* Many files: Added gettext invocations around user-visible
[deliverable/binutils-gdb.git] / binutils / bucomm.h
1 /* bucomm.h -- binutils common include file.
2 Copyright (C) 1992, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
3
4 This file is part of GNU Binutils.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19 \f
20 #ifndef _BUCOMM_H
21 #define _BUCOMM_H
22
23 #include "ansidecl.h"
24 #include <stdio.h>
25 #include <sys/types.h>
26
27 #include "config.h"
28
29 #ifdef USE_BINARY_FOPEN
30 #include "fopen-bin.h"
31 #else
32 #include "fopen-same.h"
33 #endif
34
35 #include <errno.h>
36 #ifndef errno
37 extern int errno;
38 #endif
39
40 #ifdef HAVE_UNISTD_H
41 #include <unistd.h>
42 #endif
43
44 #ifdef HAVE_STRING_H
45 #include <string.h>
46 #else
47 #ifdef HAVE_STRINGS_H
48 #include <strings.h>
49 #else
50 extern char *strchr ();
51 extern char *strrchr ();
52 #endif
53 #endif
54
55 #ifdef HAVE_STDLIB_H
56 #include <stdlib.h>
57 #endif
58
59 #ifdef HAVE_FCNTL_H
60 #include <fcntl.h>
61 #else
62 #ifdef HAVE_SYS_FILE_H
63 #include <sys/file.h>
64 #endif
65 #endif
66
67 #ifdef NEED_DECLARATION_STRSTR
68 extern char *strstr ();
69 #endif
70
71 #ifdef HAVE_SBRK
72 #ifdef NEED_DECLARATION_SBRK
73 extern char *sbrk ();
74 #endif
75 #endif
76
77 #ifdef NEED_DECLARATION_GETENV
78 extern char *getenv ();
79 #endif
80
81 #ifndef O_RDONLY
82 #define O_RDONLY 0
83 #endif
84
85 #ifndef O_RDWR
86 #define O_RDWR 2
87 #endif
88
89 #ifndef SEEK_SET
90 #define SEEK_SET 0
91 #endif
92 #ifndef SEEK_CUR
93 #define SEEK_CUR 1
94 #endif
95 #ifndef SEEK_END
96 #define SEEK_END 2
97 #endif
98
99 #ifdef __GNUC__
100 # undef alloca
101 # define alloca __builtin_alloca
102 #else
103 # if HAVE_ALLOCA_H
104 # include <alloca.h>
105 # else
106 # ifndef alloca /* predefined by HP cc +Olibcalls */
107 # if !defined (__STDC__) && !defined (__hpux)
108 char *alloca ();
109 # else
110 void *alloca ();
111 # endif /* __STDC__, __hpux */
112 # endif /* alloca */
113 # endif /* HAVE_ALLOCA_H */
114 #endif
115
116 #ifdef ENABLE_NLS
117 #include <libintl.h>
118 #define _(String) gettext (String)
119 #ifdef gettext_noop
120 #define N_(String) gettext_noop (String)
121 #else
122 #define N_(String) (String)
123 #endif
124 #else
125 /* Stubs that do something close enough. */
126 #define textdomain(String) (String)
127 #define gettext(String) (String)
128 #define dgettext(Domain,Message) (Message)
129 #define dcgettext(Domain,Message,Type) (Message)
130 #define bindtextdomain(Domain,Directory) (Domain)
131 #define _(String) (String)
132 #define N_(String) (String)
133 /* In this case we don't care about the value. */
134 #ifndef LC_MESSAGES
135 #define LC_MESSAGES 0
136 #endif
137 #endif
138
139 /* bucomm.c */
140 void bfd_nonfatal PARAMS ((CONST char *));
141
142 void bfd_fatal PARAMS ((CONST char *));
143
144 void fatal PARAMS ((CONST char *, ...));
145
146 void set_default_bfd_target PARAMS ((void));
147
148 void list_matching_formats PARAMS ((char **p));
149
150 void list_supported_targets PARAMS ((const char *, FILE *));
151
152 void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose));
153
154 char *make_tempname PARAMS ((char *));
155
156 bfd_vma parse_vma PARAMS ((const char *, const char *));
157
158 extern char *program_name;
159
160 /* filemode.c */
161 void mode_string PARAMS ((unsigned long mode, char *buf));
162
163 /* version.c */
164 extern void print_version PARAMS ((const char *));
165
166 /* libiberty */
167 PTR xmalloc PARAMS ((size_t));
168
169 PTR xrealloc PARAMS ((PTR, size_t));
170
171 #endif /* _BUCOMM_H */
This page took 0.057855 seconds and 5 git commands to generate.