X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fsysdep.h;h=a5556dcbf9443fd639941fdaa4d1f6fa2fd50a1b;hb=60804c53a0c365f0802e90c12dfcbe6696b861fe;hp=1bf52cc81ab7913695ea4e5b9eaedae7b8e38dbd;hpb=fa803dc60f0bf01297674c41d001798e18ade4dc;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/sysdep.h b/ld/sysdep.h index 1bf52cc81a..a5556dcbf9 100644 --- a/ld/sysdep.h +++ b/ld/sysdep.h @@ -1,32 +1,41 @@ /* sysdep.h -- handle host dependencies for the GNU linker - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995-2017 Free Software Foundation, Inc. - This file is part of GLD, the Gnu Linker. + This file is part of the GNU Binutils. - GLD is free software; you can redistribute it and/or modify + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. - GLD is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GLD; see the file COPYING. If not, write to the Free - Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ #ifndef LD_SYSDEP_H #define LD_SYSDEP_H +#ifdef PACKAGE +#error sysdep.h must be included in lieu of config.h +#endif + #include "config.h" #include #include #include +#include +#ifdef STRING_WITH_STRINGS +#include +#include +#else #ifdef HAVE_STRING_H #include #else @@ -35,7 +44,7 @@ #else extern char *strchr (); extern char *strrchr (); -extern char *strstr (); +#endif #endif #endif @@ -47,10 +56,71 @@ extern char *strstr (); #include #endif +#ifdef HAVE_REALPATH +# define REALPATH(a,b) realpath (a, b) +#else +# define REALPATH(a,b) NULL +#endif + #ifdef USE_BINARY_FOPEN #include "fopen-bin.h" #else #include "fopen-same.h" #endif +#ifdef HAVE_FCNTL_H +#include +#else +#ifdef HAVE_SYS_FILE_H +#include +#endif +#endif + +#ifdef HAVE_DLFCN_H +#include +#endif + +#ifndef O_RDONLY +#define O_RDONLY 0 +#endif +#ifndef O_WRONLY +#define O_WRONLY 1 +#endif +#ifndef O_RDWR +#define O_RDWR 2 +#endif +#ifndef O_ACCMODE +#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) +#endif +/* Systems that don't already define this, don't need it. */ +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#if !HAVE_DECL_STRSTR +extern char *strstr (); +#endif + +#if !HAVE_DECL_FREE +extern void free (); +#endif + +#if !HAVE_DECL_GETENV +extern char *getenv (); +#endif + +#if !HAVE_DECL_ENVIRON +extern char **environ; +#endif + #endif /* ! defined (LD_SYSDEP_H) */