1 /* sysdep.h -- handle host dependencies for binutils
2 Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2005, 2006, 2007, 2008
4 Free Software Foundation, Inc.
6 This file is part of GNU Binutils.
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, MA 02110-1301, USA. */
28 #include <sys/types.h>
34 #ifdef USE_BINARY_FOPEN
35 #include "fopen-bin.h"
37 #include "fopen-same.h"
55 extern char *strchr ();
56 extern char *strrchr ();
67 #ifdef HAVE_SYS_FILE_H
72 #include "binary-io.h"
75 extern char *stpcpy (char *, const char *);
79 extern char *strstr ();
89 extern char *getenv ();
92 #if !HAVE_DECL_ENVIRON
93 extern char **environ
;
96 #if !HAVE_DECL_FPRINTF
97 extern int fprintf (FILE *, const char *, ...);
100 #if !HAVE_DECL_SNPRINTF
101 extern int snprintf(char *, size_t, const char *, ...);
104 #if !HAVE_DECL_VSNPRINTF
105 extern int vsnprintf(char *, size_t, const char *, va_list);
126 #if defined(__GNUC__) && !defined(C_ALLOCA)
128 # define alloca __builtin_alloca
130 # if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
133 # ifndef alloca /* predefined by HP cc +Olibcalls */
134 # if !defined (__STDC__) && !defined (__hpux)
138 # endif /* __STDC__, __hpux */
140 # endif /* HAVE_ALLOCA_H */
145 /* The Solaris version of locale.h always includes libintl.h. If we have
146 been configured with --disable-nls then ENABLE_NLS will not be defined
147 and the dummy definitions of bindtextdomain (et al) below will conflict
148 with the defintions in libintl.h. So we define these values to prevent
149 the bogus inclusion of libintl.h. */
151 # define _LIBGETTEXT_H
157 # include <libintl.h>
158 # define _(String) gettext (String)
160 # define N_(String) gettext_noop (String)
162 # define N_(String) (String)
165 # define gettext(Msgid) (Msgid)
166 # define dgettext(Domainname, Msgid) (Msgid)
167 # define dcgettext(Domainname, Msgid, Category) (Msgid)
168 # define textdomain(Domainname) while (0) /* nothing */
169 # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
170 # define _(String) (String)
171 # define N_(String) (String)
174 /* Used by ar.c and objcopy.c. */
177 #endif /* _BIN_SYSDEP_H */