summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-01-04 23:47:07 +1030
committerAlan Modra <amodra@gmail.com>2017-01-05 00:03:07 +1030
commite495212d229d58eb4d70c94d7f828a04c386c3b2 (patch)
tree0c2f7c89f1388662be01e6692aec212517e7c699 /libiberty
parent0913ae5ad7ad465e36784ed7fcc8676f3e0e23b7 (diff)
downloadbinutils-gdb-e495212d229d58eb4d70c94d7f828a04c386c3b2.tar.gz
Sync libiberty from gcc
Picks up copyright year update and other recent fixes.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/Makefile.in7
-rw-r--r--libiberty/_doprnt.c2
-rw-r--r--libiberty/argv.c2
-rw-r--r--libiberty/asprintf.c2
-rw-r--r--libiberty/choose-temp.c2
-rw-r--r--libiberty/clock.c2
-rw-r--r--libiberty/concat.c2
-rwxr-xr-xlibiberty/configure2
-rw-r--r--libiberty/copying-lib.texi2
-rw-r--r--libiberty/cp-demangle.c11
-rw-r--r--libiberty/cp-demangle.h3
-rw-r--r--libiberty/cp-demint.c2
-rw-r--r--libiberty/cplus-dem.c3
-rw-r--r--libiberty/crc32.c2
-rw-r--r--libiberty/d-demangle.c2
-rw-r--r--libiberty/dwarfnames.c2
-rw-r--r--libiberty/dyn-string.c2
-rw-r--r--libiberty/fdmatch.c2
-rw-r--r--libiberty/fibheap.c2
-rw-r--r--libiberty/filename_cmp.c2
-rw-r--r--libiberty/floatformat.c3
-rw-r--r--libiberty/fnmatch.c2
-rw-r--r--libiberty/fopen_unlocked.c2
-rw-r--r--libiberty/gather-docs3
-rw-r--r--libiberty/getopt.c3
-rw-r--r--libiberty/getopt1.c3
-rw-r--r--libiberty/getruntime.c2
-rw-r--r--libiberty/hashtab.c3
-rw-r--r--libiberty/hex.c2
-rw-r--r--libiberty/lbasename.c2
-rw-r--r--libiberty/libiberty.texi6
-rw-r--r--libiberty/lrealpath.c2
-rw-r--r--libiberty/maint-tool3
-rw-r--r--libiberty/make-relative-prefix.c3
-rw-r--r--libiberty/make-temp-file.c3
-rw-r--r--libiberty/md5.c2
-rw-r--r--libiberty/memmem.c2
-rw-r--r--libiberty/mempcpy.c2
-rw-r--r--libiberty/mkstemps.c2
-rw-r--r--libiberty/objalloc.c2
-rw-r--r--libiberty/obstack.c2
-rw-r--r--libiberty/partition.c2
-rw-r--r--libiberty/pex-common.c2
-rw-r--r--libiberty/pex-common.h3
-rw-r--r--libiberty/pex-djgpp.c3
-rw-r--r--libiberty/pex-msdos.c3
-rw-r--r--libiberty/pex-one.c2
-rw-r--r--libiberty/pex-unix.c3
-rw-r--r--libiberty/pex-win32.c3
-rw-r--r--libiberty/pexecute.c2
-rw-r--r--libiberty/physmem.c2
-rw-r--r--libiberty/putenv.c2
-rw-r--r--libiberty/regex.c3
-rw-r--r--libiberty/rust-demangle.c2
-rw-r--r--libiberty/safe-ctype.c3
-rw-r--r--libiberty/setenv.c3
-rw-r--r--libiberty/setproctitle.c2
-rw-r--r--libiberty/sha1.c3
-rw-r--r--libiberty/simple-object-coff.c2
-rw-r--r--libiberty/simple-object-common.h2
-rw-r--r--libiberty/simple-object-elf.c2
-rw-r--r--libiberty/simple-object-mach-o.c2
-rw-r--r--libiberty/simple-object-xcoff.c2
-rw-r--r--libiberty/simple-object.c2
-rw-r--r--libiberty/snprintf.c2
-rw-r--r--libiberty/sort.c2
-rw-r--r--libiberty/spaces.c2
-rw-r--r--libiberty/splay-tree.c3
-rw-r--r--libiberty/stack-limit.c2
-rw-r--r--libiberty/stpcpy.c2
-rw-r--r--libiberty/stpncpy.c2
-rw-r--r--libiberty/strndup.c9
-rw-r--r--libiberty/strtod.c2
-rw-r--r--libiberty/strverscmp.c2
-rw-r--r--libiberty/testsuite/Makefile.in3
-rw-r--r--libiberty/testsuite/demangle-expected3
-rw-r--r--libiberty/testsuite/demangler-fuzzer.c2
-rw-r--r--libiberty/testsuite/test-demangle.c2
-rw-r--r--libiberty/testsuite/test-expandargv.c2
-rw-r--r--libiberty/testsuite/test-pexecute.c2
-rw-r--r--libiberty/testsuite/test-strtol.c2
-rw-r--r--libiberty/timeval-utils.c2
-rw-r--r--libiberty/unlink-if-ordinary.c2
-rw-r--r--libiberty/vasprintf.c2
-rw-r--r--libiberty/vfprintf.c2
-rw-r--r--libiberty/vprintf-support.c2
-rw-r--r--libiberty/vprintf-support.h2
-rw-r--r--libiberty/vsnprintf.c2
-rw-r--r--libiberty/vsprintf.c2
-rw-r--r--libiberty/xasprintf.c2
-rw-r--r--libiberty/xexit.c2
-rw-r--r--libiberty/xmalloc.c3
-rw-r--r--libiberty/xstrndup.c7
-rw-r--r--libiberty/xvasprintf.c2
95 files changed, 113 insertions, 134 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 33ad3c71191..de41f89d5e9 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-04 Alan Modra <amodra@gmail.com>
+
+ Sync with gcc.
+
2016-12-12 Nathan Sidwell <nathan@acm.org>
PR c++/78252
@@ -10,7 +14,7 @@
is_lambda_arg.
<DEMANGLE_COMPONENT_LAMBDA>: Increment is_lambda_arg around arg
printing.
- * testsuite/demangle-expected: Add lambda auto mangling cases.
+ * testsuite/demangle-expected: Add lambda auto mangling cases.
2016-12-08 Alan Modra <amodra@gmail.com>
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 0ff9e45e45e..25cfa29ad5e 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -1,9 +1,7 @@
# Makefile for the libiberty library.
# Originally written by K. Richard Pixley <rich@cygnus.com>.
#
-# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-# 2012, 2014, 2015 Free Software Foundation
+# Copyright (C) 1990-2017 Free Software Foundation, Inc.
#
# This file is part of the libiberty library.
# Libiberty is free software; you can redistribute it and/or
@@ -484,7 +482,8 @@ configure_deps = $(srcdir)/aclocal.m4 \
$(srcdir)/../config/acx.m4 \
$(srcdir)/../config/no-executables.m4 \
$(srcdir)/../config/override.m4 \
- $(srcdir)/../config/warnings.m4 \
+ $(srcdir)/../config/picflag.m4 \
+ $(srcdir)/../config/warnings.m4
$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(configure_deps)
cd $(srcdir) && $(AUTOCONF)
diff --git a/libiberty/_doprnt.c b/libiberty/_doprnt.c
index 9723f32e6c0..6aa3fd88f05 100644
--- a/libiberty/_doprnt.c
+++ b/libiberty/_doprnt.c
@@ -1,5 +1,5 @@
/* Provide a version of _doprnt in terms of fprintf.
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
Contributed by Kaveh Ghazi (ghazi@caip.rutgers.edu) 3/29/98
This program is free software; you can redistribute it and/or modify it
diff --git a/libiberty/argv.c b/libiberty/argv.c
index fd43e78b170..c544dad73ee 100644
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -1,5 +1,5 @@
/* Create and destroy argument vectors (argv's)
- Copyright (C) 1992, 2001, 2010, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2017 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support
This file is part of the libiberty library.
diff --git a/libiberty/asprintf.c b/libiberty/asprintf.c
index 961ad4dbb00..c3f73cdb782 100644
--- a/libiberty/asprintf.c
+++ b/libiberty/asprintf.c
@@ -1,6 +1,6 @@
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller.
- Copyright (C) 1997, 2003, 2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2017 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of the libiberty library.
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c
index 8e1e84be765..16edb20f3ea 100644
--- a/libiberty/choose-temp.c
+++ b/libiberty/choose-temp.c
@@ -1,5 +1,5 @@
/* Utility to pick a temporary filename prefix.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/clock.c b/libiberty/clock.c
index 07d902e8a16..4af8d24b3d3 100644
--- a/libiberty/clock.c
+++ b/libiberty/clock.c
@@ -1,5 +1,5 @@
/* ANSI-compatible clock function.
- Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
This file is part of the libiberty library. This library is free
software; you can redistribute it and/or modify it under the
diff --git a/libiberty/concat.c b/libiberty/concat.c
index 7846a19393b..e9671bb94cc 100644
--- a/libiberty/concat.c
+++ b/libiberty/concat.c
@@ -1,5 +1,5 @@
/* Concatenate variable number of strings.
- Copyright (C) 1991, 1994, 2001, 2011, 2013 Free Software Foundation, Inc.
+ Copyright (C) 1991-2017 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support
This file is part of the libiberty library.
diff --git a/libiberty/configure b/libiberty/configure
index b95e000f2e4..868793558f0 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5097,7 +5097,7 @@ case "${host}" in
# If we are using a compiler supporting mdynamic-no-pic
# and the option has been tested as safe to add, then cancel
# it here, since the code generated is incompatible with shared
- # libs.
+ # libs.
*-mdynamic-no-pic*) PICFLAG='-fno-common -mno-dynamic-no-pic' ;;
*) PICFLAG=-fno-common ;;
esac
diff --git a/libiberty/copying-lib.texi b/libiberty/copying-lib.texi
index 31ef68bf495..3ff3a104a8a 100644
--- a/libiberty/copying-lib.texi
+++ b/libiberty/copying-lib.texi
@@ -5,7 +5,7 @@
@center Version 2.1, February 1999
@display
-Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc.
+Copyright @copyright{} 1991-2017 Free Software Foundation, Inc.
51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 4671bc2eb0e..15ef3b48785 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -1,6 +1,5 @@
/* Demangler for g++ V3 ABI.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014
- Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@wasabisystems.com>.
This file is part of the libiberty library, which is part of GCC.
@@ -2593,7 +2592,11 @@ cplus_demangle_type (struct d_info *di)
/* auto */
ret = d_make_name (di, "auto", 4);
break;
-
+ case 'c':
+ /* decltype(auto) */
+ ret = d_make_name (di, "decltype(auto)", 14);
+ break;
+
case 'f':
/* 32-bit decimal floating point */
ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[26]);
@@ -4568,7 +4571,7 @@ d_maybe_print_fold_expression (struct d_print_info *dpi, int options,
static void
d_print_comp_inner (struct d_print_info *dpi, int options,
- const struct demangle_component *dc)
+ const struct demangle_component *dc)
{
/* Magic variable to let reference smashing skip over the next modifier
without needing to modify *dc. */
diff --git a/libiberty/cp-demangle.h b/libiberty/cp-demangle.h
index 197883e2560..a2657755f11 100644
--- a/libiberty/cp-demangle.h
+++ b/libiberty/cp-demangle.h
@@ -1,6 +1,5 @@
/* Internal demangler interface for g++ V3 ABI.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@wasabisystems.com>.
This file is part of the libiberty library, which is part of GCC.
diff --git a/libiberty/cp-demint.c b/libiberty/cp-demint.c
index efcc5b7f5c0..64baffac8dd 100644
--- a/libiberty/cp-demint.c
+++ b/libiberty/cp-demint.c
@@ -1,5 +1,5 @@
/* Demangler component interface functions.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@wasabisystems.com>.
This file is part of the libiberty library, which is part of GCC.
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 0386da59c3d..a990e072975 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -1,6 +1,5 @@
/* Demangler for GNU C++
- Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1989-2017 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.uucp)
Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
diff --git a/libiberty/crc32.c b/libiberty/crc32.c
index 52c982fb583..6fa935b4b5b 100644
--- a/libiberty/crc32.c
+++ b/libiberty/crc32.c
@@ -1,5 +1,5 @@
/* crc32.c
- Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c
index 4ad90a6c58c..12457f003b1 100644
--- a/libiberty/d-demangle.c
+++ b/libiberty/d-demangle.c
@@ -1,5 +1,5 @@
/* Demangler for the D programming language
- Copyright 2014, 2015, 2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2017 Free Software Foundation, Inc.
Written by Iain Buclaw (ibuclaw@gdcproject.org)
This file is part of the libiberty library.
diff --git a/libiberty/dwarfnames.c b/libiberty/dwarfnames.c
index 7017308d987..62563b75c8f 100644
--- a/libiberty/dwarfnames.c
+++ b/libiberty/dwarfnames.c
@@ -1,5 +1,5 @@
/* Names of various DWARF tags.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2017 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/libiberty/dyn-string.c b/libiberty/dyn-string.c
index faa8d947711..804821425b5 100644
--- a/libiberty/dyn-string.c
+++ b/libiberty/dyn-string.c
@@ -1,5 +1,5 @@
/* An abstract string datatype.
- Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
diff --git a/libiberty/fdmatch.c b/libiberty/fdmatch.c
index f613cb3c01e..a28251511fd 100644
--- a/libiberty/fdmatch.c
+++ b/libiberty/fdmatch.c
@@ -1,5 +1,5 @@
/* Compare two open file descriptors to see if they refer to the same file.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/fibheap.c b/libiberty/fibheap.c
index a37ee4ef270..48db33aa3f5 100644
--- a/libiberty/fibheap.c
+++ b/libiberty/fibheap.c
@@ -1,5 +1,5 @@
/* A Fibonacci heap datatype.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
Contributed by Daniel Berlin (dan@cgsoftware.com).
This file is part of GNU CC.
diff --git a/libiberty/filename_cmp.c b/libiberty/filename_cmp.c
index 150488cbab1..e196bdfadd8 100644
--- a/libiberty/filename_cmp.c
+++ b/libiberty/filename_cmp.c
@@ -1,6 +1,6 @@
/* File name comparison routine.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c
index 9190e1469d9..7e7c4165eca 100644
--- a/libiberty/floatformat.c
+++ b/libiberty/floatformat.c
@@ -1,6 +1,5 @@
/* IEEE floating point support routines, for GDB, the GNU Debugger.
- Copyright 1991, 1994, 1999, 2000, 2003, 2005, 2006, 2010, 2012, 2015
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file is part of GDB.
diff --git a/libiberty/fnmatch.c b/libiberty/fnmatch.c
index fc897be2c6f..8530be8d07d 100644
--- a/libiberty/fnmatch.c
+++ b/libiberty/fnmatch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
NOTE: This source is derived from an old version taken from the GNU C
Library (glibc).
diff --git a/libiberty/fopen_unlocked.c b/libiberty/fopen_unlocked.c
index d1f78c46244..e76358e7309 100644
--- a/libiberty/fopen_unlocked.c
+++ b/libiberty/fopen_unlocked.c
@@ -1,5 +1,5 @@
/* Implement fopen_unlocked and related functions.
- Copyright (C) 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library.
diff --git a/libiberty/gather-docs b/libiberty/gather-docs
index 2f1f3b1f699..d6f2f06e847 100644
--- a/libiberty/gather-docs
+++ b/libiberty/gather-docs
@@ -1,8 +1,7 @@
#!/usr/bin/perl
# -*- perl -*-
-# Copyright (C) 2001, 2009, 2011
-# Free Software Foundation
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is part of the libiberty library.
# Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/getopt.c b/libiberty/getopt.c
index d9c3532ce11..bb778140446 100644
--- a/libiberty/getopt.c
+++ b/libiberty/getopt.c
@@ -3,8 +3,7 @@
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
- Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1987-2017 Free Software Foundation, Inc.
NOTE: This source is derived from an old version taken from the GNU C
Library (glibc).
diff --git a/libiberty/getopt1.c b/libiberty/getopt1.c
index 255b1445637..02f8487fa0d 100644
--- a/libiberty/getopt1.c
+++ b/libiberty/getopt1.c
@@ -1,6 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2005
- Free Software Foundation, Inc.
+ Copyright (C) 1987-2017 Free Software Foundation, Inc.
NOTE: This source is derived from an old version taken from the GNU C
Library (glibc).
diff --git a/libiberty/getruntime.c b/libiberty/getruntime.c
index 1e0daad19ac..3a85d9ef4a9 100644
--- a/libiberty/getruntime.c
+++ b/libiberty/getruntime.c
@@ -1,5 +1,5 @@
/* Return time used so far, in microseconds.
- Copyright (C) 1994, 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 99381b17fd6..7c4d3d9ca83 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -1,6 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2017 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This file is part of the libiberty library.
diff --git a/libiberty/hex.c b/libiberty/hex.c
index 5eeafdbd158..d93508c896a 100644
--- a/libiberty/hex.c
+++ b/libiberty/hex.c
@@ -1,5 +1,5 @@
/* Hex character manipulation support.
- Copyright (C) 1995, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/lbasename.c b/libiberty/lbasename.c
index 87c50faad40..4241a3bd699 100644
--- a/libiberty/lbasename.c
+++ b/libiberty/lbasename.c
@@ -1,6 +1,6 @@
/* Libiberty basename. Like basename, but is not overridden by the
system C library.
- Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2001-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/libiberty.texi b/libiberty/libiberty.texi
index f4af66d40b9..f1ea3950059 100644
--- a/libiberty/libiberty.texi
+++ b/libiberty/libiberty.texi
@@ -24,8 +24,7 @@
@ifinfo
This manual describes the GNU @libib library of utility subroutines.
-Copyright @copyright{} 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-2009, 2010 Free Software Foundation, Inc.
+Copyright @copyright{} 2001-2017 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
@@ -51,8 +50,7 @@ notice identical to this one except for the removal of this paragraph
@vskip 0pt plus 1filll
-Copyright @copyright{} 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-2009, 2010 Free Software Foundation, Inc.
+Copyright @copyright{} 2001-2017 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
diff --git a/libiberty/lrealpath.c b/libiberty/lrealpath.c
index b27c8de990e..0a19a5e3185 100644
--- a/libiberty/lrealpath.c
+++ b/libiberty/lrealpath.c
@@ -1,7 +1,7 @@
/* Libiberty realpath. Like realpath, but more consistent behavior.
Based on gdb_realpath from GDB.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
diff --git a/libiberty/maint-tool b/libiberty/maint-tool
index 1c94cdc79cd..4328a9a7234 100644
--- a/libiberty/maint-tool
+++ b/libiberty/maint-tool
@@ -1,8 +1,7 @@
#!/usr/bin/perl
# -*- perl -*-
-# Copyright (C) 2001, 2007, 2010, 2014
-# Free Software Foundation
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is part of the libiberty library.
# Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c
index fa813998be3..f74bbdc9038 100644
--- a/libiberty/make-relative-prefix.c
+++ b/libiberty/make-relative-prefix.c
@@ -1,6 +1,5 @@
/* Relative (relocatable) prefix support.
- Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2006, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1987-2017 Free Software Foundation, Inc.
This file is part of libiberty.
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c
index 244cc23c509..98e215d15e7 100644
--- a/libiberty/make-temp-file.c
+++ b/libiberty/make-temp-file.c
@@ -1,6 +1,5 @@
/* Utility to pick a temporary filename prefix.
- Copyright (C) 1996, 1997, 1998, 2001, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/md5.c b/libiberty/md5.c
index b30a6b7bfc5..7bcc1ff4428 100644
--- a/libiberty/md5.c
+++ b/libiberty/md5.c
@@ -1,6 +1,6 @@
/* md5.c - Functions to compute MD5 message digest of files or memory blocks
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995, 1996, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2017 Free Software Foundation, Inc.
NOTE: This source is derived from an old version taken from the GNU C
Library (glibc).
diff --git a/libiberty/memmem.c b/libiberty/memmem.c
index 147253f5bad..ec330f29a31 100644
--- a/libiberty/memmem.c
+++ b/libiberty/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007,2011 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
diff --git a/libiberty/mempcpy.c b/libiberty/mempcpy.c
index f85a07f2910..46a9bc7df40 100644
--- a/libiberty/mempcpy.c
+++ b/libiberty/mempcpy.c
@@ -1,5 +1,5 @@
/* Implement the mempcpy function.
- Copyright (C) 2003, 2004, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library.
diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c
index 0e06fe17059..8a0effdd5bf 100644
--- a/libiberty/mkstemps.c
+++ b/libiberty/mkstemps.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file is derived from mkstemp.c from the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libiberty/objalloc.c b/libiberty/objalloc.c
index 72e92d2ddce..d7e9ad03ccf 100644
--- a/libiberty/objalloc.c
+++ b/libiberty/objalloc.c
@@ -1,5 +1,5 @@
/* objalloc.c -- routines to allocate memory for objects
- Copyright 1997-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Solutions.
This program is free software; you can redistribute it and/or modify it
diff --git a/libiberty/obstack.c b/libiberty/obstack.c
index 6d8d67261dd..45e5a30ee6a 100644
--- a/libiberty/obstack.c
+++ b/libiberty/obstack.c
@@ -1,5 +1,5 @@
/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988-2015 Free Software Foundation, Inc.
+ Copyright (C) 1988-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libiberty/partition.c b/libiberty/partition.c
index 5f0745c9142..97d2b94eb04 100644
--- a/libiberty/partition.c
+++ b/libiberty/partition.c
@@ -1,5 +1,5 @@
/* List implementation of a partition of consecutive integers.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
This file is part of GNU CC.
diff --git a/libiberty/pex-common.c b/libiberty/pex-common.c
index 146010a6fca..3a6c7d45b9b 100644
--- a/libiberty/pex-common.c
+++ b/libiberty/pex-common.c
@@ -1,5 +1,5 @@
/* Common code for executing a program in a sub-process.
- Copyright (C) 2005, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@airs.com>.
This file is part of the libiberty library.
diff --git a/libiberty/pex-common.h b/libiberty/pex-common.h
index b6db248f692..cddcf6b18f1 100644
--- a/libiberty/pex-common.h
+++ b/libiberty/pex-common.h
@@ -1,7 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Shared logic.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/pex-djgpp.c b/libiberty/pex-djgpp.c
index b014ffa3317..ecb418abdb4 100644
--- a/libiberty/pex-djgpp.c
+++ b/libiberty/pex-djgpp.c
@@ -1,7 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. DJGPP specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/pex-msdos.c b/libiberty/pex-msdos.c
index fa0f40ac9ed..c9e837d04e7 100644
--- a/libiberty/pex-msdos.c
+++ b/libiberty/pex-msdos.c
@@ -1,7 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic MSDOS specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/pex-one.c b/libiberty/pex-one.c
index 696b8bcc62a..6b38860f4fd 100644
--- a/libiberty/pex-one.c
+++ b/libiberty/pex-one.c
@@ -1,5 +1,5 @@
/* Execute a program and wait for a result.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
index b48f315f83f..034194e4815 100644
--- a/libiberty/pex-unix.c
+++ b/libiberty/pex-unix.c
@@ -1,8 +1,7 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic Unix version
(also used for UWIN and VMS).
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2009,
- 2010, 2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index 4c15b0d11a0..9131158a188 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -1,7 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic Win32 specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/pexecute.c b/libiberty/pexecute.c
index 97f157447b7..b99a1e55c68 100644
--- a/libiberty/pexecute.c
+++ b/libiberty/pexecute.c
@@ -1,6 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/physmem.c b/libiberty/physmem.c
index 09fbf3f8c83..8068104bdc2 100644
--- a/libiberty/physmem.c
+++ b/libiberty/physmem.c
@@ -1,5 +1,5 @@
/* Calculate the size of physical memory.
- Copyright 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/libiberty/putenv.c b/libiberty/putenv.c
index 248f50e9203..9ea7f771d31 100644
--- a/libiberty/putenv.c
+++ b/libiberty/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995, 1996, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file based on putenv.c in the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libiberty/regex.c b/libiberty/regex.c
index 6854e3b41a0..66d09d935a2 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -3,8 +3,7 @@
(Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
- Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2005, 2010, 2013 Free Software Foundation, Inc.
+ Copyright (C) 1993-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
index 326881e48f7..3d7d0905b14 100644
--- a/libiberty/rust-demangle.c
+++ b/libiberty/rust-demangle.c
@@ -1,5 +1,5 @@
/* Demangler for the Rust programming language
- Copyright 2016 Free Software Foundation, Inc.
+ Copyright (C) 2016-2017 Free Software Foundation, Inc.
Written by David Tolnay (dtolnay@gmail.com).
This file is part of the libiberty library.
diff --git a/libiberty/safe-ctype.c b/libiberty/safe-ctype.c
index 0972b4b354f..5a13f827f8d 100644
--- a/libiberty/safe-ctype.c
+++ b/libiberty/safe-ctype.c
@@ -1,7 +1,6 @@
/* <ctype.h> replacement macros.
- Copyright (C) 2000, 2001, 2002, 2003, 2004,
- 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
Contributed by Zack Weinberg <zackw@stanford.edu>.
This file is part of the libiberty library.
diff --git a/libiberty/setenv.c b/libiberty/setenv.c
index 5b51193319d..d41b62176a3 100644
--- a/libiberty/setenv.c
+++ b/libiberty/setenv.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 2002, 2011, 2015
- Free Software Foundation, Inc.
+/* Copyright (C) 1992-2017 Free Software Foundation, Inc.
This file based on setenv.c in the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/libiberty/setproctitle.c b/libiberty/setproctitle.c
index 6a2fe8ce3a5..f42a112b637 100644
--- a/libiberty/setproctitle.c
+++ b/libiberty/setproctitle.c
@@ -1,5 +1,5 @@
/* Set the title of a process.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/sha1.c b/libiberty/sha1.c
index 617e743a15e..df1518e96fe 100644
--- a/libiberty/sha1.c
+++ b/libiberty/sha1.c
@@ -1,8 +1,7 @@
/* sha1.c - Functions to compute SHA1 message digest of files or
memory blocks according to the NIST specification FIPS-180-1.
- Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2008 Free Software
- Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
diff --git a/libiberty/simple-object-coff.c b/libiberty/simple-object-coff.c
index a7802a52076..0283b15c803 100644
--- a/libiberty/simple-object-coff.c
+++ b/libiberty/simple-object-coff.c
@@ -1,5 +1,5 @@
/* simple-object-coff.c -- routines to manipulate COFF object files.
- Copyright 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
This program is free software; you can redistribute it and/or modify it
diff --git a/libiberty/simple-object-common.h b/libiberty/simple-object-common.h
index bef9b08cef8..cda4038c9d7 100644
--- a/libiberty/simple-object-common.h
+++ b/libiberty/simple-object-common.h
@@ -1,5 +1,5 @@
/* simple-object-common.h -- common structs for object file manipulation.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/simple-object-elf.c b/libiberty/simple-object-elf.c
index 8594cf99f41..a733e4b1a2a 100644
--- a/libiberty/simple-object-elf.c
+++ b/libiberty/simple-object-elf.c
@@ -1,5 +1,5 @@
/* simple-object-elf.c -- routines to manipulate ELF object files.
- Copyright 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
This program is free software; you can redistribute it and/or modify it
diff --git a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c
index d1b676d777c..bbadf5d8330 100644
--- a/libiberty/simple-object-mach-o.c
+++ b/libiberty/simple-object-mach-o.c
@@ -1,5 +1,5 @@
/* simple-object-mach-o.c -- routines to manipulate Mach-O object files.
- Copyright 2010, 2011, 2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
This program is free software; you can redistribute it and/or modify it
diff --git a/libiberty/simple-object-xcoff.c b/libiberty/simple-object-xcoff.c
index ff1dc18079e..8a159398787 100644
--- a/libiberty/simple-object-xcoff.c
+++ b/libiberty/simple-object-xcoff.c
@@ -1,5 +1,5 @@
/* simple-object-coff.c -- routines to manipulate XCOFF object files.
- Copyright 2013 Free Software Foundation, Inc.
+ Copyright (C) 2013-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google and David Edelsohn, IBM.
This program is free software; you can redistribute it and/or modify it
diff --git a/libiberty/simple-object.c b/libiberty/simple-object.c
index 5d379d053c4..8ea9cf129fd 100644
--- a/libiberty/simple-object.c
+++ b/libiberty/simple-object.c
@@ -1,5 +1,5 @@
/* simple-object.c -- simple routines to read and write object files.
- Copyright 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
This program is free software; you can redistribute it and/or modify it
diff --git a/libiberty/snprintf.c b/libiberty/snprintf.c
index 49bcd8300d2..a37a47ebb8c 100644
--- a/libiberty/snprintf.c
+++ b/libiberty/snprintf.c
@@ -1,5 +1,5 @@
/* Implement the snprintf function.
- Copyright (C) 2003, 2011, 2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library. This library is free
diff --git a/libiberty/sort.c b/libiberty/sort.c
index 3738dd733e5..326986e09e0 100644
--- a/libiberty/sort.c
+++ b/libiberty/sort.c
@@ -1,5 +1,5 @@
/* Sorting algorithms.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
Contributed by Mark Mitchell <mark@codesourcery.com>.
This file is part of GNU CC.
diff --git a/libiberty/spaces.c b/libiberty/spaces.c
index 69d7a2d3f83..0612f87c72f 100644
--- a/libiberty/spaces.c
+++ b/libiberty/spaces.c
@@ -1,5 +1,5 @@
/* Allocate memory region filled with spaces.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/splay-tree.c b/libiberty/splay-tree.c
index 12bfa8bbdcc..383afa2ab7e 100644
--- a/libiberty/splay-tree.c
+++ b/libiberty/splay-tree.c
@@ -1,6 +1,5 @@
/* A splay-tree datatype.
- Copyright (C) 1998, 1999, 2000, 2001, 2009,
- 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
diff --git a/libiberty/stack-limit.c b/libiberty/stack-limit.c
index 82c3d44498e..3dbd8a875b4 100644
--- a/libiberty/stack-limit.c
+++ b/libiberty/stack-limit.c
@@ -1,5 +1,5 @@
/* Increase stack size limit if possible.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 Free Software Foundation, Inc.
This file is part of the libiberty library. This library is free
software; you can redistribute it and/or modify it under the
diff --git a/libiberty/stpcpy.c b/libiberty/stpcpy.c
index 57b32d1c841..ddbef285f27 100644
--- a/libiberty/stpcpy.c
+++ b/libiberty/stpcpy.c
@@ -1,5 +1,5 @@
/* Implement the stpcpy function.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library.
diff --git a/libiberty/stpncpy.c b/libiberty/stpncpy.c
index 83d54e60cb8..eb91f723a04 100644
--- a/libiberty/stpncpy.c
+++ b/libiberty/stpncpy.c
@@ -1,5 +1,5 @@
/* Implement the stpncpy function.
- Copyright (C) 2003, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library.
diff --git a/libiberty/strndup.c b/libiberty/strndup.c
index 9e9b4e2991f..0a4cda470ab 100644
--- a/libiberty/strndup.c
+++ b/libiberty/strndup.c
@@ -1,5 +1,5 @@
/* Implement the strndup function.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library.
@@ -33,7 +33,7 @@ memory was available. The result is always NUL terminated.
#include "ansidecl.h"
#include <stddef.h>
-extern size_t strlen (const char*);
+extern size_t strnlen (const char *s, size_t maxlen);
extern PTR malloc (size_t);
extern PTR memcpy (PTR, const PTR, size_t);
@@ -41,10 +41,7 @@ char *
strndup (const char *s, size_t n)
{
char *result;
- size_t len = strlen (s);
-
- if (n < len)
- len = n;
+ size_t len = strnlen (s, n);
result = (char *) malloc (len + 1);
if (!result)
diff --git a/libiberty/strtod.c b/libiberty/strtod.c
index e4da2113f5b..bf9d0576f3b 100644
--- a/libiberty/strtod.c
+++ b/libiberty/strtod.c
@@ -1,5 +1,5 @@
/* Implementation of strtod for systems with atof.
- Copyright (C) 1991, 1995, 2002, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file is part of the libiberty library. This library is free
software; you can redistribute it and/or modify it under the
diff --git a/libiberty/strverscmp.c b/libiberty/strverscmp.c
index 04e1e4ae99e..01bff6c9948 100644
--- a/libiberty/strverscmp.c
+++ b/libiberty/strverscmp.c
@@ -1,5 +1,5 @@
/* Compare strings while treating digits characters numerically.
- Copyright (C) 1997, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
diff --git a/libiberty/testsuite/Makefile.in b/libiberty/testsuite/Makefile.in
index da0b2f41c0c..97e486623df 100644
--- a/libiberty/testsuite/Makefile.in
+++ b/libiberty/testsuite/Makefile.in
@@ -1,7 +1,6 @@
#
# Makefile
-# Copyright (C) 1999, 2002, 2006
-# Free Software Foundation
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is part of the libiberty library.
# Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 803decdb096..b65dcd3450e 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -4200,6 +4200,9 @@ decltype (new auto({parm#1})) f<int>(int)
_Z1fIiERDaRKT_S1_
auto& f<int>(int const&, int)
--format=gnu-v3
+_Z1gIiEDcRKT_S0_
+decltype(auto) g<int>(int const&, int)
+--format=gnu-v3
_Z1gILi1EEvR1AIXT_EER1BIXscbT_EE
void g<1>(A<1>&, B<static_cast<bool>(1)>&)
--format=gnu-v3
diff --git a/libiberty/testsuite/demangler-fuzzer.c b/libiberty/testsuite/demangler-fuzzer.c
index aff70247301..5663513862b 100644
--- a/libiberty/testsuite/demangler-fuzzer.c
+++ b/libiberty/testsuite/demangler-fuzzer.c
@@ -1,6 +1,6 @@
/* Demangler fuzzer.
- Copyright (C) 2014 Free Software Foundation, Inc.
+ Copyright (C) 2014-2017 Free Software Foundation, Inc.
This file is part of GNU libiberty.
diff --git a/libiberty/testsuite/test-demangle.c b/libiberty/testsuite/test-demangle.c
index 44062478c09..9e06b33476d 100644
--- a/libiberty/testsuite/test-demangle.c
+++ b/libiberty/testsuite/test-demangle.c
@@ -1,5 +1,5 @@
/* Demangler test program,
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
Written by Zack Weinberg <zack@codesourcery.com
This file is part of GNU libiberty.
diff --git a/libiberty/testsuite/test-expandargv.c b/libiberty/testsuite/test-expandargv.c
index 0edd751722b..6d7ee8bccb6 100644
--- a/libiberty/testsuite/test-expandargv.c
+++ b/libiberty/testsuite/test-expandargv.c
@@ -1,5 +1,5 @@
/* expandargv test program,
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006-2017 Free Software Foundation, Inc.
Written by Carlos O'Donell <carlos@codesourcery.com>
This file is part of the libiberty library, which is part of GCC.
diff --git a/libiberty/testsuite/test-pexecute.c b/libiberty/testsuite/test-pexecute.c
index f62239d49b8..66d2d370b84 100644
--- a/libiberty/testsuite/test-pexecute.c
+++ b/libiberty/testsuite/test-pexecute.c
@@ -1,5 +1,5 @@
/* Pexecute test program,
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@airs.com>.
This file is part of GNU libiberty.
diff --git a/libiberty/testsuite/test-strtol.c b/libiberty/testsuite/test-strtol.c
index 6faf81b5cae..f79980bf64d 100644
--- a/libiberty/testsuite/test-strtol.c
+++ b/libiberty/testsuite/test-strtol.c
@@ -1,5 +1,5 @@
/* Test program for strtol family of funtions,
- Copyright (C) 2014 Free Software Foundation, Inc.
+ Copyright (C) 2014-2017 Free Software Foundation, Inc.
Written by Yury Gribov <y.gribov@samsung.com>
This file is part of the libiberty library, which is part of GCC.
diff --git a/libiberty/timeval-utils.c b/libiberty/timeval-utils.c
index 4c9f6a85ee2..c625988131c 100644
--- a/libiberty/timeval-utils.c
+++ b/libiberty/timeval-utils.c
@@ -1,5 +1,5 @@
/* Basic struct timeval utilities.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/unlink-if-ordinary.c b/libiberty/unlink-if-ordinary.c
index c03b4dd7c70..69107e82a54 100644
--- a/libiberty/unlink-if-ordinary.c
+++ b/libiberty/unlink-if-ordinary.c
@@ -1,5 +1,5 @@
/* unlink-if-ordinary.c - remove link to a file unless it is special
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004-2017 Free Software Foundation, Inc.
This file is part of the libiberty library. This library is free
software; you can redistribute it and/or modify it under the
diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c
index 6ffe2dd7516..a14bcc5e5b3 100644
--- a/libiberty/vasprintf.c
+++ b/libiberty/vasprintf.c
@@ -1,6 +1,6 @@
/* Like vsprintf but provides a pointer to malloc'd storage, which must
be freed by the caller.
- Copyright (C) 1994, 2003, 2011, 2013 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/vfprintf.c b/libiberty/vfprintf.c
index 9bd3ed555d0..4e375c949f5 100644
--- a/libiberty/vfprintf.c
+++ b/libiberty/vfprintf.c
@@ -1,6 +1,6 @@
/* Provide a version vfprintf in terms of _doprnt.
By Kaveh Ghazi (ghazi@caip.rutgers.edu) 3/29/98
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
*/
#include "ansidecl.h"
diff --git a/libiberty/vprintf-support.c b/libiberty/vprintf-support.c
index 171232f1b0f..f8cac816d88 100644
--- a/libiberty/vprintf-support.c
+++ b/libiberty/vprintf-support.c
@@ -1,6 +1,6 @@
/* Estimate the length of the string generated by a vprintf-like
function. Used by vasprintf and xvasprintf.
- Copyright (C) 1994, 2003, 2011, 2013, 2014 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/vprintf-support.h b/libiberty/vprintf-support.h
index 9d2680aac89..1ac25f93ea6 100644
--- a/libiberty/vprintf-support.h
+++ b/libiberty/vprintf-support.h
@@ -1,6 +1,6 @@
/* Estimate the length of the string generated by a vprintf-like
function. Use by vasprintf and xvasprintf.
- Copyright (C) 1994, 2003, 2011, 2013, 2014 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/vsnprintf.c b/libiberty/vsnprintf.c
index 2c441a72f60..8217b68e81e 100644
--- a/libiberty/vsnprintf.c
+++ b/libiberty/vsnprintf.c
@@ -1,5 +1,5 @@
/* Implement the vsnprintf function.
- Copyright (C) 2003, 2004, 2005, 2011, 2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library. This library is free
diff --git a/libiberty/vsprintf.c b/libiberty/vsprintf.c
index 99e704493f5..1aea075a7dd 100644
--- a/libiberty/vsprintf.c
+++ b/libiberty/vsprintf.c
@@ -3,7 +3,7 @@
implementations of stdio; newer ones should already have vsprintf.
Written by Per Bothner of Cygnus Support.
Based on libg++'s "form" (written by Doug Lea; dl@rocky.oswego.edu).
- Copyright (C) 1991, 1995, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file is part of the libiberty library. This library is free
software; you can redistribute it and/or modify it under the
diff --git a/libiberty/xasprintf.c b/libiberty/xasprintf.c
index 4f72bb26655..ab5d59219b6 100644
--- a/libiberty/xasprintf.c
+++ b/libiberty/xasprintf.c
@@ -1,5 +1,5 @@
/* Implement the xasprintf function.
- Copyright (C) 2014 Free Software Foundation, Inc.
+ Copyright (C) 2014-2017 Free Software Foundation, Inc.
Contributed by Manuel Lopez-Ibanez.
This file is part of the libiberty library.
diff --git a/libiberty/xexit.c b/libiberty/xexit.c
index 421e5e23841..79e57d4cd1f 100644
--- a/libiberty/xexit.c
+++ b/libiberty/xexit.c
@@ -1,5 +1,5 @@
/* xexit.c -- Run any exit handlers, then exit.
- Copyright (C) 1994, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/xmalloc.c b/libiberty/xmalloc.c
index f849aee53e2..555c8b7c389 100644
--- a/libiberty/xmalloc.c
+++ b/libiberty/xmalloc.c
@@ -1,6 +1,5 @@
/* memory allocation routines with error checking.
- Copyright 1989, 1990, 1991, 1992, 1993, 1994, 2015
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2017 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/libiberty/xstrndup.c b/libiberty/xstrndup.c
index 0a41f608ec0..53f44514a5f 100644
--- a/libiberty/xstrndup.c
+++ b/libiberty/xstrndup.c
@@ -1,5 +1,5 @@
/* Implement the xstrndup function.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library.
@@ -48,10 +48,7 @@ char *
xstrndup (const char *s, size_t n)
{
char *result;
- size_t len = strlen (s);
-
- if (n < len)
- len = n;
+ size_t len = strnlen (s, n);
result = XNEWVEC (char, len + 1);
diff --git a/libiberty/xvasprintf.c b/libiberty/xvasprintf.c
index 9e9a9d39e11..7842d05cedf 100644
--- a/libiberty/xvasprintf.c
+++ b/libiberty/xvasprintf.c
@@ -1,5 +1,5 @@
/* Implement the xvasprintf function.
- Copyright (C) 2014 Free Software Foundation, Inc.
+ Copyright (C) 2014-2017 Free Software Foundation, Inc.
Contributed by Manuel Lopez-Ibanez.
This file is part of the libiberty library.