X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ld%2Fsysdep.h;h=030be1ebbde8f9e5d2945e3b92cd3ec4d7b00554;hb=660df28acfa1b58c978d65d9cb26d37023f791ce;hp=2ccc12279ad8ef7c3baa12a8975fe3b3507ec36f;hpb=dc9e099fc0eced486ae2b49455c9da113c11f4ff;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/sysdep.h b/ld/sysdep.h index 2ccc12279a..030be1ebbd 100644 --- a/ld/sysdep.h +++ b/ld/sysdep.h @@ -1,34 +1,41 @@ /* sysdep.h -- handle host dependencies for the GNU linker - Copyright (C) 1995, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1995-2019 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 -#include "ansidecl.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 @@ -39,6 +46,7 @@ extern char *strchr (); extern char *strrchr (); #endif #endif +#endif #ifdef HAVE_STDLIB_H #include @@ -48,25 +56,70 @@ extern char *strrchr (); #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 NEED_DECLARATION_STRSTR +#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 -#ifdef NEED_DECLARATION_FREE +#if !HAVE_DECL_FREE extern void free (); #endif -#ifdef NEED_DECLARATION_GETENV +#if !HAVE_DECL_GETENV extern char *getenv (); #endif -#ifdef NEED_DECLARATION_ENVIRON +#if !HAVE_DECL_ENVIRON extern char **environ; #endif