X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fsysdep.h;h=64ae1d088340dbf8b6645736c5e7df9e9d52931e;hb=9108bc33b1ca0b2e930c0cce5b1a0394e33e86be;hp=e573637b8c72563836d063d33af672fdd09daeb1;hpb=8d25cc3de0a2ca236b8a4a676535d05d2084c149;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/sysdep.h b/binutils/sysdep.h index e573637b8c..64ae1d0883 100644 --- a/binutils/sysdep.h +++ b/binutils/sysdep.h @@ -1,7 +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, 2008, 2009 - Free Software Foundation, Inc. + Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -46,6 +44,10 @@ extern int errno; #include #endif +#ifdef STRING_WITH_STRINGS +#include +#include +#else #ifdef HAVE_STRING_H #include #else @@ -56,6 +58,7 @@ extern char *strchr (); extern char *strrchr (); #endif #endif +#endif #ifdef HAVE_STDLIB_H #include @@ -69,6 +72,10 @@ extern char *strrchr (); #endif #endif +#ifdef HAVE_SYS_STAT_H +#include +#endif + #include "binary-io.h" #if !HAVE_DECL_STPCPY @@ -105,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 @@ -148,8 +159,14 @@ extern int vsnprintf(char *, size_t, const char *, va_list); # define gettext(Msgid) (Msgid) # define dgettext(Domainname, Msgid) (Msgid) # define dcgettext(Domainname, Msgid, Category) (Msgid) -# define textdomain(Domainname) while (0) /* nothing */ -# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ +# define ngettext(Msgid1, Msgid2, n) \ + (n == 1 ? Msgid1 : Msgid2) +# define dngettext(Domainname, Msgid1, Msgid2, n) \ + (n == 1 ? Msgid1 : Msgid2) +# define dcngettext(Domainname, Msgid1, Msgid2, n, Category) \ + (n == 1 ? Msgid1 : Msgid2) +# define textdomain(Domainname) do {} while (0) +# define bindtextdomain(Domainname, Dirname) do {} while (0) # define _(String) (String) # define N_(String) (String) #endif @@ -176,4 +193,12 @@ extern int vsnprintf(char *, size_t, const char *, va_list); # endif #endif +#if defined HAVE_LONG_LONG && SIZEOF_LONG_LONG > SIZEOF_LONG +/* We can't use any bfd types here since readelf may define BFD64 and + objdump may not. */ +#define HOST_WIDEST_INT long long +#else +#define HOST_WIDEST_INT long +#endif + #endif /* _BIN_SYSDEP_H */