* hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
[binutils.git] / bfd / sysdep.h
blob0a58983fa2d5b918704d156de32edb727b8c6e83
1 /* sysdep.h -- handle host dependencies for the BFD library
2 Copyright 1995, 96, 97, 98, 1999 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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 #ifndef BFD_SYSDEP_H
22 #define BFD_SYSDEP_H
24 #include "ansidecl.h"
26 #include "config.h"
28 #ifdef HAVE_STDDEF_H
29 #include <stddef.h>
30 #endif
32 #include <stdio.h>
33 #include <sys/types.h>
34 #include <sys/stat.h>
36 #include <errno.h>
37 #if !(defined(errno) || defined(_MSC_VER) && defined(_INC_ERRNO))
38 extern int errno;
39 #endif
41 #ifdef HAVE_STRING_H
42 #include <string.h>
43 #else
44 #ifdef HAVE_STRINGS_H
45 #include <strings.h>
46 #else
47 extern char *strchr ();
48 extern char *strrchr ();
49 #endif
50 #endif
52 #ifdef HAVE_STDLIB_H
53 #include <stdlib.h>
54 #endif
56 #ifdef TIME_WITH_SYS_TIME
57 #include <sys/time.h>
58 #include <time.h>
59 #else
60 #ifdef HAVE_SYS_TIME_H
61 #include <sys/time.h>
62 #else
63 #include <time.h>
64 #endif
65 #endif
67 #ifdef HAVE_UNISTD_H
68 #include <unistd.h>
69 #endif
71 #ifdef USE_BINARY_FOPEN
72 #include "fopen-bin.h"
73 #else
74 #include "fopen-same.h"
75 #endif
77 #ifdef HAVE_FCNTL_H
78 #include <fcntl.h>
79 #else
80 #ifdef HAVE_SYS_FILE_H
81 #include <sys/file.h>
82 #endif
83 #endif
85 #ifndef O_RDONLY
86 #define O_RDONLY 0
87 #endif
88 #ifndef O_WRONLY
89 #define O_WRONLY 1
90 #endif
91 #ifndef O_RDWR
92 #define O_RDWR 2
93 #endif
94 #ifndef O_ACCMODE
95 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
96 #endif
98 #ifndef SEEK_SET
99 #define SEEK_SET 0
100 #endif
101 #ifndef SEEK_CUR
102 #define SEEK_CUR 1
103 #endif
105 #ifdef NEED_DECLARATION_STRSTR
106 extern char *strstr ();
107 #endif
109 #ifdef NEED_DECLARATION_MALLOC
110 extern PTR malloc ();
111 #endif
113 #ifdef NEED_DECLARATION_REALLOC
114 extern PTR realloc ();
115 #endif
117 #ifdef NEED_DECLARATION_FREE
118 extern void free ();
119 #endif
121 #ifdef NEED_DECLARATION_GETENV
122 extern char *getenv ();
123 #endif
125 #ifdef ENABLE_NLS
126 #include <libintl.h>
127 #define _(String) dgettext (PACKAGE, String)
128 #ifdef gettext_noop
129 #define N_(String) gettext_noop (String)
130 #else
131 #define N_(String) (String)
132 #endif
133 #else
134 /* Stubs that do something close enough. */
135 #define textdomain(String) (String)
136 #define gettext(String) (String)
137 #define dgettext(Domain,Message) (Message)
138 #define dcgettext(Domain,Message,Type) (Message)
139 #define bindtextdomain(Domain,Directory) (Domain)
140 #define _(String) (String)
141 #define N_(String) (String)
142 #endif
144 #endif /* ! defined (BFD_SYSDEP_H) */