1287117Scem/* sysdep.h -- handle host dependencies for the GNU linker 2287117Scem Copyright 1995, 1996, 1997, 1999, 2002, 2003 3287117Scem Free Software Foundation, Inc. 4287117Scem 5287117Scem This file is part of GLD, the Gnu Linker. 6287117Scem 7287117Scem GLD is free software; you can redistribute it and/or modify 8287117Scem it under the terms of the GNU General Public License as published by 9287117Scem the Free Software Foundation; either version 2, or (at your option) 10287117Scem any later version. 11287117Scem 12287117Scem GLD is distributed in the hope that it will be useful, 13287117Scem but WITHOUT ANY WARRANTY; without even the implied warranty of 14287117Scem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15287117Scem GNU General Public License for more details. 16287117Scem 17287117Scem You should have received a copy of the GNU General Public License 18287117Scem along with GLD; see the file COPYING. If not, write to the Free 19287117Scem Software Foundation, 59 Temple Place - Suite 330, Boston, MA 20287117Scem 02111-1307, USA. */ 21287117Scem 22287117Scem#ifndef LD_SYSDEP_H 23287117Scem#define LD_SYSDEP_H 24287117Scem 25287117Scem#include "config.h" 26287117Scem 27287117Scem#include <stdio.h> 28287117Scem#include <sys/types.h> 29287117Scem#include <sys/stat.h> 30287117Scem 31287117Scem#ifdef HAVE_STRING_H 32287117Scem#include <string.h> 33287117Scem#else 34287117Scem#ifdef HAVE_STRINGS_H 35287117Scem#include <strings.h> 36287117Scem#else 37289732Scemextern char *strchr (); 38289732Scemextern char *strrchr (); 39287117Scem#endif 40287117Scem#endif 41287117Scem 42287117Scem#ifdef HAVE_STDLIB_H 43287117Scem#include <stdlib.h> 44287117Scem#endif 45287117Scem 46287117Scem#ifdef HAVE_UNISTD_H 47287117Scem#include <unistd.h> 48287117Scem#endif 49287117Scem 50292228Scem/* for PATH_MAX */ 51292228Scem#ifdef HAVE_LIMITS_H 52292228Scem#include <limits.h> 53292228Scem#endif 54287117Scem/* for MAXPATHLEN */ 55287117Scem#ifdef HAVE_SYS_PARAM_H 56287117Scem#include <sys/param.h> 57287117Scem#endif 58287117Scem#ifdef PATH_MAX 59287117Scem# define LD_PATHMAX PATH_MAX 60287117Scem#else 61287117Scem# ifdef MAXPATHLEN 62287117Scem# define LD_PATHMAX MAXPATHLEN 63287117Scem# else 64287117Scem# define LD_PATHMAX 1024 65287117Scem# endif 66287117Scem#endif 67287117Scem 68287117Scem#ifdef HAVE_REALPATH 69287117Scem# define REALPATH(a,b) realpath (a, b) 70290229Scem#else 71290229Scem# define REALPATH(a,b) NULL 72290229Scem#endif 73287117Scem 74287117Scem#ifdef USE_BINARY_FOPEN 75287117Scem#include "fopen-bin.h" 76287117Scem#else 77287117Scem#include "fopen-same.h" 78287117Scem#endif 79287117Scem 80287117Scem#ifdef NEED_DECLARATION_STRSTR 81287117Scemextern char *strstr (); 82287117Scem#endif 83287117Scem 84287117Scem#ifdef NEED_DECLARATION_FREE 85287117Scemextern void free (); 86287117Scem#endif 87287117Scem 88287117Scem#ifdef NEED_DECLARATION_GETENV 89290229Scemextern char *getenv (); 90287117Scem#endif 91287117Scem 92287117Scem#ifdef NEED_DECLARATION_ENVIRON 93287117Scemextern char **environ; 94287117Scem#endif 95287117Scem 96287117Scem#endif /* ! defined (LD_SYSDEP_H) */ 97287117Scem