diff options
Diffstat (limited to 'posix')
193 files changed, 393 insertions, 382 deletions
diff --git a/posix/Makefile b/posix/Makefile index 15e8818787..f94e023c60 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991-2015 Free Software Foundation, Inc. +# Copyright (C) 1991-2016 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 @@ -64,7 +64,7 @@ routines := \ aux := init-posix environ tests := tstgetopt testfnm runtests runptests \ tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \ - tst-mmap tst-getaddrinfo tst-truncate \ + tst-mmap tst-mmap-offset tst-getaddrinfo tst-truncate \ tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \ tst-chmod bug-regex1 bug-regex2 bug-regex3 bug-regex4 \ tst-gnuglob tst-regex bug-regex5 bug-regex6 bug-regex7 \ @@ -148,6 +148,36 @@ $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test '$(run-program-env)' '$(test-program-prefix-after-env)'; \ $(evaluate-test) endif + +LOCALES := cs_CZ.UTF-8 da_DK.ISO-8859-1 de_DE.ISO-8859-1 de_DE.UTF-8 \ + en_US.UTF-8 es_US.ISO-8859-1 es_US.UTF-8 ja_JP.EUC-JP tr_TR.UTF-8 +include ../gen-locales.mk + +$(objpfx)bug-regex1.out: $(gen-locales) +$(objpfx)bug-regex4.out: $(gen-locales) +$(objpfx)bug-regex5.out: $(gen-locales) +$(objpfx)bug-regex6.out: $(gen-locales) +$(objpfx)bug-regex17.out: $(gen-locales) +$(objpfx)bug-regex18.out: $(gen-locales) +$(objpfx)bug-regex19.out: $(gen-locales) +$(objpfx)bug-regex20.out: $(gen-locales) +$(objpfx)bug-regex22.out: $(gen-locales) +$(objpfx)bug-regex23.out: $(gen-locales) +$(objpfx)bug-regex25.out: $(gen-locales) +$(objpfx)bug-regex26.out: $(gen-locales) +$(objpfx)bug-regex30.out: $(gen-locales) +$(objpfx)bug-regex32.out: $(gen-locales) +$(objpfx)bug-regex33.out: $(gen-locales) +$(objpfx)bug-regex34.out: $(gen-locales) +$(objpfx)bug-regex35.out: $(gen-locales) +$(objpfx)tst-fnmatch.out: $(gen-locales) +$(objpfx)tst-fnmatch4.out: $(gen-locales) +$(objpfx)tst-fnmatch5.out: $(gen-locales) +$(objpfx)tst-regex.out: $(gen-locales) +$(objpfx)tst-regex2.out: $(gen-locales) +$(objpfx)tst-regexloc.out: $(gen-locales) +$(objpfx)tst-rxspencer.out: $(gen-locales) +$(objpfx)tst-rxspencer-no-utf8.out: $(gen-locales) endif # If we will use the generic uname implementation, we must figure out what @@ -159,7 +189,6 @@ $(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make '$(config-machine)-$(config-vendor)' > $@.new mv -f $@.new $@ -CFLAGS-regex.c = -Wno-strict-prototypes CFLAGS-getaddrinfo.c = -DRESOLVER -fexceptions CFLAGS-pause.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-pread.c = -fexceptions -fasynchronous-unwind-tables diff --git a/posix/_exit.c b/posix/_exit.c index f4d76a10d0..e79916f677 100644 --- a/posix/_exit.c +++ b/posix/_exit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -22,8 +22,7 @@ terminate program execution, using the low-order 8 bits of the given integer as status. */ void -_exit (status) - int status; +_exit (int status) { status &= 0xff; abort (); diff --git a/posix/alarm.c b/posix/alarm.c index 1ecfc4fbb8..7defa4b97a 100644 --- a/posix/alarm.c +++ b/posix/alarm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -26,8 +26,7 @@ to 0 and check its value after calling `alarm', and this might tell you. The signal may come late due to processor scheduling. */ unsigned int -alarm (seconds) - unsigned int seconds; +alarm (unsigned int seconds) { __set_errno (ENOSYS); return 0; diff --git a/posix/annexc.c b/posix/annexc.c index f05273b96f..c87363b33c 100644 --- a/posix/annexc.c +++ b/posix/annexc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2015 Free Software Foundation, Inc. +/* Copyright (C) 1998-2016 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/posix/bits/posix1_lim.h b/posix/bits/posix1_lim.h index 400bc969a5..b0a37bdb0e 100644 --- a/posix/bits/posix1_lim.h +++ b/posix/bits/posix1_lim.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/bits/posix2_lim.h b/posix/bits/posix2_lim.h index 15754b8178..819af363f9 100644 --- a/posix/bits/posix2_lim.h +++ b/posix/bits/posix2_lim.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/bits/unistd.h b/posix/bits/unistd.h index a88faed914..0105f04f20 100644 --- a/posix/bits/unistd.h +++ b/posix/bits/unistd.h @@ -1,5 +1,5 @@ /* Checking macros for unistd functions. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 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/posix/bsd-getpgrp.c b/posix/bsd-getpgrp.c index d467ee53c8..1f86341f7b 100644 --- a/posix/bsd-getpgrp.c +++ b/posix/bsd-getpgrp.c @@ -1,5 +1,5 @@ /* BSD-compatible versions of getpgrp function. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 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/posix/bug-glob2.c b/posix/bug-glob2.c index 1f302fec7b..ddf5ec913b 100644 --- a/posix/bug-glob2.c +++ b/posix/bug-glob2.c @@ -1,6 +1,6 @@ /* Test glob memory management. for the filesystem access functions. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 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/posix/bug-regex10.c b/posix/bug-regex10.c index 26e6fecd4b..502a1c39b9 100644 --- a/posix/bug-regex10.c +++ b/posix/bug-regex10.c @@ -1,5 +1,5 @@ /* Test for re_match with non-zero start. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. diff --git a/posix/bug-regex11.c b/posix/bug-regex11.c index dd0f97c302..d3abe73c85 100644 --- a/posix/bug-regex11.c +++ b/posix/bug-regex11.c @@ -1,5 +1,5 @@ /* Regular expression tests. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. diff --git a/posix/bug-regex12.c b/posix/bug-regex12.c index b3a6730c6f..44a384873f 100644 --- a/posix/bug-regex12.c +++ b/posix/bug-regex12.c @@ -1,5 +1,5 @@ /* Regular expression tests. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. diff --git a/posix/bug-regex13.c b/posix/bug-regex13.c index 62730ccd88..7a0ad92c3f 100644 --- a/posix/bug-regex13.c +++ b/posix/bug-regex13.c @@ -1,5 +1,5 @@ /* Regular expression tests. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002. diff --git a/posix/bug-regex14.c b/posix/bug-regex14.c index 12fc4541b0..fe12d7ef9c 100644 --- a/posix/bug-regex14.c +++ b/posix/bug-regex14.c @@ -1,5 +1,5 @@ /* Tests re_comp and re_exec. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002. diff --git a/posix/bug-regex17.c b/posix/bug-regex17.c index 3dd2ba037c..8b9edfb3e8 100644 --- a/posix/bug-regex17.c +++ b/posix/bug-regex17.c @@ -1,5 +1,5 @@ /* German regular expression tests. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. diff --git a/posix/bug-regex18.c b/posix/bug-regex18.c index 0e2859dd1a..6902f52b82 100644 --- a/posix/bug-regex18.c +++ b/posix/bug-regex18.c @@ -1,5 +1,5 @@ /* Turkish regular expression tests. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. diff --git a/posix/bug-regex19.c b/posix/bug-regex19.c index 41312d54f2..46d52ba7d8 100644 --- a/posix/bug-regex19.c +++ b/posix/bug-regex19.c @@ -1,5 +1,5 @@ /* Regular expression tests. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/posix/bug-regex2.c b/posix/bug-regex2.c index 1c64615781..fe0a7543a1 100644 --- a/posix/bug-regex2.c +++ b/posix/bug-regex2.c @@ -1,5 +1,5 @@ /* Test for memory handling in regex. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. diff --git a/posix/bug-regex20.c b/posix/bug-regex20.c index 2ecc54894c..70fd3073db 100644 --- a/posix/bug-regex20.c +++ b/posix/bug-regex20.c @@ -1,5 +1,5 @@ /* Test for UTF-8 regular expression optimizations. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/posix/bug-regex21.c b/posix/bug-regex21.c index be76225e09..e6a9b6bf0d 100644 --- a/posix/bug-regex21.c +++ b/posix/bug-regex21.c @@ -1,5 +1,5 @@ /* Test for memory leaks in regcomp. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/posix/bug-regex22.c b/posix/bug-regex22.c index 673bae10ba..9884d3c6c4 100644 --- a/posix/bug-regex22.c +++ b/posix/bug-regex22.c @@ -1,5 +1,5 @@ /* Test re.translate != NULL. - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2004. diff --git a/posix/bug-regex23.c b/posix/bug-regex23.c index f36f3da99e..2825f8f0fa 100644 --- a/posix/bug-regex23.c +++ b/posix/bug-regex23.c @@ -1,5 +1,5 @@ /* Test we don't segfault on invalid UTF-8 sequence. - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2004. diff --git a/posix/bug-regex25.c b/posix/bug-regex25.c index c17722e4ef..2b2538e420 100644 --- a/posix/bug-regex25.c +++ b/posix/bug-regex25.c @@ -1,5 +1,5 @@ /* Test re_search in multibyte locale other than UTF-8. - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2006. diff --git a/posix/bug-regex26.c b/posix/bug-regex26.c index d950d5193c..5cfa2fbe06 100644 --- a/posix/bug-regex26.c +++ b/posix/bug-regex26.c @@ -1,5 +1,5 @@ /* Test re_search with dotless i. - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2006. diff --git a/posix/bug-regex27.c b/posix/bug-regex27.c index a44c4de0f9..8b29863199 100644 --- a/posix/bug-regex27.c +++ b/posix/bug-regex27.c @@ -1,5 +1,5 @@ /* Test REG_NEWLINE. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2007. diff --git a/posix/bug-regex28.c b/posix/bug-regex28.c index 93da1f5bba..dc1d4ea720 100644 --- a/posix/bug-regex28.c +++ b/posix/bug-regex28.c @@ -1,5 +1,5 @@ /* Test RE_HAT_LISTS_NOT_NEWLINE and RE_DOT_NEWLINE. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2007. diff --git a/posix/bug-regex3.c b/posix/bug-regex3.c index d59464450c..84314058ef 100644 --- a/posix/bug-regex3.c +++ b/posix/bug-regex3.c @@ -1,5 +1,5 @@ /* Test for case handling in regex. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2001. diff --git a/posix/bug-regex30.c b/posix/bug-regex30.c index bc76ad5fcb..e1ddf08090 100644 --- a/posix/bug-regex30.c +++ b/posix/bug-regex30.c @@ -1,5 +1,5 @@ /* Russian regular expression tests. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paolo Bonzini <pbonzini@redhat.com>, 2009. diff --git a/posix/bug-regex33.c b/posix/bug-regex33.c index ad2a8af13c..1a71af02ed 100644 --- a/posix/bug-regex33.c +++ b/posix/bug-regex33.c @@ -1,5 +1,5 @@ /* Test re_search with multi-byte characters in EUC-JP. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Stanislav Brabec <sbrabec@suse.cz>, 2012. diff --git a/posix/bug-regex34.c b/posix/bug-regex34.c index a7eca3875b..244bc69a98 100644 --- a/posix/bug-regex34.c +++ b/posix/bug-regex34.c @@ -1,5 +1,5 @@ /* Test re_search with multi-byte characters in UTF-8. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 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/posix/bug-regex35.c b/posix/bug-regex35.c index e0b61d424d..f2a0169eb7 100644 --- a/posix/bug-regex35.c +++ b/posix/bug-regex35.c @@ -1,5 +1,5 @@ /* Test regcomp with collating symbols in bracket expressions - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 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/posix/bug-regex36.c b/posix/bug-regex36.c index ffe506a880..32a4a57907 100644 --- a/posix/bug-regex36.c +++ b/posix/bug-regex36.c @@ -1,5 +1,5 @@ /* Test regcomp not leaking memory on parse errors - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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/posix/bug-regex4.c b/posix/bug-regex4.c index ec95acd4cb..016636a240 100644 --- a/posix/bug-regex4.c +++ b/posix/bug-regex4.c @@ -1,5 +1,5 @@ /* Test for re_search_2. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2001. diff --git a/posix/bug-regex6.c b/posix/bug-regex6.c index efcc890a9f..d932e248d4 100644 --- a/posix/bug-regex6.c +++ b/posix/bug-regex6.c @@ -1,5 +1,5 @@ /* Test for regexec. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. diff --git a/posix/bug-regex7.c b/posix/bug-regex7.c index 496a7ec426..a9296b0377 100644 --- a/posix/bug-regex7.c +++ b/posix/bug-regex7.c @@ -1,5 +1,5 @@ /* Test for regs allocation in re_search and re_match. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002. diff --git a/posix/bug-regex8.c b/posix/bug-regex8.c index c6e04e66d6..5c431305c8 100644 --- a/posix/bug-regex8.c +++ b/posix/bug-regex8.c @@ -1,5 +1,5 @@ /* Test for the STOP parameter of re_match_2 and re_search_2. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002. diff --git a/posix/bug-regex9.c b/posix/bug-regex9.c index b235e3058b..f5070c61e0 100644 --- a/posix/bug-regex9.c +++ b/posix/bug-regex9.c @@ -1,5 +1,5 @@ /* Test for memory handling in regex. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. diff --git a/posix/confstr.c b/posix/confstr.c index 7271c5c55f..aab34f2a8b 100644 --- a/posix/confstr.c +++ b/posix/confstr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -29,10 +29,7 @@ of BUF with the value corresponding to NAME and zero-terminate BUF. Return the number of bytes required to hold NAME's entire value. */ size_t -confstr (name, buf, len) - int name; - char *buf; - size_t len; +confstr (int name, char *buf, size_t len) { const char *string = ""; size_t string_len = 1; diff --git a/posix/cpio.h b/posix/cpio.h index 3568d2ffe3..9e712fe258 100644 --- a/posix/cpio.h +++ b/posix/cpio.h @@ -1,6 +1,6 @@ /* Extended cpio format from POSIX.1. This file is part of the GNU C Library. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU cpio. The GNU C Library is free software; you can redistribute it and/or diff --git a/posix/execl.c b/posix/execl.c index 7d89192675..102d19d9af 100644 --- a/posix/execl.c +++ b/posix/execl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -50,6 +50,7 @@ execl (const char *path, const char *arg, ...) { if (argv != initial_argv) free (argv); + va_end (args); return -1; } if (argv == initial_argv) diff --git a/posix/execle.c b/posix/execle.c index dff95b2c1f..8edc03a84a 100644 --- a/posix/execle.c +++ b/posix/execle.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -48,6 +48,7 @@ execle (const char *path, const char *arg, ...) { if (argv != initial_argv) free (argv); + va_end (args); return -1; } if (argv == initial_argv) diff --git a/posix/execlp.c b/posix/execlp.c index 5e45de967a..6700994a5b 100644 --- a/posix/execlp.c +++ b/posix/execlp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -50,6 +50,7 @@ execlp (const char *file, const char *arg, ...) { if (argv != initial_argv) free (argv); + va_end (args); return -1; } if (argv == initial_argv) diff --git a/posix/execv.c b/posix/execv.c index ee56f79ab5..16c0a02c43 100644 --- a/posix/execv.c +++ b/posix/execv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/execve.c b/posix/execve.c index 4f8adcf271..24d324f027 100644 --- a/posix/execve.c +++ b/posix/execve.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -23,10 +23,7 @@ /* Replace the current process, executing PATH with arguments ARGV and environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ int -__execve (path, argv, envp) - const char *path; - char *const argv[]; - char *const envp[]; +__execve (const char *path, char *const argv[], char *const envp[]) { if (path == NULL || argv == NULL || envp == NULL) { diff --git a/posix/execvp.c b/posix/execvp.c index fa0313911b..ea3d9d08ab 100644 --- a/posix/execvp.c +++ b/posix/execvp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -21,9 +21,7 @@ /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ int -execvp (file, argv) - const char *file; - char *const argv[]; +execvp (const char *file, char *const argv[]) { return __execvpe (file, argv, __environ); } diff --git a/posix/execvpe.c b/posix/execvpe.c index 5170e043d7..61697a74f0 100644 --- a/posix/execvpe.c +++ b/posix/execvpe.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -45,10 +45,7 @@ scripts_argv (const char *file, char *const argv[], int argc, char **new_argv) /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from ENVP. */ int -__execvpe (file, argv, envp) - const char *file; - char *const argv[]; - char *const envp[]; +__execvpe (const char *file, char *const argv[], char *const envp[]) { if (*file == '\0') { diff --git a/posix/fexecve.c b/posix/fexecve.c index 95c8385bcd..dc765c4a02 100644 --- a/posix/fexecve.c +++ b/posix/fexecve.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2015 Free Software Foundation, Inc. +/* Copyright (C) 1994-2016 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 @@ -23,10 +23,7 @@ /* Execute the file FD refers to, overlaying the running program image. ARGV and ENVP are passed to the new program, as for `execve'. */ int -fexecve (fd, argv, envp) - int fd; - char *const argv[]; - char *const envp[]; +fexecve (int fd, char *const argv[], char *const envp[]) { if (fd < 0 || argv == NULL || envp == NULL) { diff --git a/posix/fnmatch.c b/posix/fnmatch.c index fd85efa2c7..8bbaaa74b7 100644 --- a/posix/fnmatch.c +++ b/posix/fnmatch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -166,9 +166,7 @@ static int posixly_correct; # if !defined HAVE___STRCHRNUL && !defined _LIBC static char * -__strchrnul (s, c) - const char *s; - int c; +__strchrnul (const char *s, int c) { char *result = strchr (s, c); if (result == NULL) @@ -179,9 +177,7 @@ __strchrnul (s, c) # if HANDLE_MULTIBYTE && !defined HAVE___STRCHRNUL && !defined _LIBC static wchar_t * -__wcschrnul (s, c) - const wchar_t *s; - wint_t c; +__wcschrnul (const wchar_t *s, wint_t c) { wchar_t *result = wcschr (s, c); if (result == NULL) @@ -327,10 +323,7 @@ is_char_class (const wchar_t *wcs) int -fnmatch (pattern, string, flags) - const char *pattern; - const char *string; - int flags; +fnmatch (const char *pattern, const char *string, int flags) { # if HANDLE_MULTIBYTE if (__builtin_expect (MB_CUR_MAX, 1) != 1) diff --git a/posix/fnmatch.h b/posix/fnmatch.h index 28bde33dbf..fdfaf90ba9 100644 --- a/posix/fnmatch.h +++ b/posix/fnmatch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index f46c9dfedb..229904e11d 100644 --- a/posix/fnmatch_loop.c +++ b/posix/fnmatch_loop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -38,14 +38,8 @@ static const CHAR *END (const CHAR *patternp) internal_function; static int internal_function -FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used) - const CHAR *pattern; - const CHAR *string; - const CHAR *string_end; - int no_leading_period; - int flags; - struct STRUCT *ends; - size_t alloca_used; +FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, + int no_leading_period, int flags, struct STRUCT *ends, size_t alloca_used) { const CHAR *p = pattern, *n = string; UCHAR c; diff --git a/posix/fork.c b/posix/fork.c index 79540dbf31..b19aca3ddc 100644 --- a/posix/fork.c +++ b/posix/fork.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/fpathconf.c b/posix/fpathconf.c index c4f1cfec29..e0cb59b067 100644 --- a/posix/fpathconf.c +++ b/posix/fpathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -22,9 +22,7 @@ /* Get file-specific information about descriptor FD. */ long int -__fpathconf (fd, name) - int fd; - int name; +__fpathconf (int fd, int name) { if (fd < 0) { diff --git a/posix/gai_strerror.c b/posix/gai_strerror.c index cb304796bd..451130ba44 100644 --- a/posix/gai_strerror.c +++ b/posix/gai_strerror.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/get_child_max.c b/posix/get_child_max.c index 054e3f023e..48b487e902 100644 --- a/posix/get_child_max.c +++ b/posix/get_child_max.c @@ -1,5 +1,5 @@ /* Get POSIX {CHILD_MAX} run-time limit value. Stub version (no limit). - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 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/posix/getaddrinfo.c b/posix/getaddrinfo.c index 5e6cdc460b..205671baf3 100644 --- a/posix/getaddrinfo.c +++ b/posix/getaddrinfo.c @@ -1,5 +1,5 @@ /* Stub version of getaddrinfo function. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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/posix/getconf-speclist.c b/posix/getconf-speclist.c index 9c6c3c14e4..3c7500a178 100644 --- a/posix/getconf-speclist.c +++ b/posix/getconf-speclist.c @@ -1,5 +1,5 @@ /* List POSIX compilation environments for this libc. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 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/posix/getconf.c b/posix/getconf.c index 4cf606ae5f..3e03396ea7 100644 --- a/posix/getconf.c +++ b/posix/getconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -469,7 +469,7 @@ main (int argc, char *argv[]) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2015"); +"), "2016"); printf (gettext ("Written by %s.\n"), "Roland McGrath"); return 0; } diff --git a/posix/getegid.c b/posix/getegid.c index dbf28469e8..ac6dd0bec9 100644 --- a/posix/getegid.c +++ b/posix/getegid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/geteuid.c b/posix/geteuid.c index ff34d85e3a..c84de11cb2 100644 --- a/posix/geteuid.c +++ b/posix/geteuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/getgid.c b/posix/getgid.c index e50c5bd479..5e061db76c 100644 --- a/posix/getgid.c +++ b/posix/getgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/getgroups.c b/posix/getgroups.c index d8288129dc..45604ff69d 100644 --- a/posix/getgroups.c +++ b/posix/getgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -26,9 +26,7 @@ the calling process is in. Otherwise, fill in the group IDs of its supplementary groups in LIST and return the number written. */ int -__getgroups (size, list) - int size; - gid_t *list; +__getgroups (int size, gid_t *list) { #if defined (NGROUPS_MAX) && NGROUPS_MAX == 0 /* The system has no supplementary groups. */ diff --git a/posix/getopt.c b/posix/getopt.c index d30530f939..d6459a6f56 100644 --- a/posix/getopt.c +++ b/posix/getopt.c @@ -2,7 +2,7 @@ NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987-2015 Free Software Foundation, Inc. + Copyright (C) 1987-2016 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/posix/getopt.h b/posix/getopt.h index 56fa905c4c..fab340ac40 100644 --- a/posix/getopt.h +++ b/posix/getopt.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-2015 Free Software Foundation, Inc. + Copyright (C) 1989-2016 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/posix/getopt1.c b/posix/getopt1.c index b1af40e9b7..ad8ce700b4 100644 --- a/posix/getopt1.c +++ b/posix/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-2015 Free Software Foundation, Inc. + Copyright (C) 1987-2016 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/posix/getopt_init.c b/posix/getopt_init.c index ff3bc2c1c1..7692ca9b0b 100644 --- a/posix/getopt_init.c +++ b/posix/getopt_init.c @@ -1,5 +1,5 @@ /* Perform additional initialization for getopt functions in GNU libc. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/posix/getopt_int.h b/posix/getopt_int.h index 03d6227753..514a1beba4 100644 --- a/posix/getopt_int.h +++ b/posix/getopt_int.h @@ -1,5 +1,5 @@ /* Internal declarations for getopt. - Copyright (C) 1989-2015 Free Software Foundation, Inc. + Copyright (C) 1989-2016 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/posix/getpgid.c b/posix/getpgid.c index 05f72c34ab..6052d1cfd2 100644 --- a/posix/getpgid.c +++ b/posix/getpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -20,8 +20,7 @@ /* Get the process group ID of process PID. */ pid_t -__getpgid (pid) - pid_t pid; +__getpgid (pid_t pid) { return pid; } diff --git a/posix/getpgrp.c b/posix/getpgrp.c index 88e8eca638..200834d7f4 100644 --- a/posix/getpgrp.c +++ b/posix/getpgrp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/getpid.c b/posix/getpid.c index 18649f7c3f..c1c8ed6672 100644 --- a/posix/getpid.c +++ b/posix/getpid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/getppid.c b/posix/getppid.c index 20f7510b2d..dbbe86a2e3 100644 --- a/posix/getppid.c +++ b/posix/getppid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/getresgid.c b/posix/getresgid.c index fa75d0be30..291df032a1 100644 --- a/posix/getresgid.c +++ b/posix/getresgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/getresuid.c b/posix/getresuid.c index 6a07455572..af8a1a8b26 100644 --- a/posix/getresuid.c +++ b/posix/getresuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/getsid.c b/posix/getsid.c index fc19096696..8e40706bb7 100644 --- a/posix/getsid.c +++ b/posix/getsid.c @@ -1,5 +1,5 @@ /* getsid -- Return session ID of a process. Stub version. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 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/posix/getuid.c b/posix/getuid.c index b02206528a..6affa2a9ee 100644 --- a/posix/getuid.c +++ b/posix/getuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/glob.c b/posix/glob.c index d65e55dcd6..0c04c3ccfd 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -250,11 +250,8 @@ int #ifdef GLOB_ATTRIBUTE GLOB_ATTRIBUTE #endif -glob (pattern, flags, errfunc, pglob) - const char *pattern; - int flags; - int (*errfunc) (const char *, int); - glob_t *pglob; +glob (const char *pattern, int flags, int (*errfunc) (const char *, int), + glob_t *pglob) { const char *filename; char *dirname = NULL; @@ -1267,8 +1264,7 @@ libc_hidden_def (glob) /* Free storage allocated in PGLOB by a previous `glob' call. */ void -globfree (pglob) - glob_t *pglob; +globfree (glob_t *pglob) { if (pglob->gl_pathv != NULL) { @@ -1363,9 +1359,7 @@ prefix_array (const char *dirname, char **array, size_t n) /* We must not compile this function twice. */ #if !defined _LIBC || !defined NO_GLOB_PATTERN_P int -__glob_pattern_type (pattern, quote) - const char *pattern; - int quote; +__glob_pattern_type (const char *pattern, int quote) { const char *p; int ret = 0; @@ -1402,9 +1396,7 @@ __glob_pattern_type (pattern, quote) /* Return nonzero if PATTERN contains any metacharacters. Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ int -__glob_pattern_p (pattern, quote) - const char *pattern; - int quote; +__glob_pattern_p (const char *pattern, int quote) { return __glob_pattern_type (pattern, quote) == 1; } diff --git a/posix/glob.h b/posix/glob.h index 035ce08bfd..e4548f6f75 100644 --- a/posix/glob.h +++ b/posix/glob.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/glob64.c b/posix/glob64.c index 56ede77073..a5f5a7f9e2 100644 --- a/posix/glob64.c +++ b/posix/glob64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2015 Free Software Foundation, Inc. +/* Copyright (C) 1998-2016 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/posix/globtest.c b/posix/globtest.c index d5e77d31cb..e1b2073950 100644 --- a/posix/globtest.c +++ b/posix/globtest.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2016 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/posix/globtest.sh b/posix/globtest.sh index 7c9f590167..73fe11bd76 100755 --- a/posix/globtest.sh +++ b/posix/globtest.sh @@ -1,6 +1,6 @@ -#! /bin/bash +#!/bin/bash # Test for glob(3). -# Copyright (C) 1997-2015 Free Software Foundation, Inc. +# Copyright (C) 1997-2016 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/posix/group_member.c b/posix/group_member.c index 032b1cea5b..fa8da58802 100644 --- a/posix/group_member.c +++ b/posix/group_member.c @@ -1,5 +1,5 @@ /* `group_member' -- test if process is in a given group. - Copyright (C) 1995-2015 Free Software Foundation, Inc. + Copyright (C) 1995-2016 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 @@ -26,8 +26,7 @@ #endif int -__group_member (gid) - gid_t gid; +__group_member (gid_t gid) { int n, size; gid_t *groups; diff --git a/posix/nanosleep.c b/posix/nanosleep.c index 5736b9158c..fe68ce3d57 100644 --- a/posix/nanosleep.c +++ b/posix/nanosleep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/pathconf.c b/posix/pathconf.c index 2343d8dcdf..4f02f0ff80 100644 --- a/posix/pathconf.c +++ b/posix/pathconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -22,9 +22,7 @@ /* Get file-specific information about PATH. */ long int -__pathconf (path, name) - const char *path; - int name; +__pathconf (const char *path, int name) { if (path == NULL) { diff --git a/posix/pause.c b/posix/pause.c index 99aba0110e..567817ecc5 100644 --- a/posix/pause.c +++ b/posix/pause.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/posix-conf-vars.h b/posix/posix-conf-vars.h index 4661f00eb6..3df0b8dd29 100644 --- a/posix/posix-conf-vars.h +++ b/posix/posix-conf-vars.h @@ -1,6 +1,6 @@ /* Macros to check if a POSIX configuration variable is defined or set. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 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/posix/posix-envs.def b/posix/posix-envs.def index 312e8cb84d..f6aad17438 100644 --- a/posix/posix-envs.def +++ b/posix/posix-envs.def @@ -1,5 +1,5 @@ /* Handle POSIX compilation environments that may or may not be present. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 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/posix/posix_madvise.c b/posix/posix_madvise.c index 436676aa73..cc84c9732c 100644 --- a/posix/posix_madvise.c +++ b/posix/posix_madvise.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2015 Free Software Foundation, Inc. +/* Copyright (C) 1994-2016 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/posix/pread.c b/posix/pread.c index f8ff0fe8b9..3179eee9ef 100644 --- a/posix/pread.c +++ b/posix/pread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/pread64.c b/posix/pread64.c index 4e7e2c5d39..f34fcaa9df 100644 --- a/posix/pread64.c +++ b/posix/pread64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/pwrite.c b/posix/pwrite.c index 9428302156..9b09f1ccc1 100644 --- a/posix/pwrite.c +++ b/posix/pwrite.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/pwrite64.c b/posix/pwrite64.c index 121713a7de..a2a9e47d87 100644 --- a/posix/pwrite64.c +++ b/posix/pwrite64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/re_comp.h b/posix/re_comp.h index b9b9d798e3..1537125250 100644 --- a/posix/re_comp.h +++ b/posix/re_comp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/regcomp.c b/posix/regcomp.c index bf8aa1604c..b6126b7b98 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. @@ -216,10 +216,8 @@ const size_t __re_error_msgid_idx[] attribute_hidden = are set in BUFP on entry. */ const char * -re_compile_pattern (pattern, length, bufp) - const char *pattern; - size_t length; - struct re_pattern_buffer *bufp; +re_compile_pattern (const char *pattern, size_t length, + struct re_pattern_buffer *bufp) { reg_errcode_t ret; @@ -257,8 +255,7 @@ reg_syntax_t re_syntax_options; defined in regex.h. We return the old syntax. */ reg_syntax_t -re_set_syntax (syntax) - reg_syntax_t syntax; +re_set_syntax (reg_syntax_t syntax) { reg_syntax_t ret = re_syntax_options; @@ -270,8 +267,7 @@ weak_alias (__re_set_syntax, re_set_syntax) #endif int -re_compile_fastmap (bufp) - struct re_pattern_buffer *bufp; +re_compile_fastmap (struct re_pattern_buffer *bufp) { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; @@ -469,10 +465,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, the return codes and their meanings.) */ int -regcomp (preg, pattern, cflags) - regex_t *__restrict preg; - const char *__restrict pattern; - int cflags; +regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED @@ -531,11 +524,8 @@ weak_alias (__regcomp, regcomp) from either regcomp or regexec. We don't use PREG here. */ size_t -regerror (errcode, preg, errbuf, errbuf_size) - int errcode; - const regex_t *__restrict preg; - char *__restrict errbuf; - size_t errbuf_size; +regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, + size_t errbuf_size) { const char *msg; size_t msg_size; @@ -639,8 +629,7 @@ free_dfa_content (re_dfa_t *dfa) /* Free dynamically allocated space used by PREG. */ void -regfree (preg) - regex_t *preg; +regfree (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) @@ -673,8 +662,7 @@ char * regcomp/regexec above without link errors. */ weak_function # endif -re_comp (s) - const char *s; +re_comp (const char *s) { reg_errcode_t ret; char *fastmap; diff --git a/posix/regex.c b/posix/regex.c index 1e857369a5..d4cfbe5c6f 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. diff --git a/posix/regex.h b/posix/regex.h index 5b1981e170..90f0851790 100644 --- a/posix/regex.h +++ b/posix/regex.h @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985, 1989-2015 Free Software Foundation, Inc. + Copyright (C) 1985, 1989-2016 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/posix/regex_internal.c b/posix/regex_internal.c index 8597d7ed9a..16865d85d2 100644 --- a/posix/regex_internal.c +++ b/posix/regex_internal.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. diff --git a/posix/regex_internal.h b/posix/regex_internal.h index 154e96999d..02e040bd73 100644 --- a/posix/regex_internal.h +++ b/posix/regex_internal.h @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. @@ -45,7 +45,7 @@ # include <stdint.h> #endif /* HAVE_STDINT_H || _LIBC */ #if defined _LIBC -# include <bits/libc-lock.h> +# include <libc-lock.h> #else # define __libc_lock_define(CLASS,NAME) # define __libc_lock_init(NAME) do { } while (0) diff --git a/posix/regexec.c b/posix/regexec.c index 70cd6064dd..ec46c3a514 100644 --- a/posix/regexec.c +++ b/posix/regexec.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. @@ -219,12 +219,8 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len) We return 0 if we find a match and REG_NOMATCH if not. */ int -regexec (preg, string, nmatch, pmatch, eflags) - const regex_t *__restrict preg; - const char *__restrict string; - size_t nmatch; - regmatch_t pmatch[]; - int eflags; +regexec (const regex_t *__restrict preg, const char *__restrict string, + size_t nmatch, regmatch_t pmatch[], int eflags) { reg_errcode_t err; int start, length; @@ -305,11 +301,8 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); match was found and -2 indicates an internal error. */ int -re_match (bufp, string, length, start, regs) - struct re_pattern_buffer *bufp; - const char *string; - int length, start; - struct re_registers *regs; +re_match (struct re_pattern_buffer *bufp, const char *string, int length, + int start, struct re_registers *regs) { return re_search_stub (bufp, string, length, start, 0, length, regs, 1); } @@ -318,11 +311,8 @@ weak_alias (__re_match, re_match) #endif int -re_search (bufp, string, length, start, range, regs) - struct re_pattern_buffer *bufp; - const char *string; - int length, start, range; - struct re_registers *regs; +re_search (struct re_pattern_buffer *bufp, const char *string, int length, + int start, int range, struct re_registers *regs) { return re_search_stub (bufp, string, length, start, range, length, regs, 0); } @@ -331,11 +321,9 @@ weak_alias (__re_search, re_search) #endif int -re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) - struct re_pattern_buffer *bufp; - const char *string1, *string2; - int length1, length2, start, stop; - struct re_registers *regs; +re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int length1, + const char *string2, int length2, int start, + struct re_registers *regs, int stop) { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, 1); @@ -345,11 +333,9 @@ weak_alias (__re_match_2, re_match_2) #endif int -re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) - struct re_pattern_buffer *bufp; - const char *string1, *string2; - int length1, length2, start, range, stop; - struct re_registers *regs; +re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int length1, + const char *string2, int length2, int start, int range, + struct re_registers *regs, int stop) { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, 0); @@ -359,12 +345,11 @@ weak_alias (__re_search_2, re_search_2) #endif static int -re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, - stop, ret_len) - struct re_pattern_buffer *bufp; - const char *string1, *string2; - int length1, length2, start, range, stop, ret_len; - struct re_registers *regs; +internal_function +re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, + int length1, const char *string2, int length2, int start, + int range, struct re_registers *regs, + int stop, int ret_len) { const char *str; int rval; @@ -406,11 +391,10 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, otherwise the position of the match is returned. */ static int -re_search_stub (bufp, string, length, start, range, stop, regs, ret_len) - struct re_pattern_buffer *bufp; - const char *string; - int length, start, range, stop, ret_len; - struct re_registers *regs; +internal_function +re_search_stub (struct re_pattern_buffer *bufp, const char *string, int length, + int start, int range, int stop, struct re_registers *regs, + int ret_len) { reg_errcode_t result; regmatch_t *pmatch; @@ -495,10 +479,9 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len) } static unsigned -re_copy_regs (regs, pmatch, nregs, regs_allocated) - struct re_registers *regs; - regmatch_t *pmatch; - int nregs, regs_allocated; +internal_function +re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, int nregs, + int regs_allocated) { int rval = REGS_REALLOCATE; int i; @@ -575,11 +558,8 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated) freeing the old data. */ void -re_set_registers (bufp, regs, num_regs, starts, ends) - struct re_pattern_buffer *bufp; - struct re_registers *regs; - unsigned num_regs; - regoff_t *starts, *ends; +re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, + unsigned num_regs, regoff_t *starts, regoff_t *ends) { if (num_regs) { @@ -607,8 +587,7 @@ int # ifdef _LIBC weak_function # endif -re_exec (s) - const char *s; +re_exec (const char *s) { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } @@ -626,14 +605,10 @@ re_exec (s) (START + RANGE >= 0 && START + RANGE <= LENGTH) */ static reg_errcode_t -__attribute_warn_unused_result__ -re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, - eflags) - const regex_t *preg; - const char *string; - int length, start, range, stop, eflags; - size_t nmatch; - regmatch_t pmatch[]; +__attribute_warn_unused_result__ internal_function +re_search_internal (const regex_t *preg, const char *string, int length, + int start, int range, int stop, size_t nmatch, + regmatch_t pmatch[], int eflags) { reg_errcode_t err; const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; @@ -953,9 +928,8 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, } static reg_errcode_t -__attribute_warn_unused_result__ -prune_impossible_nodes (mctx) - re_match_context_t *mctx; +internal_function __attribute_warn_unused_result__ +prune_impossible_nodes (re_match_context_t *mctx) { const re_dfa_t *const dfa = mctx->dfa; int halt_node, match_last; diff --git a/posix/runptests.c b/posix/runptests.c index 0494fa7d47..c60d8e532a 100644 --- a/posix/runptests.c +++ b/posix/runptests.c @@ -1,5 +1,5 @@ /* POSIX regex testsuite from IEEE 2003.2. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/posix/sched.h b/posix/sched.h index 8069ec1543..253c963053 100644 --- a/posix/sched.h +++ b/posix/sched.h @@ -1,5 +1,5 @@ /* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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/posix/sched_cpualloc.c b/posix/sched_cpualloc.c index 8cc817be6a..0c79ffbade 100644 --- a/posix/sched_cpualloc.c +++ b/posix/sched_cpualloc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2015 Free Software Foundation, Inc. +/* Copyright (C) 2007-2016 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/posix/sched_cpucount.c b/posix/sched_cpucount.c index 1245a2d4f8..e100269cbd 100644 --- a/posix/sched_cpucount.c +++ b/posix/sched_cpucount.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2015 Free Software Foundation, Inc. +/* Copyright (C) 2007-2016 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/posix/sched_cpufree.c b/posix/sched_cpufree.c index de47821d65..db7286e637 100644 --- a/posix/sched_cpufree.c +++ b/posix/sched_cpufree.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2015 Free Software Foundation, Inc. +/* Copyright (C) 2007-2016 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/posix/sched_getaffinity.c b/posix/sched_getaffinity.c index 2d8f838ae8..cf4d1b7bf2 100644 --- a/posix/sched_getaffinity.c +++ b/posix/sched_getaffinity.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 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 @@ -22,10 +22,7 @@ /* Retrieve the CPU affinity mask for a particular process. */ int -sched_getaffinity (pid, cpusetsize, cpuset) - pid_t pid; - size_t cpusetsize; - cpu_set_t *cpuset; +sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) { __set_errno (ENOSYS); return -1; diff --git a/posix/sched_getp.c b/posix/sched_getp.c index 16ced84b91..cae502188e 100644 --- a/posix/sched_getp.c +++ b/posix/sched_getp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/sched_gets.c b/posix/sched_gets.c index 55a45bb26e..1b145efb6c 100644 --- a/posix/sched_gets.c +++ b/posix/sched_gets.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/sched_primax.c b/posix/sched_primax.c index 21594a3cc0..97cd9c09ed 100644 --- a/posix/sched_primax.c +++ b/posix/sched_primax.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/sched_primin.c b/posix/sched_primin.c index 0c153edab1..7e2bfda9f6 100644 --- a/posix/sched_primin.c +++ b/posix/sched_primin.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/sched_rr_gi.c b/posix/sched_rr_gi.c index e0aa7d66eb..1b32864488 100644 --- a/posix/sched_rr_gi.c +++ b/posix/sched_rr_gi.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/sched_setaffinity.c b/posix/sched_setaffinity.c index 579fc390e5..f97f6a3f47 100644 --- a/posix/sched_setaffinity.c +++ b/posix/sched_setaffinity.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2015 Free Software Foundation, Inc. +/* Copyright (C) 2002-2016 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 @@ -22,10 +22,7 @@ /* Retrieve the CPU affinity mask for a particular process. */ int -sched_setaffinity (pid, cpusetsize, cpuset) - pid_t pid; - size_t cpusetsize; - const cpu_set_t *cpuset; +sched_setaffinity (pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset) { __set_errno (ENOSYS); return -1; diff --git a/posix/sched_setp.c b/posix/sched_setp.c index b16aed07c2..cde7b6003e 100644 --- a/posix/sched_setp.c +++ b/posix/sched_setp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/sched_sets.c b/posix/sched_sets.c index 1ac57db3d0..69b39e98ec 100644 --- a/posix/sched_sets.c +++ b/posix/sched_sets.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/sched_yield.c b/posix/sched_yield.c index 944b07e534..7dd21ef7d1 100644 --- a/posix/sched_yield.c +++ b/posix/sched_yield.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/setgid.c b/posix/setgid.c index 4a37cc77d8..03e9030029 100644 --- a/posix/setgid.c +++ b/posix/setgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -24,8 +24,7 @@ and effective group IDs, and the saved set-group-ID to GID; if not, the effective group ID is set to GID. */ int -__setgid (gid) - gid_t gid; +__setgid (gid_t gid) { __set_errno (ENOSYS); return -1; diff --git a/posix/setpgid.c b/posix/setpgid.c index 7289148d74..753ac9ac22 100644 --- a/posix/setpgid.c +++ b/posix/setpgid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -22,9 +22,7 @@ If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used. */ int -__setpgid (pid, pgid) - int pid; - int pgid; +__setpgid (int pid, int pgid) { __set_errno (ENOSYS); return -1; diff --git a/posix/setpgrp.c b/posix/setpgrp.c index bc1fa02413..9877824a04 100644 --- a/posix/setpgrp.c +++ b/posix/setpgrp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 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/posix/setresgid.c b/posix/setresgid.c index 756ec76c90..a371ea3f94 100644 --- a/posix/setresgid.c +++ b/posix/setresgid.c @@ -1,5 +1,5 @@ /* setresgid -- set real group ID, effective group ID, and saved-set group ID - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 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/posix/setresuid.c b/posix/setresuid.c index 5ed715fb52..29f526b9d7 100644 --- a/posix/setresuid.c +++ b/posix/setresuid.c @@ -1,5 +1,5 @@ /* setresuid -- set real user ID, effective user ID, and saved-set user ID - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 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/posix/setsid.c b/posix/setsid.c index 06b5b8bd22..52e073a34b 100644 --- a/posix/setsid.c +++ b/posix/setsid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/setuid.c b/posix/setuid.c index 794eb02508..e8b0f255a7 100644 --- a/posix/setuid.c +++ b/posix/setuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -24,8 +24,7 @@ and effective user IDs, and the saved set-user-ID to UID; if not, the effective user ID is set to UID. */ int -__setuid (uid) - uid_t uid; +__setuid (uid_t uid) { __set_errno (ENOSYS); return -1; diff --git a/posix/sleep.c b/posix/sleep.c index 0ae79c1c4b..447510e411 100644 --- a/posix/sleep.c +++ b/posix/sleep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -28,8 +28,7 @@ signal afterwards is undefined. There is no return value to indicate error, but if `sleep' returns SECONDS, it probably didn't work. */ unsigned int -__sleep (seconds) - unsigned int seconds; +__sleep (unsigned int seconds) { __set_errno (ENOSYS); return seconds; diff --git a/posix/spawn.c b/posix/spawn.c index e295d123fe..562602d102 100644 --- a/posix/spawn.c +++ b/posix/spawn.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawn.h b/posix/spawn.h index af4a303352..f46e8c22c8 100644 --- a/posix/spawn.h +++ b/posix/spawn.h @@ -1,5 +1,5 @@ /* Definitions for POSIX spawn interface. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 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/posix/spawn_faction_addclose.c b/posix/spawn_faction_addclose.c index 2328552c5e..1a4a2f2457 100644 --- a/posix/spawn_faction_addclose.c +++ b/posix/spawn_faction_addclose.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawn_faction_adddup2.c b/posix/spawn_faction_adddup2.c index 28abf5fd32..8beee1099b 100644 --- a/posix/spawn_faction_adddup2.c +++ b/posix/spawn_faction_adddup2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawn_faction_addopen.c b/posix/spawn_faction_addopen.c index f133300666..36cde06fb2 100644 --- a/posix/spawn_faction_addopen.c +++ b/posix/spawn_faction_addopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawn_faction_destroy.c b/posix/spawn_faction_destroy.c index 2bcf06b887..33fab8f1c5 100644 --- a/posix/spawn_faction_destroy.c +++ b/posix/spawn_faction_destroy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawn_faction_init.c b/posix/spawn_faction_init.c index 1044e66460..7744f5d563 100644 --- a/posix/spawn_faction_init.c +++ b/posix/spawn_faction_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_destroy.c b/posix/spawnattr_destroy.c index 602e7b5c2c..a2e3b79b2f 100644 --- a/posix/spawnattr_destroy.c +++ b/posix/spawnattr_destroy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_getdefault.c b/posix/spawnattr_getdefault.c index 1664666550..118029513b 100644 --- a/posix/spawnattr_getdefault.c +++ b/posix/spawnattr_getdefault.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_getflags.c b/posix/spawnattr_getflags.c index ec89c30997..8bf916b746 100644 --- a/posix/spawnattr_getflags.c +++ b/posix/spawnattr_getflags.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_getpgroup.c b/posix/spawnattr_getpgroup.c index 77148e8cc4..bfc7315db0 100644 --- a/posix/spawnattr_getpgroup.c +++ b/posix/spawnattr_getpgroup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_getschedparam.c b/posix/spawnattr_getschedparam.c index 5eb4145d4b..ccf6e42417 100644 --- a/posix/spawnattr_getschedparam.c +++ b/posix/spawnattr_getschedparam.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_getschedpolicy.c b/posix/spawnattr_getschedpolicy.c index fb40afbbdc..dad48bfa40 100644 --- a/posix/spawnattr_getschedpolicy.c +++ b/posix/spawnattr_getschedpolicy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_getsigmask.c b/posix/spawnattr_getsigmask.c index eadb4e46cd..c443f85008 100644 --- a/posix/spawnattr_getsigmask.c +++ b/posix/spawnattr_getsigmask.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_init.c b/posix/spawnattr_init.c index ed8a581010..25f29d5b35 100644 --- a/posix/spawnattr_init.c +++ b/posix/spawnattr_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_setdefault.c b/posix/spawnattr_setdefault.c index 0bf8a3ea97..1a0f147847 100644 --- a/posix/spawnattr_setdefault.c +++ b/posix/spawnattr_setdefault.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_setflags.c b/posix/spawnattr_setflags.c index 883c3450f7..37c69f34a5 100644 --- a/posix/spawnattr_setflags.c +++ b/posix/spawnattr_setflags.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_setpgroup.c b/posix/spawnattr_setpgroup.c index cf4b500ea2..3650954a4c 100644 --- a/posix/spawnattr_setpgroup.c +++ b/posix/spawnattr_setpgroup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_setschedparam.c b/posix/spawnattr_setschedparam.c index 8ac34ce352..5187806ee3 100644 --- a/posix/spawnattr_setschedparam.c +++ b/posix/spawnattr_setschedparam.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_setschedpolicy.c b/posix/spawnattr_setschedpolicy.c index 859e762abc..b8c505fd71 100644 --- a/posix/spawnattr_setschedpolicy.c +++ b/posix/spawnattr_setschedpolicy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawnattr_setsigmask.c b/posix/spawnattr_setsigmask.c index 07c9b1cc80..3d3fee19fd 100644 --- a/posix/spawnattr_setsigmask.c +++ b/posix/spawnattr_setsigmask.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/spawni.c b/posix/spawni.c index 6d40779278..40aefc03fa 100644 --- a/posix/spawni.c +++ b/posix/spawni.c @@ -1,5 +1,5 @@ /* Guts of POSIX spawn interface. Stub version. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 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/posix/spawnp.c b/posix/spawnp.c index 083fc35126..2f8dfaae72 100644 --- a/posix/spawnp.c +++ b/posix/spawnp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 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/posix/sys/times.h b/posix/sys/times.h index 0af59fcefa..a877d1490d 100644 --- a/posix/sys/times.h +++ b/posix/sys/times.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/sys/types.h b/posix/sys/types.h index bf30873756..a7285671bf 100644 --- a/posix/sys/types.h +++ b/posix/sys/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/sys/utsname.h b/posix/sys/utsname.h index 9426f4ad9c..05682a16f7 100644 --- a/posix/sys/utsname.h +++ b/posix/sys/utsname.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/sys/wait.h b/posix/sys/wait.h index e5c9f74d6e..a673b414b5 100644 --- a/posix/sys/wait.h +++ b/posix/sys/wait.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/sysconf.c b/posix/sysconf.c index 0ad15c24ff..01d9283bf5 100644 --- a/posix/sysconf.c +++ b/posix/sysconf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -28,8 +28,7 @@ /* Get the value of the system variable NAME. */ long int -__sysconf (name) - int name; +__sysconf (int name) { switch (name) { diff --git a/posix/tar.h b/posix/tar.h index d4e7f71ed5..321c19e640 100644 --- a/posix/tar.h +++ b/posix/tar.h @@ -1,5 +1,5 @@ /* Extended tar format from POSIX.1. - Copyright (C) 1992-2015 Free Software Foundation, Inc. + Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by David J. MacKenzie. diff --git a/posix/times.c b/posix/times.c index 48ee9cdfa1..f22dc3b9f6 100644 --- a/posix/times.c +++ b/posix/times.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 @@ -24,8 +24,7 @@ Return the elapsed real time, or (clock_t) -1 for errors. All times are in CLK_TCKths of a second. */ clock_t -__times (buffer) - struct tms *buffer; +__times (struct tms *buffer) { if (buffer == NULL) { diff --git a/posix/tst-boost.c b/posix/tst-boost.c index e3dfd3a4fc..9e9007530b 100644 --- a/posix/tst-boost.c +++ b/posix/tst-boost.c @@ -1,5 +1,5 @@ /* Regular expression tests. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/posix/tst-chmod.c b/posix/tst-chmod.c index 75ee8540c4..17d68688be 100644 --- a/posix/tst-chmod.c +++ b/posix/tst-chmod.c @@ -1,5 +1,5 @@ /* Test for chmod functions. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000. diff --git a/posix/tst-dir.c b/posix/tst-dir.c index 50f75807b7..8897f8e06d 100644 --- a/posix/tst-dir.c +++ b/posix/tst-dir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2000. diff --git a/posix/tst-exec.c b/posix/tst-exec.c index 3363a93928..b0b04b5b9a 100644 --- a/posix/tst-exec.c +++ b/posix/tst-exec.c @@ -1,5 +1,5 @@ /* Tests for exec. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000. diff --git a/posix/tst-fnmatch.c b/posix/tst-fnmatch.c index 030e56b813..f1e6455ba8 100644 --- a/posix/tst-fnmatch.c +++ b/posix/tst-fnmatch.c @@ -1,5 +1,5 @@ /* Tests for fnmatch function. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 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/posix/tst-fnmatch.input b/posix/tst-fnmatch.input index 02de803eef..96853cb75d 100644 --- a/posix/tst-fnmatch.input +++ b/posix/tst-fnmatch.input @@ -1,5 +1,5 @@ # Tests for fnmatch. -# Copyright (C) 2000-2015 Free Software Foundation, Inc. +# Copyright (C) 2000-2016 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributes by Ulrich Drepper <drepper@redhat.com>. # diff --git a/posix/tst-fnmatch3.c b/posix/tst-fnmatch3.c index fdf99342e9..82ea001b56 100644 --- a/posix/tst-fnmatch3.c +++ b/posix/tst-fnmatch3.c @@ -1,5 +1,5 @@ /* Test for fnmatch not reading past the end of the pattern. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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/posix/tst-fork.c b/posix/tst-fork.c index 0de9e64980..893c024e47 100644 --- a/posix/tst-fork.c +++ b/posix/tst-fork.c @@ -1,5 +1,5 @@ /* Tests for fork. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000. diff --git a/posix/tst-getaddrinfo.c b/posix/tst-getaddrinfo.c index dcafd6bf34..1ddaf18b16 100644 --- a/posix/tst-getaddrinfo.c +++ b/posix/tst-getaddrinfo.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2015 Free Software Foundation, Inc. +/* Copyright (C) 1999-2016 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/posix/tst-getaddrinfo4.c b/posix/tst-getaddrinfo4.c index 176a107a43..5a20d0e64f 100644 --- a/posix/tst-getaddrinfo4.c +++ b/posix/tst-getaddrinfo4.c @@ -1,5 +1,5 @@ /* Test getaddrinfo return value, [BZ #15339]. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 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/posix/tst-getaddrinfo5.c b/posix/tst-getaddrinfo5.c index d7704d9fc0..7ad49ecf36 100644 --- a/posix/tst-getaddrinfo5.c +++ b/posix/tst-getaddrinfo5.c @@ -1,5 +1,5 @@ /* Test host lookup with double dots at the end, [BZ #16469]. - Copyright (C) 2014-2015 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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/posix/tst-getconf.sh b/posix/tst-getconf.sh index f804457c62..95d11f59ec 100644 --- a/posix/tst-getconf.sh +++ b/posix/tst-getconf.sh @@ -1,6 +1,6 @@ -#! /bin/sh +#!/bin/sh # Test for getconf(1). -# Copyright (C) 2001-2015 Free Software Foundation, Inc. +# Copyright (C) 2001-2016 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 @@ -27,7 +27,7 @@ logfile=$common_objpfx/posix/tst-getconf.out rm -f $logfile result=0 while read name; do - echo -n "getconf $name: " >> $logfile + printf %s "getconf $name: " >> $logfile ${run_getconf} "$name" < /dev/null 2>> $logfile >> $logfile if test $? -ne 0; then echo "*** $name FAILED" >> $logfile @@ -205,7 +205,7 @@ XBS5_LPBIG_OFFBIG_LINTFLAGS EOF while read name; do - echo -n "getconf $name /: " >> $logfile + printf %s "getconf $name /: " >> $logfile ${run_getconf} "$name" / < /dev/null 2>> $logfile >> $logfile if test $? -ne 0; then echo "*** $name FAILED" >> $logfile diff --git a/posix/tst-gnuglob.c b/posix/tst-gnuglob.c index d444999691..992b997db9 100644 --- a/posix/tst-gnuglob.c +++ b/posix/tst-gnuglob.c @@ -1,6 +1,6 @@ /* Test the GNU extensions in glob which allow the user to provide callbacks for the filesystem access functions. - Copyright (C) 2001-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. diff --git a/posix/tst-mmap-offset.c b/posix/tst-mmap-offset.c new file mode 100644 index 0000000000..53e78559c2 --- /dev/null +++ b/posix/tst-mmap-offset.c @@ -0,0 +1,67 @@ +/* BZ #18877 mmap offset test. + + Copyright (C) 2015-2016 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <sys/mman.h> + +static int +printmsg (int rc, const char *msg) +{ + printf ("%s failed: %m\n", msg); + return rc; +} + +/* Check if negative offsets are handled correctly by mmap. */ +static int +do_test (void) +{ + const int prot = PROT_READ | PROT_WRITE; + const int flags = MAP_SHARED; + const unsigned long length = 0x10000; + const unsigned long offset = 0xace00000; + const unsigned long size = offset + length; + void *addr; + int fd; + char fname[] = "tst-mmap-offset-XXXXXX"; + + fd = mkstemp64 (fname); + if (fd < 0) + return printmsg (1, "mkstemp"); + + if (unlink (fname)) + return printmsg (1, "unlink"); + + if (ftruncate64 (fd, size)) + return printmsg (0, "ftruncate64"); + + addr = mmap (NULL, length, prot, flags, fd, offset); + if (MAP_FAILED == addr) + return printmsg (1, "mmap"); + + /* This memcpy is likely to SIGBUS if mmap has messed up with offset. */ + memcpy (addr, fname, sizeof (fname)); + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/posix/tst-nanosleep.c b/posix/tst-nanosleep.c index 33cb0b4460..bf118ed208 100644 --- a/posix/tst-nanosleep.c +++ b/posix/tst-nanosleep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2015 Free Software Foundation, Inc. +/* Copyright (C) 2003-2016 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/posix/tst-nice.c b/posix/tst-nice.c index ac78d6056f..b6aca42753 100644 --- a/posix/tst-nice.c +++ b/posix/tst-nice.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2015 Free Software Foundation, Inc. +/* Copyright (C) 2003-2016 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 @@ -56,8 +56,17 @@ do_test (void) return 1; } - printf ("PASS: nice(%d) from %d return: %d\n", incr, old, ret); + /* BZ #18086. Make sure we don't reset errno. */ + errno = EBADF; + nice (0); + if (errno != EBADF) + { + printf ("FAIL: errno = %i, but wanted EBADF (%i)\n", errno, EBADF); + return 1; + } + + printf ("PASS: nice(%d) from %d return: %d\n", incr, old, ret); return 0; } diff --git a/posix/tst-pathconf.c b/posix/tst-pathconf.c index 67f0069b65..949fc65428 100644 --- a/posix/tst-pathconf.c +++ b/posix/tst-pathconf.c @@ -1,5 +1,5 @@ /* Test that values of pathconf and fpathconf are consistent for a file. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 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/posix/tst-pcre.c b/posix/tst-pcre.c index f6c0ea4fa1..20788ca919 100644 --- a/posix/tst-pcre.c +++ b/posix/tst-pcre.c @@ -1,5 +1,5 @@ /* Regular expression tests. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/posix/tst-preadwrite.c b/posix/tst-preadwrite.c index a84418155d..b7c1658811 100644 --- a/posix/tst-preadwrite.c +++ b/posix/tst-preadwrite.c @@ -1,5 +1,5 @@ /* Tests for pread and pwrite. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/posix/tst-preadwrite64.c b/posix/tst-preadwrite64.c index 6c8295e611..27425be342 100644 --- a/posix/tst-preadwrite64.c +++ b/posix/tst-preadwrite64.c @@ -1,5 +1,5 @@ /* Tests for pread64 and pwrite64. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/posix/tst-regex.c b/posix/tst-regex.c index 715137bbc4..9a41ff8a8f 100644 --- a/posix/tst-regex.c +++ b/posix/tst-regex.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2015 Free Software Foundation, Inc. +/* Copyright (C) 2001-2016 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/posix/tst-regexloc.c b/posix/tst-regexloc.c index 38bf87abbf..b67fbb6b8c 100644 --- a/posix/tst-regexloc.c +++ b/posix/tst-regexloc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2015 Free Software Foundation, Inc. +/* Copyright (C) 2001-2016 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 @@ -23,8 +23,8 @@ #include <locale.h> #include <stdio.h> -int -main (int argc, char *argv[]) +static int +do_test (void) { regex_t re; regmatch_t mat[1]; @@ -44,3 +44,6 @@ main (int argc, char *argv[]) return res; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/posix/tst-rxspencer.c b/posix/tst-rxspencer.c index cef1eb9313..dba40e1476 100644 --- a/posix/tst-rxspencer.c +++ b/posix/tst-rxspencer.c @@ -1,5 +1,5 @@ /* Regular expression tests. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/posix/tst-spawn.c b/posix/tst-spawn.c index 3230ae11fa..68f435789f 100644 --- a/posix/tst-spawn.c +++ b/posix/tst-spawn.c @@ -1,5 +1,5 @@ /* Tests for spawn. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000. diff --git a/posix/tst-truncate.c b/posix/tst-truncate.c index feb43b1d11..8f5957f417 100644 --- a/posix/tst-truncate.c +++ b/posix/tst-truncate.c @@ -1,5 +1,5 @@ /* Tests for ftruncate and truncate. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000. diff --git a/posix/tst-truncate64.c b/posix/tst-truncate64.c index 5965d56fcd..64eb0a4bd5 100644 --- a/posix/tst-truncate64.c +++ b/posix/tst-truncate64.c @@ -1,5 +1,5 @@ /* Tests for ftruncate64 and truncate64. - Copyright (C) 2000-2015 Free Software Foundation, Inc. + Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000. diff --git a/posix/tst-vfork1.c b/posix/tst-vfork1.c index 7aa33a3954..a31cfc1753 100644 --- a/posix/tst-vfork1.c +++ b/posix/tst-vfork1.c @@ -1,5 +1,5 @@ /* Test for vfork functions. - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. diff --git a/posix/tst-vfork2.c b/posix/tst-vfork2.c index 05060c8cc4..7733926eb4 100644 --- a/posix/tst-vfork2.c +++ b/posix/tst-vfork2.c @@ -1,5 +1,5 @@ /* Test for vfork functions. - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. diff --git a/posix/tst-vfork3.c b/posix/tst-vfork3.c index c3885da03e..05edc5a217 100644 --- a/posix/tst-vfork3.c +++ b/posix/tst-vfork3.c @@ -1,5 +1,5 @@ /* Test for vfork functions. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2007. diff --git a/posix/tst-waitid.c b/posix/tst-waitid.c index f24bd72a31..e6507a02d8 100644 --- a/posix/tst-waitid.c +++ b/posix/tst-waitid.c @@ -1,5 +1,5 @@ /* Tests for waitid. - Copyright (C) 2004-2015 Free Software Foundation, Inc. + Copyright (C) 2004-2016 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/posix/uname-values.h b/posix/uname-values.h index 1e0111848a..73d8472219 100644 --- a/posix/uname-values.h +++ b/posix/uname-values.h @@ -1,5 +1,5 @@ /* Constant values for the uname function to return. Generic version. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 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/posix/uname.c b/posix/uname.c index 072e868151..b0dec649fc 100644 --- a/posix/uname.c +++ b/posix/uname.c @@ -1,5 +1,5 @@ /* uname -- Report basic information about the system. Generic version. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 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 @@ -26,8 +26,7 @@ /* Put information about the system in NAME. */ int -__uname (name) - struct utsname *name; +__uname (struct utsname *name) { int save; diff --git a/posix/unistd.h b/posix/unistd.h index 1b52930225..405638ce79 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/vfork.c b/posix/vfork.c index 365088c91e..84d33bc917 100644 --- a/posix/vfork.c +++ b/posix/vfork.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2015 Free Software Foundation, Inc. +/* Copyright (C) 1992-2016 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/posix/wait.c b/posix/wait.c index 6395e2e928..3abf30e675 100644 --- a/posix/wait.c +++ b/posix/wait.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/wait3.c b/posix/wait3.c index 818975ec59..356839aef8 100644 --- a/posix/wait3.c +++ b/posix/wait3.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/wait4.c b/posix/wait4.c index 4e8638946f..e5b03766f6 100644 --- a/posix/wait4.c +++ b/posix/wait4.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/waitid.c b/posix/waitid.c index a82462fa80..d213fff94d 100644 --- a/posix/waitid.c +++ b/posix/waitid.c @@ -1,5 +1,5 @@ /* Stub version of waitid. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -22,11 +22,7 @@ #include <sys/wait.h> int -__waitid (idtype, id, infop, options) - idtype_t idtype; - id_t id; - siginfo_t *infop; - int options; +__waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options) { __set_errno (ENOSYS); return -1; diff --git a/posix/waitpid.c b/posix/waitpid.c index c90437c9bc..0105ea317d 100644 --- a/posix/waitpid.c +++ b/posix/waitpid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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/posix/wordexp-test.c b/posix/wordexp-test.c index 73f1b7d3ca..9e2f1b68de 100644 --- a/posix/wordexp-test.c +++ b/posix/wordexp-test.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2015 Free Software Foundation, Inc. +/* Copyright (C) 1997-2016 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/posix/wordexp-tst.sh b/posix/wordexp-tst.sh index 83ecc3fae2..c52825b470 100755 --- a/posix/wordexp-tst.sh +++ b/posix/wordexp-tst.sh @@ -1,6 +1,6 @@ -#! /bin/sh +#!/bin/sh # Test for wordexp(3). -# Copyright (C) 1998-2015 Free Software Foundation, Inc. +# Copyright (C) 1998-2016 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/posix/wordexp.c b/posix/wordexp.c index e711d43355..ecc76156db 100644 --- a/posix/wordexp.c +++ b/posix/wordexp.c @@ -1,5 +1,5 @@ /* POSIX.2 wordexp implementation. - Copyright (C) 1997-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Tim Waugh <tim@cyberelk.demon.co.uk>. @@ -42,7 +42,7 @@ #include <wordexp.h> #include <kernel-features.h> -#include <bits/libc-lock.h> +#include <libc-lock.h> #include <_itoa.h> /* Undefine the following line for the production version. */ @@ -1186,7 +1186,7 @@ parse_comm (char **word, size_t *word_length, size_t *max_length, // XXX Ideally we do want the thread being cancelable. // XXX If demand is there we'll change it. int state = PTHREAD_CANCEL_ENABLE; - __libc_ptf_call (pthread_setcancelstate, + __libc_ptf_call (__pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), 0); #endif @@ -1194,7 +1194,8 @@ parse_comm (char **word, size_t *word_length, size_t *max_length, flags, pwordexp, ifs, ifs_white); #ifdef __libc_ptf_call - __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); + __libc_ptf_call (__pthread_setcancelstate, + (state, NULL), 0); #endif free (comm); diff --git a/posix/wordexp.h b/posix/wordexp.h index db238311e1..92dfa9f067 100644 --- a/posix/wordexp.h +++ b/posix/wordexp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 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 |