Back to index

cell-binutils  2.17cvs20070401
sysdep.h
Go to the documentation of this file.
00001 /* sysdep.h -- handle host dependencies for the GNU linker
00002    Copyright 1995, 1996, 1997, 1999, 2002, 2003
00003    Free Software Foundation, Inc.
00004 
00005    This file is part of GLD, the Gnu Linker.
00006 
00007    GLD is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2, or (at your option)
00010    any later version.
00011 
00012    GLD is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with GLD; see the file COPYING.  If not, write to the Free
00019    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00020    02110-1301, USA.  */
00021 
00022 #ifndef LD_SYSDEP_H
00023 #define LD_SYSDEP_H
00024 
00025 #include "config.h"
00026 
00027 #include <stdio.h>
00028 #include <sys/types.h>
00029 #include <sys/stat.h>
00030 
00031 #ifdef HAVE_STRING_H
00032 #include <string.h>
00033 #else
00034 #ifdef HAVE_STRINGS_H
00035 #include <strings.h>
00036 #else
00037 extern char *strchr ();
00038 extern char *strrchr ();
00039 #endif
00040 #endif
00041 
00042 #ifdef HAVE_STDLIB_H
00043 #include <stdlib.h>
00044 #endif
00045 
00046 #ifdef HAVE_UNISTD_H
00047 #include <unistd.h>
00048 #endif
00049 
00050 /* for PATH_MAX */
00051 #ifdef HAVE_LIMITS_H
00052 #include <limits.h>
00053 #endif
00054 /* for MAXPATHLEN */
00055 #ifdef HAVE_SYS_PARAM_H
00056 #include <sys/param.h>
00057 #endif
00058 #ifdef PATH_MAX
00059 # define LD_PATHMAX PATH_MAX
00060 #else
00061 # ifdef MAXPATHLEN
00062 #  define LD_PATHMAX MAXPATHLEN
00063 # else
00064 #  define LD_PATHMAX 1024
00065 # endif
00066 #endif
00067 
00068 #ifdef HAVE_REALPATH
00069 # define REALPATH(a,b) realpath (a, b)
00070 #else
00071 # define REALPATH(a,b) NULL
00072 #endif
00073 
00074 #ifdef USE_BINARY_FOPEN
00075 #include "fopen-bin.h"
00076 #else
00077 #include "fopen-same.h"
00078 #endif
00079 
00080 #if !HAVE_DECL_STRSTR
00081 extern char *strstr ();
00082 #endif
00083 
00084 #if !HAVE_DECL_FREE
00085 extern void free ();
00086 #endif
00087 
00088 #if !HAVE_DECL_GETENV
00089 extern char *getenv ();
00090 #endif
00091 
00092 #if !HAVE_DECL_ENVIRON
00093 extern char **environ;
00094 #endif
00095 
00096 #endif /* ! defined (LD_SYSDEP_H) */