/* 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-2020 Free Software Foundation, Inc.
This file is part of GNU Binutils.
#include <unistd.h>
#endif
+#ifdef STRING_WITH_STRINGS
+#include <string.h>
+#include <strings.h>
+#else
#ifdef HAVE_STRING_H
#include <string.h>
#else
extern char *strrchr ();
#endif
#endif
+#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
#include "binary-io.h"
#if !HAVE_DECL_STPCPY
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
# 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
# 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 */