]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/binutils/binutils/bucomm.h
Initial import of GNU binutils version 2.8.1. Believe it or not,
[FreeBSD/FreeBSD.git] / contrib / binutils / binutils / bucomm.h
1 /* bucomm.h -- binutils common include file.
2    Copyright (C) 1992, 93, 94, 95, 96, 1997 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 /* bucomm.c */
117 void bfd_nonfatal PARAMS ((CONST char *));
118
119 void bfd_fatal PARAMS ((CONST char *));
120
121 void fatal PARAMS ((CONST char *, ...));
122
123 void set_default_bfd_target PARAMS ((void));
124
125 void list_matching_formats PARAMS ((char **p));
126
127 void list_supported_targets PARAMS ((const char *, FILE *));
128
129 void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose));
130
131 char *make_tempname PARAMS ((char *));
132
133 bfd_vma parse_vma PARAMS ((const char *, const char *));
134
135 extern char *program_name;
136
137 /* filemode.c */
138 void mode_string PARAMS ((unsigned long mode, char *buf));
139
140 /* version.c */
141 extern void print_version PARAMS ((const char *));
142
143 /* libiberty */
144 PTR xmalloc PARAMS ((size_t));
145
146 PTR xrealloc PARAMS ((PTR, size_t));
147
148 #endif /* _BUCOMM_H */