1 /* sysdep.h -- handle host dependencies for the BFD library
2 Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2007, 2009
3 Free Software Foundation, Inc.
4 Written by Cygnus Support.
6 This file is part of BFD, the Binary File Descriptor library.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
27 #error sysdep.h must be included in lieu of config.h
39 #include <sys/types.h>
43 #if !(defined(errno) || defined(_MSC_VER) && defined(_INC_ERRNO))
47 #ifdef STRING_WITH_STRINGS
57 extern char *strchr ();
58 extern char *strrchr ();
67 #ifdef TIME_WITH_SYS_TIME
71 #ifdef HAVE_SYS_TIME_H
82 #ifdef USE_BINARY_FOPEN
83 #include "fopen-bin.h"
85 #include "fopen-same.h"
91 #ifdef HAVE_SYS_FILE_H
106 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
116 #include "filenames.h"
119 extern int ffs (int);
126 #if !HAVE_DECL_GETENV
127 extern char *getenv ();
130 #if !HAVE_DECL_MALLOC
131 extern PTR
malloc ();
134 #if !HAVE_DECL_REALLOC
135 extern PTR
realloc ();
138 #if !HAVE_DECL_STPCPY
139 extern char *stpcpy (char *__dest
, const char *__src
);
142 #if !HAVE_DECL_STRSTR
143 extern char *strstr ();
147 #if !HAVE_DECL_FTELLO
148 extern off_t
ftello (FILE *stream
);
153 #if !HAVE_DECL_FTELLO64
154 extern off64_t
ftello64 (FILE *stream
);
159 #if !HAVE_DECL_FSEEKO
160 extern int fseeko (FILE *stream
, off_t offset
, int whence
);
165 #if !HAVE_DECL_FSEEKO64
166 extern int fseeko64 (FILE *stream
, off64_t offset
, int whence
);
170 /* Define offsetof for those systems which lack it */
173 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
178 /* Note the use of dgetext() and PACKAGE here, rather than gettext().
180 This is because the code in this directory is used to build a library which
181 will be linked with code in other directories to form programs. We want to
182 maintain a seperate translation file for this directory however, rather
183 than being forced to merge it with that of any program linked to libbfd.
184 This is a library, so it cannot depend on the catalog currently loaded.
186 In order to do this, we have to make sure that when we extract messages we
187 use the OPCODES domain rather than the domain of the program that included
188 the bfd library, (eg OBJDUMP). Hence we use dgettext (PACKAGE, String)
189 and define PACKAGE to be 'bfd'. (See the code in configure). */
190 #define _(String) dgettext (PACKAGE, String)
192 #define N_(String) gettext_noop (String)
194 #define N_(String) (String)
197 # define gettext(Msgid) (Msgid)
198 # define dgettext(Domainname, Msgid) (Msgid)
199 # define dcgettext(Domainname, Msgid, Category) (Msgid)
200 # define textdomain(Domainname) while (0) /* nothing */
201 # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
202 # define _(String) (String)
203 # define N_(String) (String)
206 #endif /* ! defined (BFD_SYSDEP_H) */
This page took 0.046365 seconds and 4 git commands to generate.