x
[deliverable/binutils-gdb.git] / binutils / bucomm.h
CommitLineData
096aefc0 1/* bucomm.h -- binutils common include file.
9d04d618 2 Copyright (C) 1992, 93, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
096aefc0
KR
3
4This file is part of GNU Binutils.
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
9d04d618 18Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
096aefc0 19\f
9d04d618
TT
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
37extern 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
50extern char *strchr ();
51extern 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
68extern char *strstr ();
69#endif
70
71#ifdef HAVE_SBRK
72#ifdef NEED_DECLARATION_SBRK
73extern char *sbrk ();
74#endif
75#endif
76
77#ifdef NEED_DECLARATION_GETENV
78extern 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)
108char *alloca ();
109# else
110void *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 */
096aefc0
KR
140void bfd_nonfatal PARAMS ((CONST char *));
141
142void bfd_fatal PARAMS ((CONST char *));
143
9d04d618 144void fatal PARAMS ((CONST char *, ...));
096aefc0 145
9d04d618 146void set_default_bfd_target PARAMS ((void));
096aefc0 147
9d04d618
TT
148void list_matching_formats PARAMS ((char **p));
149
150void list_supported_targets PARAMS ((const char *, FILE *));
096aefc0
KR
151
152void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose));
153
9d04d618
TT
154char *make_tempname PARAMS ((char *));
155
156bfd_vma parse_vma PARAMS ((const char *, const char *));
157
096aefc0 158extern char *program_name;
9d04d618
TT
159
160/* filemode.c */
161void mode_string PARAMS ((unsigned long mode, char *buf));
162
163/* version.c */
164extern void print_version PARAMS ((const char *));
165
166/* libiberty */
167PTR xmalloc PARAMS ((size_t));
168
169PTR xrealloc PARAMS ((PTR, size_t));
170
171#endif /* _BUCOMM_H */
This page took 0.18452 seconds and 4 git commands to generate.