source: trunk/src/binutils/bfd/sysdep.h@ 1917

Last change on this file since 1917 was 907, checked in by bird, 22 years ago

Builds again - put back some uglyness :/

  • Property cvs2svn:cvs-rev set to 1.6
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 3.9 KB
Line 
1/* sysdep.h -- handle host dependencies for the BFD library
2 Copyright 1995, 1996, 1997, 1998, 1999, 2000
3 Free Software Foundation, Inc.
4 Written by Cygnus Support.
5
6This file is part of BFD, the Binary File Descriptor library.
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21
22#ifndef BFD_SYSDEP_H
23#define BFD_SYSDEP_H
24
25#include "ansidecl.h"
26
27#include "config.h"
28
29#ifdef __EMX__ /* r=bird: hmm seen this before. */
30#ifdef TRAD_HEADER
31#include TRAD_HEADER
32#endif
33#endif /* __EMX__ */
34
35#ifdef HAVE_STDDEF_H
36#include <stddef.h>
37#endif
38
39#include <stdio.h>
40#include <sys/types.h>
41#include <sys/stat.h>
42
43#include <errno.h>
44#if !(defined(errno) || defined(_MSC_VER) && defined(_INC_ERRNO))
45extern int errno;
46#endif
47
48#ifdef HAVE_STRING_H
49#include <string.h>
50#else
51#ifdef HAVE_STRINGS_H
52#include <strings.h>
53#else
54extern char *strchr ();
55extern char *strrchr ();
56#endif
57#endif
58
59#ifdef HAVE_STDLIB_H
60#include <stdlib.h>
61#endif
62
63#ifdef TIME_WITH_SYS_TIME
64#include <sys/time.h>
65#include <time.h>
66#else
67#ifdef HAVE_SYS_TIME_H
68#include <sys/time.h>
69#else
70#include <time.h>
71#endif
72#endif
73
74#ifdef HAVE_UNISTD_H
75#include <unistd.h>
76#endif
77
78#ifdef USE_BINARY_FOPEN
79#include "fopen-bin.h"
80#else
81#include "fopen-same.h"
82#endif
83
84#ifdef HAVE_FCNTL_H
85#include <fcntl.h>
86#else
87#ifdef HAVE_SYS_FILE_H
88#include <sys/file.h>
89#endif
90#endif
91
92#ifndef O_RDONLY
93#define O_RDONLY 0
94#endif
95#ifndef O_WRONLY
96#define O_WRONLY 1
97#endif
98#ifndef O_RDWR
99#define O_RDWR 2
100#endif
101#ifndef O_ACCMODE
102#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
103#endif
104
105#ifndef SEEK_SET
106#define SEEK_SET 0
107#endif
108#ifndef SEEK_CUR
109#define SEEK_CUR 1
110#endif
111
112#include "filenames.h"
113
114#ifdef NEED_DECLARATION_STRSTR
115extern char *strstr ();
116#endif
117
118#ifdef NEED_DECLARATION_MALLOC
119extern PTR malloc ();
120#endif
121
122#ifdef NEED_DECLARATION_REALLOC
123extern PTR realloc ();
124#endif
125
126#ifdef NEED_DECLARATION_FREE
127extern void free ();
128#endif
129
130#ifdef NEED_DECLARATION_GETENV
131extern char *getenv ();
132#endif