X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fsysdep.h;h=689e8c92ebd907722dc78e0bd10183d077d322ed;hb=3fe1ce1d5b225417a8e3234aaa0d7a0a597067f1;hp=0d7e2501106d5fc53da7bfa6180597769c31e6ca;hpb=f469d32bb9cb3e0bf4033c0c25a3701a303e7e14;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/sysdep.h b/binutils/sysdep.h index 0d7e250110..689e8c92eb 100644 --- a/binutils/sysdep.h +++ b/binutils/sysdep.h @@ -1,6 +1,5 @@ /* sysdep.h -- handle host dependencies for binutils - Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 1991-2014 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -21,7 +20,7 @@ #ifndef _BIN_SYSDEP_H #define _BIN_SYSDEP_H -#include "config.h" +#include "alloca-conf.h" #include "ansidecl.h" #include #include @@ -45,6 +44,10 @@ extern int errno; #include #endif +#ifdef STRING_WITH_STRINGS +#include +#include +#else #ifdef HAVE_STRING_H #include #else @@ -55,6 +58,7 @@ extern char *strchr (); extern char *strrchr (); #endif #endif +#endif #ifdef HAVE_STDLIB_H #include @@ -68,6 +72,12 @@ extern char *strrchr (); #endif #endif +#ifdef HAVE_SYS_STAT_H +#include +#endif + +#include "binary-io.h" + #if !HAVE_DECL_STPCPY extern char *stpcpy (char *, const char *); #endif @@ -102,6 +112,10 @@ extern int snprintf(char *, size_t, const char *, ...); extern int vsnprintf(char *, size_t, const char *, va_list); #endif +#if !HAVE_DECL_STRNLEN +size_t strnlen (const char *, size_t); +#endif + #ifndef O_RDONLY #define O_RDONLY 0 #endif @@ -120,23 +134,6 @@ extern int vsnprintf(char *, size_t, const char *, va_list); #define SEEK_END 2 #endif -#if defined(__GNUC__) && !defined(C_ALLOCA) -# undef alloca -# define alloca __builtin_alloca -#else -# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA) -# include -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -# if !defined (__STDC__) && !defined (__hpux) -char *alloca (); -# else -void *alloca (); -# endif /* __STDC__, __hpux */ -# endif /* alloca */ -# endif /* HAVE_ALLOCA_H */ -#endif - #ifdef HAVE_LOCALE_H # ifndef ENABLE_NLS /* The Solaris version of locale.h always includes libintl.h. If we have @@ -171,4 +168,23 @@ void *alloca (); /* Used by ar.c and objcopy.c. */ #define BUFSIZE 8192 +/* For PATH_MAX. */ +#ifdef HAVE_LIMITS_H +#include +#endif + +#ifndef PATH_MAX +/* For MAXPATHLEN. */ +# ifdef HAVE_SYS_PARAM_H +# include +# endif +# ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 1024 +# endif +# endif +#endif + #endif /* _BIN_SYSDEP_H */