1239281Sgonzo/* sysdep.h -- handle host dependencies for the GNU linker 2239281Sgonzo Copyright 1995, 1996, 1997, 1999, 2002, 2003 3239281Sgonzo Free Software Foundation, Inc. 4239281Sgonzo 5239281Sgonzo This file is part of GLD, the Gnu Linker. 6239281Sgonzo 7239281Sgonzo GLD is free software; you can redistribute it and/or modify 8239281Sgonzo it under the terms of the GNU General Public License as published by 9239281Sgonzo the Free Software Foundation; either version 2, or (at your option) 10239281Sgonzo any later version. 11239281Sgonzo 12239281Sgonzo GLD is distributed in the hope that it will be useful, 13239281Sgonzo but WITHOUT ANY WARRANTY; without even the implied warranty of 14239281Sgonzo MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15239281Sgonzo GNU General Public License for more details. 16239281Sgonzo 17239281Sgonzo You should have received a copy of the GNU General Public License 18239281Sgonzo along with GLD; see the file COPYING. If not, write to the Free 19239281Sgonzo Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 20239281Sgonzo 02110-1301, USA. */ 21239281Sgonzo 22239281Sgonzo#ifndef LD_SYSDEP_H 23239281Sgonzo#define LD_SYSDEP_H 24239281Sgonzo 25239281Sgonzo#include "config.h" 26239281Sgonzo 27239281Sgonzo#include <stdio.h> 28239281Sgonzo#include <sys/types.h> 29239281Sgonzo#include <sys/stat.h> 30239281Sgonzo 31239281Sgonzo#ifdef HAVE_STRING_H 32239281Sgonzo#include <string.h> 33239281Sgonzo#else 34239281Sgonzo#ifdef HAVE_STRINGS_H 35239281Sgonzo#include <strings.h> 36239281Sgonzo#else 37239281Sgonzoextern char *strchr (); 38239281Sgonzoextern char *strrchr (); 39239281Sgonzo#endif 40239281Sgonzo#endif 41239281Sgonzo 42239281Sgonzo#ifdef HAVE_STDLIB_H 43239281Sgonzo#include <stdlib.h> 44239281Sgonzo#endif 45239281Sgonzo 46239281Sgonzo#ifdef HAVE_UNISTD_H 47239281Sgonzo#include <unistd.h> 48239281Sgonzo#endif 49239281Sgonzo 50239281Sgonzo/* for PATH_MAX */ 51239281Sgonzo#ifdef HAVE_LIMITS_H 52239281Sgonzo#include <limits.h> 53239281Sgonzo#endif 54239281Sgonzo/* for MAXPATHLEN */ 55239281Sgonzo#ifdef HAVE_SYS_PARAM_H 56239281Sgonzo#include <sys/param.h> 57239281Sgonzo#endif 58239281Sgonzo#ifdef PATH_MAX 59239281Sgonzo# define LD_PATHMAX PATH_MAX 60239281Sgonzo#else 61239281Sgonzo# ifdef MAXPATHLEN 62239281Sgonzo# define LD_PATHMAX MAXPATHLEN 63239281Sgonzo# else 64239281Sgonzo# define LD_PATHMAX 1024 65239281Sgonzo# endif 66239281Sgonzo#endif 67239281Sgonzo 68239281Sgonzo#ifdef HAVE_REALPATH 69239281Sgonzo# define REALPATH(a,b) realpath (a, b) 70239281Sgonzo#else 71239281Sgonzo# define REALPATH(a,b) NULL 72239281Sgonzo#endif 73239281Sgonzo 74239281Sgonzo#ifdef USE_BINARY_FOPEN 75239281Sgonzo#include "fopen-bin.h" 76239281Sgonzo#else 77239281Sgonzo#include "fopen-same.h" 78239281Sgonzo#endif 79239281Sgonzo 80239281Sgonzo#if !HAVE_DECL_STRSTR 81239281Sgonzoextern char *strstr (); 82239281Sgonzo#endif 83239281Sgonzo 84239281Sgonzo#if !HAVE_DECL_FREE 85239281Sgonzoextern void free (); 86239281Sgonzo#endif 87239281Sgonzo 88239281Sgonzo#if !HAVE_DECL_GETENV 89239281Sgonzoextern char *getenv (); 90239281Sgonzo#endif 91239281Sgonzo 92239281Sgonzo#if !HAVE_DECL_ENVIRON 93239281Sgonzoextern char **environ; 94239281Sgonzo#endif 95239281Sgonzo 96239281Sgonzo#endif /* ! defined (LD_SYSDEP_H) */ 97239281Sgonzo