Remove path name from test case
[binutils-gdb.git] / binutils / sysdep.h
1 /* sysdep.h -- handle host dependencies for binutils
2 Copyright (C) 1991-2023 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 3 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
19 \f
20 #ifndef _BIN_SYSDEP_H
21 #define _BIN_SYSDEP_H
22
23 #include "config.h"
24 #include <stdio.h>
25 #ifdef HAVE_SYS_TYPES_H
26 #include <sys/types.h>
27 #endif
28 #ifdef HAVE_SYS_STAT_H
29 #include <sys/stat.h>
30 #endif
31 #include <stdlib.h>
32 #include <string.h>
33 #include <stdarg.h>
34 #include <errno.h>
35 #ifdef HAVE_UNISTD_H
36 #include <unistd.h>
37 #endif
38 #ifdef HAVE_FCNTL_H
39 #include <fcntl.h>
40 #else
41 #ifdef HAVE_SYS_FILE_H
42 #include <sys/file.h>
43 #endif
44 #endif
45
46 #include "ansidecl.h"
47 #include "bfdver.h"
48
49 #ifdef USE_BINARY_FOPEN
50 #include "fopen-bin.h"
51 #else
52 #include "fopen-same.h"
53 #endif
54
55 #include "binary-io.h"
56
57 #if !HAVE_DECL_STPCPY
58 extern char *stpcpy (char *, const char *);
59 #endif
60
61 #if !HAVE_DECL_ENVIRON
62 extern char **environ;
63 #endif
64
65 #ifndef O_RDONLY
66 #define O_RDONLY 0
67 #endif
68
69 #ifndef O_RDWR
70 #define O_RDWR 2
71 #endif
72
73 #ifndef SEEK_SET
74 #define SEEK_SET 0
75 #endif
76 #ifndef SEEK_CUR
77 #define SEEK_CUR 1
78 #endif
79 #ifndef SEEK_END
80 #define SEEK_END 2
81 #endif
82
83 #ifndef ENABLE_NLS
84 /* The Solaris version of locale.h always includes libintl.h. If we have
85 been configured with --disable-nls then ENABLE_NLS will not be defined
86 and the dummy definitions of bindtextdomain (et al) below will conflict
87 with the defintions in libintl.h. So we define these values to prevent
88 the bogus inclusion of libintl.h. */
89 # define _LIBINTL_H
90 # define _LIBGETTEXT_H
91 #endif
92 #include <locale.h>
93
94 #ifdef ENABLE_NLS
95 # include <libintl.h>
96 # define _(String) gettext (String)
97 # ifdef gettext_noop
98 # define N_(String) gettext_noop (String)
99 # else
100 # define N_(String) (String)
101 # endif
102 #else
103 # define gettext(Msgid) (Msgid)
104 # define dgettext(Domainname, Msgid) (Msgid)
105 # define dcgettext(Domainname, Msgid, Category) (Msgid)
106 # define ngettext(Msgid1, Msgid2, n) \
107 (n == 1 ? Msgid1 : Msgid2)
108 # define dngettext(Domainname, Msgid1, Msgid2, n) \
109 (n == 1 ? Msgid1 : Msgid2)
110 # define dcngettext(Domainname, Msgid1, Msgid2, n, Category) \
111 (n == 1 ? Msgid1 : Msgid2)
112 # define textdomain(Domainname) do {} while (0)
113 # define bindtextdomain(Domainname, Dirname) do {} while (0)
114 # define _(String) (String)
115 # define N_(String) (String)
116 #endif
117
118 /* Used by ar.c and objcopy.c. */
119 #define BUFSIZE 8192
120
121 #include <limits.h>
122
123 #define POISON_BFD_BOOLEAN 1
124
125 #endif /* _BIN_SYSDEP_H */