1 /* sysdep.h -- handle host dependencies for the BFD library
2 Copyright (C) 1995-2018 Free Software Foundation, Inc.
3 Written by Cygnus Support.
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
26 #error sysdep.h must be included in lieu of config.h
38 #include <sys/types.h>
42 #if !(defined(errno) || defined(_MSC_VER) && defined(_INC_ERRNO))
46 #ifdef STRING_WITH_STRINGS
56 extern char *strchr ();
57 extern char *strrchr ();
66 #ifdef TIME_WITH_SYS_TIME
70 #ifdef HAVE_SYS_TIME_H
81 #ifdef HAVE_SYS_RESOURCE_H
82 #include <sys/resource.h>
83 #endif /* HAVE_SYS_RESOURCE_H */
85 #ifdef USE_BINARY_FOPEN
86 #include "fopen-bin.h"
88 #include "fopen-same.h"
94 #ifdef HAVE_SYS_FILE_H
109 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
119 #include "filenames.h"
122 extern int ffs (int);
129 #if !HAVE_DECL_GETENV
130 extern char *getenv ();
133 #if !HAVE_DECL_MALLOC
134 extern PTR
malloc ();
137 #if !HAVE_DECL_REALLOC
138 extern PTR
realloc ();
141 #if !HAVE_DECL_STPCPY
142 extern char *stpcpy (char *__dest
, const char *__src
);
145 #if !HAVE_DECL_STRSTR
146 extern char *strstr ();
150 #if !HAVE_DECL_FTELLO
151 extern off_t
ftello (FILE *stream
);
156 #if !HAVE_DECL_FTELLO64
157 extern off64_t
ftello64 (FILE *stream
);
162 #if !HAVE_DECL_FSEEKO
163 extern int fseeko (FILE *stream
, off_t offset
, int whence
);
168 #if !HAVE_DECL_FSEEKO64
169 extern int fseeko64 (FILE *stream
, off64_t offset
, int whence
);
173 #if !HAVE_DECL_STRNLEN
174 size_t strnlen (const char *, size_t);
177 /* Define offsetof for those systems which lack it */
180 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
184 # include <libintl.h>
185 /* Note the redefinition of gettext and ngettext here to use PACKAGE.
187 This is because the code in this directory is used to build a
188 library which will be linked with code in other directories to form
189 programs. We want to maintain a seperate translation file for this
190 directory however, rather than being forced to merge it with that
191 of any program linked to libbfd. This is a library, so it cannot
192 depend on the catalog currently loaded.
194 In order to do this, we have to make sure that when we extract
195 messages we use the BFD domain rather than the domain of the
196 program that included the bfd library, (eg OBJDUMP). Hence we use
197 dgettext (PACKAGE, String) and define PACKAGE to be 'bfd'.
198 (See the code in configure). */
200 # define gettext(Msgid) dgettext (PACKAGE, Msgid)
202 # define ngettext(Msgid1, Msgid2, n) dngettext (PACKAGE, Msgid1, Msgid2, n)
203 # define _(String) gettext (String)
205 # define N_(String) gettext_noop (String)
207 # define N_(String) (String)
210 # define gettext(Msgid) (Msgid)
211 # define dgettext(Domainname, Msgid) (Msgid)
212 # define dcgettext(Domainname, Msgid, Category) (Msgid)
213 # define ngettext(Msgid1, Msgid2, n) \
214 (n == 1 ? Msgid1 : Msgid2)
215 # define dngettext(Domainname, Msgid1, Msgid2, n) \
216 (n == 1 ? Msgid1 : Msgid2)
217 # define dcngettext(Domainname, Msgid1, Msgid2, n, Category) \
218 (n == 1 ? Msgid1 : Msgid2)
219 # define textdomain(Domainname) do {} while (0)
220 # define bindtextdomain(Domainname, Dirname) do {} while (0)
221 # define _(String) (String)
222 # define N_(String) (String)
225 #endif /* ! defined (BFD_SYSDEP_H) */
This page took 0.045533 seconds and 4 git commands to generate.