summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/Makefile23
-rw-r--r--stdlib/Versions1
-rw-r--r--stdlib/a64l.c5
-rw-r--r--stdlib/abort.c4
-rw-r--r--stdlib/abs.c2
-rw-r--r--stdlib/add_n.c10
-rw-r--r--stdlib/addmul_1.c9
-rw-r--r--stdlib/alloca.h2
-rw-r--r--stdlib/at_quick_exit.c2
-rw-r--r--stdlib/atexit.c2
-rw-r--r--stdlib/atof.c2
-rw-r--r--stdlib/atoi.c2
-rw-r--r--stdlib/atol.c2
-rw-r--r--stdlib/atoll.c2
-rw-r--r--stdlib/bits/monetary-ldbl.h2
-rw-r--r--stdlib/bits/stdlib-float.h2
-rw-r--r--stdlib/bits/stdlib-ldbl.h2
-rw-r--r--stdlib/bits/stdlib.h2
-rw-r--r--stdlib/bsearch.c2
-rw-r--r--stdlib/bug-strtod.c2
-rw-r--r--stdlib/canonicalize.c2
-rw-r--r--stdlib/cmp.c9
-rw-r--r--stdlib/cxa_at_quick_exit.c2
-rw-r--r--stdlib/cxa_atexit.c4
-rw-r--r--stdlib/cxa_finalize.c2
-rw-r--r--stdlib/cxa_thread_atexit_impl.c12
-rw-r--r--stdlib/dbl2mpn.c2
-rw-r--r--stdlib/div.c5
-rw-r--r--stdlib/divmod_1.c10
-rw-r--r--stdlib/divrem.c12
-rw-r--r--stdlib/drand48-iter.c6
-rw-r--r--stdlib/drand48.c2
-rw-r--r--stdlib/drand48_r.c6
-rw-r--r--stdlib/erand48.c5
-rw-r--r--stdlib/erand48_r.c8
-rw-r--r--stdlib/errno.h2
-rw-r--r--stdlib/exit.c2
-rw-r--r--stdlib/exit.h2
-rw-r--r--stdlib/fmtmsg.c10
-rw-r--r--stdlib/fmtmsg.h2
-rw-r--r--stdlib/fpioconst.c2
-rw-r--r--stdlib/fpioconst.h2
-rw-r--r--stdlib/gen-fpioconst.c2
-rw-r--r--stdlib/gen-tst-strtod-round.c2
-rw-r--r--stdlib/getcontext.c5
-rw-r--r--stdlib/getenv.c5
-rw-r--r--stdlib/getsubopt.c2
-rw-r--r--stdlib/gmp-impl.h2
-rw-r--r--stdlib/gmp.h2
-rw-r--r--stdlib/grouping.c2
-rw-r--r--stdlib/grouping.h2
-rw-r--r--stdlib/isomac.c3
-rw-r--r--stdlib/jrand48.c5
-rw-r--r--stdlib/jrand48_r.c8
-rw-r--r--stdlib/l64a.c5
-rw-r--r--stdlib/labs.c2
-rw-r--r--stdlib/lcong48.c5
-rw-r--r--stdlib/lcong48_r.c6
-rw-r--r--stdlib/ldiv.c2
-rw-r--r--stdlib/llabs.c5
-rw-r--r--stdlib/lldiv.c6
-rw-r--r--stdlib/longlong.h38
-rw-r--r--stdlib/lrand48.c2
-rw-r--r--stdlib/lrand48_r.c6
-rw-r--r--stdlib/lshift.c10
-rw-r--r--stdlib/makecontext.c2
-rw-r--r--stdlib/mblen.c2
-rw-r--r--stdlib/mbstowcs.c2
-rw-r--r--stdlib/mbtowc.c2
-rw-r--r--stdlib/mod_1.c9
-rw-r--r--stdlib/monetary.h2
-rw-r--r--stdlib/mp_clz_tab.c2
-rw-r--r--stdlib/mpn2dbl.c2
-rw-r--r--stdlib/mpn2flt.c2
-rw-r--r--stdlib/mrand48.c2
-rw-r--r--stdlib/mrand48_r.c6
-rw-r--r--stdlib/msort.c2
-rw-r--r--stdlib/mul.c11
-rw-r--r--stdlib/mul_1.c9
-rw-r--r--stdlib/mul_n.c42
-rw-r--r--stdlib/nrand48.c5
-rw-r--r--stdlib/nrand48_r.c8
-rw-r--r--stdlib/on_exit.c2
-rw-r--r--stdlib/putenv.c5
-rw-r--r--stdlib/qsort.c2
-rw-r--r--stdlib/quick_exit.c2
-rw-r--r--stdlib/rand.c2
-rw-r--r--stdlib/rand_r.c2
-rw-r--r--stdlib/random.c15
-rw-r--r--stdlib/random_r.c21
-rw-r--r--stdlib/rpmatch.c2
-rw-r--r--stdlib/rshift.c17
-rw-r--r--stdlib/secure-getenv.c5
-rw-r--r--stdlib/seed48.c5
-rw-r--r--stdlib/seed48_r.c6
-rw-r--r--stdlib/setcontext.c5
-rw-r--r--stdlib/setenv.c25
-rw-r--r--stdlib/srand48.c5
-rw-r--r--stdlib/srand48_r.c6
-rw-r--r--stdlib/stdlib.h2
-rw-r--r--stdlib/strfmon.c2
-rw-r--r--stdlib/strfmon_l.c2
-rw-r--r--stdlib/strtod.c11
-rw-r--r--stdlib/strtod_l.c79
-rw-r--r--stdlib/strtod_nan.c24
-rw-r--r--stdlib/strtod_nan_double.h30
-rw-r--r--stdlib/strtod_nan_float.h29
-rw-r--r--stdlib/strtod_nan_main.c63
-rw-r--r--stdlib/strtod_nan_narrow.h22
-rw-r--r--stdlib/strtod_nan_wide.h22
-rw-r--r--stdlib/strtof.c2
-rw-r--r--stdlib/strtof_l.c13
-rw-r--r--stdlib/strtof_nan.c24
-rw-r--r--stdlib/strtol.c9
-rw-r--r--stdlib/strtol_l.c29
-rw-r--r--stdlib/strtold.c2
-rw-r--r--stdlib/strtold_l.c2
-rw-r--r--stdlib/strtold_nan.c30
-rw-r--r--stdlib/strtoll.c2
-rw-r--r--stdlib/strtoll_l.c2
-rw-r--r--stdlib/strtoul.c2
-rw-r--r--stdlib/strtoul_l.c2
-rw-r--r--stdlib/strtoull.c2
-rw-r--r--stdlib/strtoull_l.c2
-rw-r--r--stdlib/sub_n.c10
-rw-r--r--stdlib/submul_1.c9
-rw-r--r--stdlib/swapcontext.c6
-rw-r--r--stdlib/system.c5
-rw-r--r--stdlib/test-a64l.c2
-rw-r--r--stdlib/test-canon.c2
-rw-r--r--stdlib/test-canon2.c2
-rw-r--r--stdlib/testdiv.c2
-rw-r--r--stdlib/testrand.c2
-rw-r--r--stdlib/tst-bsearch.c2
-rw-r--r--stdlib/tst-environ.c2
-rwxr-xr-xstdlib/tst-fmtmsg.sh4
-rw-r--r--stdlib/tst-makecontext.c2
-rw-r--r--stdlib/tst-makecontext2.c2
-rw-r--r--stdlib/tst-makecontext3.c2
-rw-r--r--stdlib/tst-random2.c2
-rw-r--r--stdlib/tst-secure-getenv.c2
-rw-r--r--stdlib/tst-setcontext.c2
-rw-r--r--stdlib/tst-setcontext2.c2
-rw-r--r--stdlib/tst-setcontext3.c2
-rw-r--r--stdlib/tst-setcontext3.sh4
-rw-r--r--stdlib/tst-strtod-nan-locale-main.c89
-rw-r--r--stdlib/tst-strtod-nan-locale.c25
-rw-r--r--stdlib/tst-strtod-overflow.c2
-rw-r--r--stdlib/tst-strtod-round.c2
-rw-r--r--stdlib/tst-strtod-underflow.c2
-rw-r--r--stdlib/tst-strtod.c13
-rw-r--r--stdlib/tst-strtol-locale-main.c87
-rw-r--r--stdlib/tst-strtol-locale.c25
-rw-r--r--stdlib/tst-strtol.c4
-rw-r--r--stdlib/tst-strtoll.c4
-rw-r--r--stdlib/tst-system.c2
-rw-r--r--stdlib/tst-tininess.c2
-rw-r--r--stdlib/tst-tls-atexit-lib.c2
-rw-r--r--stdlib/tst-tls-atexit-nodelete.c2
-rw-r--r--stdlib/tst-tls-atexit.c2
-rw-r--r--stdlib/tst-xpg-basename.c2
-rw-r--r--stdlib/ucontext.h2
-rw-r--r--stdlib/wcstombs.c2
-rw-r--r--stdlib/wctomb.c2
-rw-r--r--stdlib/xpg_basename.c2
165 files changed, 791 insertions, 512 deletions
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 402466a623..26fe67ad95 100644
--- a/stdlib/Makefile
+++ b/stdlib/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
@@ -50,6 +50,7 @@ routines := \
strtol_l strtoul_l strtoll_l strtoull_l \
strtof strtod strtold \
strtof_l strtod_l strtold_l \
+ strtof_nan strtod_nan strtold_nan \
system canonicalize \
a64l l64a \
rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg \
@@ -74,7 +75,8 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
tst-makecontext3 bug-getcontext bug-fmtmsg1 \
tst-secure-getenv tst-strtod-overflow tst-strtod-round \
tst-tininess tst-strtod-underflow tst-tls-atexit \
- tst-setcontext3 tst-tls-atexit-nodelete
+ tst-setcontext3 tst-tls-atexit-nodelete \
+ tst-strtol-locale tst-strtod-nan-locale
tests-static := tst-secure-getenv
modules-names = tst-tls-atexit-lib
@@ -110,6 +112,7 @@ CFLAGS-strfmon_l.c = $(libio-mtsafe)
CFLAGS-tst-bsearch.c = $(stack-align-test-flags)
CFLAGS-tst-qsort.c = $(stack-align-test-flags)
+CFLAGS-tst-makecontext.c += -funwind-tables
CFLAGS-tst-makecontext2.c = $(stack-align-test-flags)
# Run a test on the header files we use.
@@ -121,6 +124,21 @@ endif
include ../Rules
+ifeq ($(run-built-tests),yes)
+LOCALES := cs_CZ.UTF-8 de_DE.UTF-8 en_US.ISO-8859-1 tr_TR.UTF-8 \
+ tr_TR.ISO-8859-9
+include ../gen-locales.mk
+
+$(objpfx)bug-strtod2.out: $(gen-locales)
+$(objpfx)testmb2.out: $(gen-locales)
+$(objpfx)tst-strtod.out: $(gen-locales)
+$(objpfx)tst-strtod3.out: $(gen-locales)
+$(objpfx)tst-strtod4.out: $(gen-locales)
+$(objpfx)tst-strtod5.out: $(gen-locales)
+$(objpfx)tst-strtol-locale.out: $(gen-locales)
+$(objpfx)tst-strtod-nan-locale.out: $(gen-locales)
+endif
+
# Testdir has to be named stdlib and needs to be writable
test-canon-ARGS = --test-dir=${common-objpfx}stdlib
@@ -153,6 +171,7 @@ $(objpfx)tst-strtod-round: $(libm)
$(objpfx)tst-tininess: $(libm)
$(objpfx)tst-strtod-underflow: $(libm)
$(objpfx)tst-strtod6: $(libm)
+$(objpfx)tst-strtod-nan-locale: $(libm)
tst-tls-atexit-lib.so-no-z-defs = yes
diff --git a/stdlib/Versions b/stdlib/Versions
index f1777dfcf4..60b628d47a 100644
--- a/stdlib/Versions
+++ b/stdlib/Versions
@@ -118,5 +118,6 @@ libc {
# Used from other libraries
__libc_secure_getenv;
__call_tls_dtors;
+ __strtof_nan; __strtod_nan; __strtold_nan;
}
}
diff --git a/stdlib/a64l.c b/stdlib/a64l.c
index 156a4a0fa7..20771c06d2 100644
--- a/stdlib/a64l.c
+++ b/stdlib/a64l.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.org>, August 1995.
@@ -36,8 +36,7 @@ static const char a64l_table[TABLE_SIZE] =
long int
-a64l (string)
- const char *string;
+a64l (const char *string)
{
const char *ptr = string;
unsigned long int result = 0ul;
diff --git a/stdlib/abort.c b/stdlib/abort.c
index ffde8145db..155d70b064 100644
--- a/stdlib/abort.c
+++ b/stdlib/abort.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
@@ -15,7 +15,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/stdlib/abs.c b/stdlib/abs.c
index a05bafefc5..005fa68da2 100644
--- a/stdlib/abs.c
+++ b/stdlib/abs.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/stdlib/add_n.c b/stdlib/add_n.c
index 9d83084f43..a2cb298e76 100644
--- a/stdlib/add_n.c
+++ b/stdlib/add_n.c
@@ -1,6 +1,6 @@
/* mpn_add_n -- Add two limb vectors of equal, non-zero length.
-Copyright (C) 1992-2015 Free Software Foundation, Inc.
+Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -22,15 +22,7 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
#include "gmp-impl.h"
mp_limb_t
-#if __STDC__
mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
-#else
-mpn_add_n (res_ptr, s1_ptr, s2_ptr, size)
- register mp_ptr res_ptr;
- register mp_srcptr s1_ptr;
- register mp_srcptr s2_ptr;
- mp_size_t size;
-#endif
{
register mp_limb_t x, y, cy;
register mp_size_t j;
diff --git a/stdlib/addmul_1.c b/stdlib/addmul_1.c
index 47b9db3db0..75b53fd3df 100644
--- a/stdlib/addmul_1.c
+++ b/stdlib/addmul_1.c
@@ -3,7 +3,7 @@
limb vector pointed to by RES_PTR. Return the most significant limb of
the product, adjusted for carry-out from the addition.
-Copyright (C) 1992-2015 Free Software Foundation, Inc.
+Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -26,11 +26,8 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
#include "longlong.h"
mp_limb_t
-mpn_addmul_1 (res_ptr, s1_ptr, s1_size, s2_limb)
- register mp_ptr res_ptr;
- register mp_srcptr s1_ptr;
- mp_size_t s1_size;
- register mp_limb_t s2_limb;
+mpn_addmul_1 (register mp_ptr res_ptr, register mp_srcptr s1_ptr,
+ mp_size_t s1_size, register mp_limb_t s2_limb)
{
register mp_limb_t cy_limb;
register mp_size_t j;
diff --git a/stdlib/alloca.h b/stdlib/alloca.h
index d13d002d1a..974d11a235 100644
--- a/stdlib/alloca.h
+++ b/stdlib/alloca.h
@@ -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/stdlib/at_quick_exit.c b/stdlib/at_quick_exit.c
index 61fb9722a3..42508b8ddc 100644
--- a/stdlib/at_quick_exit.c
+++ b/stdlib/at_quick_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
diff --git a/stdlib/atexit.c b/stdlib/atexit.c
index 5d7fe6a86c..7534c12a89 100644
--- a/stdlib/atexit.c
+++ b/stdlib/atexit.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/stdlib/atof.c b/stdlib/atof.c
index 937e84b62a..1ee5e113c9 100644
--- a/stdlib/atof.c
+++ b/stdlib/atof.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/stdlib/atoi.c b/stdlib/atoi.c
index ad0225ee8b..d524a7432c 100644
--- a/stdlib/atoi.c
+++ b/stdlib/atoi.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/stdlib/atol.c b/stdlib/atol.c
index dabade576c..62ee52e653 100644
--- a/stdlib/atol.c
+++ b/stdlib/atol.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/stdlib/atoll.c b/stdlib/atoll.c
index 49767c8f6b..6ab68ccf25 100644
--- a/stdlib/atoll.c
+++ b/stdlib/atoll.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/stdlib/bits/monetary-ldbl.h b/stdlib/bits/monetary-ldbl.h
index db2ec6974c..3718d10e07 100644
--- a/stdlib/bits/monetary-ldbl.h
+++ b/stdlib/bits/monetary-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for monetary functions.
- 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/stdlib/bits/stdlib-float.h b/stdlib/bits/stdlib-float.h
index 1eb1638b96..c3bbd0437e 100644
--- a/stdlib/bits/stdlib-float.h
+++ b/stdlib/bits/stdlib-float.h
@@ -1,5 +1,5 @@
/* Floating-point inline functions for stdlib.h.
- 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/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
index 0e731db2ac..acff499165 100644
--- a/stdlib/bits/stdlib-ldbl.h
+++ b/stdlib/bits/stdlib-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
- 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/stdlib/bits/stdlib.h b/stdlib/bits/stdlib.h
index dbfc5f94a5..20fe986d3c 100644
--- a/stdlib/bits/stdlib.h
+++ b/stdlib/bits/stdlib.h
@@ -1,5 +1,5 @@
/* Checking macros for stdlib 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/stdlib/bsearch.c b/stdlib/bsearch.c
index 0ba7ccf466..c300611a88 100644
--- a/stdlib/bsearch.c
+++ b/stdlib/bsearch.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/stdlib/bug-strtod.c b/stdlib/bug-strtod.c
index e9f8985bf7..82e7d30b42 100644
--- a/stdlib/bug-strtod.c
+++ b/stdlib/bug-strtod.c
@@ -1,6 +1,6 @@
/* Test to strtod etc for numbers like x000...0000.000e-nn.
This file is part of the GNU C Library.
- Copyright (C) 2001-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c
index 6f4f74d70f..58bb8de949 100644
--- a/stdlib/canonicalize.c
+++ b/stdlib/canonicalize.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- 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/stdlib/cmp.c b/stdlib/cmp.c
index 904f404b8c..5397902978 100644
--- a/stdlib/cmp.c
+++ b/stdlib/cmp.c
@@ -1,6 +1,6 @@
/* mpn_cmp -- Compare two low-level natural-number integers.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -27,14 +27,7 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
Return 1 if OP1 > OP2, 0 if they are equal, and -1 if OP1 < OP2. */
int
-#if __STDC__
mpn_cmp (mp_srcptr op1_ptr, mp_srcptr op2_ptr, mp_size_t size)
-#else
-mpn_cmp (op1_ptr, op2_ptr, size)
- mp_srcptr op1_ptr;
- mp_srcptr op2_ptr;
- mp_size_t size;
-#endif
{
mp_size_t i;
mp_limb_t op1_word, op2_word;
diff --git a/stdlib/cxa_at_quick_exit.c b/stdlib/cxa_at_quick_exit.c
index 7063cee213..e9c8aeb8e3 100644
--- a/stdlib/cxa_at_quick_exit.c
+++ b/stdlib/cxa_at_quick_exit.c
@@ -1,4 +1,4 @@
-/* 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.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/stdlib/cxa_atexit.c b/stdlib/cxa_atexit.c
index 6e38c64fbe..61c6e51294 100644
--- a/stdlib/cxa_atexit.c
+++ b/stdlib/cxa_atexit.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
@@ -19,7 +19,7 @@
#include <stdlib.h>
#include <stdint.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include "exit.h"
#include <atomic.h>
#include <sysdep.h>
diff --git a/stdlib/cxa_finalize.c b/stdlib/cxa_finalize.c
index 0547caddbb..c2ff3d98f4 100644
--- a/stdlib/cxa_finalize.c
+++ b/stdlib/cxa_finalize.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/stdlib/cxa_thread_atexit_impl.c b/stdlib/cxa_thread_atexit_impl.c
index 2d5d56a7fa..3097f95979 100644
--- a/stdlib/cxa_thread_atexit_impl.c
+++ b/stdlib/cxa_thread_atexit_impl.c
@@ -1,5 +1,5 @@
/* Register destructors for C++ TLS variables declared with thread_local.
- 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
@@ -98,6 +98,10 @@ static __thread struct link_map *lm_cache;
int
__cxa_thread_atexit_impl (dtor_func func, void *obj, void *dso_symbol)
{
+#ifdef PTR_MANGLE
+ PTR_MANGLE (func);
+#endif
+
/* Prepend. */
struct dtor_list *new = calloc (1, sizeof (struct dtor_list));
new->func = func;
@@ -142,9 +146,13 @@ __call_tls_dtors (void)
while (tls_dtor_list)
{
struct dtor_list *cur = tls_dtor_list;
+ dtor_func func = cur->func;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (func);
+#endif
tls_dtor_list = tls_dtor_list->next;
- cur->func (cur->obj);
+ func (cur->obj);
/* Ensure that the MAP dereference happens before
l_tls_dtor_count decrement. That way, we protect this access from a
diff --git a/stdlib/dbl2mpn.c b/stdlib/dbl2mpn.c
index e19472f18a..614d2ff3d2 100644
--- a/stdlib/dbl2mpn.c
+++ b/stdlib/dbl2mpn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1993-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/stdlib/div.c b/stdlib/div.c
index f0c6da2f21..78d508638b 100644
--- a/stdlib/div.c
+++ b/stdlib/div.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
@@ -51,8 +51,7 @@
/* Return the `div_t' representation of NUMER over DENOM. */
div_t
-div (numer, denom)
- int numer, denom;
+div (int numer, int denom)
{
div_t result;
diff --git a/stdlib/divmod_1.c b/stdlib/divmod_1.c
index d05975121f..9caba7d2f9 100644
--- a/stdlib/divmod_1.c
+++ b/stdlib/divmod_1.c
@@ -6,7 +6,7 @@
QUOT_PTR and DIVIDEND_PTR might point to the same limb.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -40,17 +40,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
here (not udiv_qrnnd). */
mp_limb_t
-#if __STDC__
mpn_divmod_1 (mp_ptr quot_ptr,
mp_srcptr dividend_ptr, mp_size_t dividend_size,
mp_limb_t divisor_limb)
-#else
-mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
- mp_ptr quot_ptr;
- mp_srcptr dividend_ptr;
- mp_size_t dividend_size;
- mp_limb_t divisor_limb;
-#endif
{
mp_size_t i;
mp_limb_t n1, n0, r;
diff --git a/stdlib/divrem.c b/stdlib/divrem.c
index 6159a3e203..095efef1d4 100644
--- a/stdlib/divrem.c
+++ b/stdlib/divrem.c
@@ -1,7 +1,7 @@
/* mpn_divrem -- Divide natural numbers, producing both remainder and
quotient.
-Copyright (C) 1993-2015 Free Software Foundation, Inc.
+Copyright (C) 1993-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -40,19 +40,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
3. NSIZE >= DSIZE, even if QEXTRA_LIMBS is non-zero. */
mp_limb_t
-#if __STDC__
mpn_divrem (mp_ptr qp, mp_size_t qextra_limbs,
mp_ptr np, mp_size_t nsize,
mp_srcptr dp, mp_size_t dsize)
-#else
-mpn_divrem (qp, qextra_limbs, np, nsize, dp, dsize)
- mp_ptr qp;
- mp_size_t qextra_limbs;
- mp_ptr np;
- mp_size_t nsize;
- mp_srcptr dp;
- mp_size_t dsize;
-#endif
{
mp_limb_t most_significant_q_limb = 0;
diff --git a/stdlib/drand48-iter.c b/stdlib/drand48-iter.c
index 8983776410..0304cb1cb7 100644
--- a/stdlib/drand48-iter.c
+++ b/stdlib/drand48-iter.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -27,9 +27,7 @@ struct drand48_data __libc_drand48_data;
int
-__drand48_iterate (xsubi, buffer)
- unsigned short int xsubi[3];
- struct drand48_data *buffer;
+__drand48_iterate (unsigned short int xsubi[3], struct drand48_data *buffer)
{
uint64_t X;
uint64_t result;
diff --git a/stdlib/drand48.c b/stdlib/drand48.c
index 52cd59428d..5fceb109ac 100644
--- a/stdlib/drand48.c
+++ b/stdlib/drand48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
diff --git a/stdlib/drand48_r.c b/stdlib/drand48_r.c
index 014af96739..a804dced98 100644
--- a/stdlib/drand48_r.c
+++ b/stdlib/drand48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -21,9 +21,7 @@
#include <stdlib.h>
int
-drand48_r (buffer, result)
- struct drand48_data *buffer;
- double *result;
+drand48_r (struct drand48_data *buffer, double *result)
{
return __erand48_r (buffer->__x, buffer, result);
}
diff --git a/stdlib/erand48.c b/stdlib/erand48.c
index 66af9036d9..ebd76f8819 100644
--- a/stdlib/erand48.c
+++ b/stdlib/erand48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -20,8 +20,7 @@
double
-erand48 (xsubi)
- unsigned short int xsubi[3];
+erand48 (unsigned short int xsubi[3])
{
double result;
diff --git a/stdlib/erand48_r.c b/stdlib/erand48_r.c
index ee554a5069..c8519e259e 100644
--- a/stdlib/erand48_r.c
+++ b/stdlib/erand48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -22,10 +22,8 @@
int
-__erand48_r (xsubi, buffer, result)
- unsigned short int xsubi[3];
- struct drand48_data *buffer;
- double *result;
+__erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
+ double *result)
{
union ieee754_double temp;
diff --git a/stdlib/errno.h b/stdlib/errno.h
index 1076a03748..3357cbc2df 100644
--- a/stdlib/errno.h
+++ b/stdlib/errno.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/stdlib/exit.c b/stdlib/exit.c
index aae3c0b82d..9d3c5f48df 100644
--- a/stdlib/exit.c
+++ b/stdlib/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
diff --git a/stdlib/exit.h b/stdlib/exit.h
index aaa12481b8..b28a4c952b 100644
--- a/stdlib/exit.h
+++ b/stdlib/exit.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/stdlib/fmtmsg.c b/stdlib/fmtmsg.c
index b8133dca4d..dc241e29cd 100644
--- a/stdlib/fmtmsg.c
+++ b/stdlib/fmtmsg.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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <fmtmsg.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -127,8 +127,8 @@ fmtmsg (long int classification, const char *label, int severity,
/* We do not want this call to be cut short by a thread
cancellation. Therefore disable cancellation for now. */
int state = PTHREAD_CANCEL_ENABLE;
- __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
- 0);
+ __libc_ptf_call (__pthread_setcancelstate,
+ (PTHREAD_CANCEL_DISABLE, &state), 0);
#endif
__libc_lock_lock (lock);
@@ -199,7 +199,7 @@ fmtmsg (long int classification, const char *label, int severity,
__libc_lock_unlock (lock);
#ifdef __libc_ptf_call
- __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+ __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
#endif
return result;
diff --git a/stdlib/fmtmsg.h b/stdlib/fmtmsg.h
index bbfadf5b1f..8b42d1094c 100644
--- a/stdlib/fmtmsg.h
+++ b/stdlib/fmtmsg.h
@@ -1,5 +1,5 @@
/* Message display handling.
- 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/stdlib/fpioconst.c b/stdlib/fpioconst.c
index a3cac88dc7..a2b4bfdd47 100644
--- a/stdlib/fpioconst.c
+++ b/stdlib/fpioconst.c
@@ -1,5 +1,5 @@
/* Table of MP integer constants 10^(2^i), used for floating point <-> decimal.
- 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/stdlib/fpioconst.h b/stdlib/fpioconst.h
index 0fd2bc2ec7..df0185fadd 100644
--- a/stdlib/fpioconst.h
+++ b/stdlib/fpioconst.h
@@ -1,5 +1,5 @@
/* Header file for constants used in floating point <-> decimal conversions.
- 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/stdlib/gen-fpioconst.c b/stdlib/gen-fpioconst.c
index 778498416f..e9658599fd 100644
--- a/stdlib/gen-fpioconst.c
+++ b/stdlib/gen-fpioconst.c
@@ -1,5 +1,5 @@
/* Generate data for fpioconst.c.
- 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/stdlib/gen-tst-strtod-round.c b/stdlib/gen-tst-strtod-round.c
index b7300cbe2f..3ef450640f 100644
--- a/stdlib/gen-tst-strtod-round.c
+++ b/stdlib/gen-tst-strtod-round.c
@@ -1,6 +1,6 @@
/* Generate table of tests in tst-strtod-round.c from
tst-strtod-round-data.
- 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/stdlib/getcontext.c b/stdlib/getcontext.c
index c72e2e2842..81637f90a3 100644
--- a/stdlib/getcontext.c
+++ b/stdlib/getcontext.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
@@ -19,8 +19,7 @@
#include <ucontext.h>
int
-getcontext (ucp)
- ucontext_t *ucp;
+getcontext (ucontext_t *ucp)
{
__set_errno (ENOSYS);
return -1;
diff --git a/stdlib/getenv.c b/stdlib/getenv.c
index f0842fd0cf..9b23b1a64f 100644
--- a/stdlib/getenv.c
+++ b/stdlib/getenv.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
@@ -30,8 +30,7 @@
two characters which we can access. By doing this we can avoid using the
`strncmp' most of the time. */
char *
-getenv (name)
- const char *name;
+getenv (const char *name)
{
size_t len = strlen (name);
char **ep;
diff --git a/stdlib/getsubopt.c b/stdlib/getsubopt.c
index 8ba79dcb59..51390b9423 100644
--- a/stdlib/getsubopt.c
+++ b/stdlib/getsubopt.c
@@ -1,5 +1,5 @@
/* Parse comma separate list into words.
- 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/stdlib/gmp-impl.h b/stdlib/gmp-impl.h
index 2cbb21b151..e02f050563 100644
--- a/stdlib/gmp-impl.h
+++ b/stdlib/gmp-impl.h
@@ -1,6 +1,6 @@
/* Include file for internal GNU MP types and definitions.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
diff --git a/stdlib/gmp.h b/stdlib/gmp.h
index 4f617326a6..a92fd36da3 100644
--- a/stdlib/gmp.h
+++ b/stdlib/gmp.h
@@ -1,6 +1,6 @@
/* gmp.h -- Definitions for GNU multiple precision functions.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
diff --git a/stdlib/grouping.c b/stdlib/grouping.c
index 020a57d2d3..00bcc464a6 100644
--- a/stdlib/grouping.c
+++ b/stdlib/grouping.c
@@ -1,5 +1,5 @@
/* Internal header for proving correct grouping in strings of numbers.
- 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/stdlib/grouping.h b/stdlib/grouping.h
index f0e9335227..2c80288213 100644
--- a/stdlib/grouping.h
+++ b/stdlib/grouping.h
@@ -1,5 +1,5 @@
/* Internal header for proving correct grouping in strings of numbers.
- 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/stdlib/isomac.c b/stdlib/isomac.c
index 816298b210..ae99aef1c9 100644
--- a/stdlib/isomac.c
+++ b/stdlib/isomac.c
@@ -1,5 +1,5 @@
/* Check system header files for ISO 9899:1990 (ISO C) compliance.
- 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.
Contributed by Jens Schweikhardt <schweikh@noc.dfn.de>, 1996.
@@ -70,6 +70,7 @@
# define _GNU_SOURCE 1
#endif
+#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/stdlib/jrand48.c b/stdlib/jrand48.c
index 63683d75c4..d593968f64 100644
--- a/stdlib/jrand48.c
+++ b/stdlib/jrand48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -20,8 +20,7 @@
long int
-jrand48 (xsubi)
- unsigned short int xsubi[3];
+jrand48 (unsigned short int xsubi[3])
{
long int result;
diff --git a/stdlib/jrand48_r.c b/stdlib/jrand48_r.c
index 6dfd8aef49..a0ce77b3e2 100644
--- a/stdlib/jrand48_r.c
+++ b/stdlib/jrand48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -19,10 +19,8 @@
#include <stdlib.h>
int
-__jrand48_r (xsubi, buffer, result)
- unsigned short int xsubi[3];
- struct drand48_data *buffer;
- long int *result;
+__jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
+ long int *result)
{
/* Compute next state. */
if (__drand48_iterate (xsubi, buffer) < 0)
diff --git a/stdlib/l64a.c b/stdlib/l64a.c
index 379e1f896e..383950a382 100644
--- a/stdlib/l64a.c
+++ b/stdlib/l64a.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -32,8 +32,7 @@ static const char conv_table[64] =
};
char *
-l64a (n)
- long int n;
+l64a (long int n)
{
unsigned long int m = (unsigned long int) n;
static char result[7];
diff --git a/stdlib/labs.c b/stdlib/labs.c
index 36a12a133e..4daffa7219 100644
--- a/stdlib/labs.c
+++ b/stdlib/labs.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/stdlib/lcong48.c b/stdlib/lcong48.c
index 14d29704ac..6e94a0d621 100644
--- a/stdlib/lcong48.c
+++ b/stdlib/lcong48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -20,8 +20,7 @@
void
-lcong48 (param)
- unsigned short int param[7];
+lcong48 (unsigned short int param[7])
{
(void) __lcong48_r (param, &__libc_drand48_data);
}
diff --git a/stdlib/lcong48_r.c b/stdlib/lcong48_r.c
index 5accc08538..32a7b4cd5d 100644
--- a/stdlib/lcong48_r.c
+++ b/stdlib/lcong48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -22,9 +22,7 @@
#include <limits.h>
int
-__lcong48_r (param, buffer)
- unsigned short int param[7];
- struct drand48_data *buffer;
+__lcong48_r (unsigned short int param[7], struct drand48_data *buffer)
{
/* Store the given values. */
memcpy (buffer->__x, &param[0], sizeof (buffer->__x));
diff --git a/stdlib/ldiv.c b/stdlib/ldiv.c
index 0804525a78..433e7fc3df 100644
--- a/stdlib/ldiv.c
+++ b/stdlib/ldiv.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/stdlib/llabs.c b/stdlib/llabs.c
index 8f301d165d..b3e60a036a 100644
--- a/stdlib/llabs.c
+++ b/stdlib/llabs.c
@@ -1,5 +1,5 @@
/* `long long int' absolute value.
- 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,8 +23,7 @@
/* Return the absolute value of I. */
long long int
-llabs (i)
- long long int i;
+llabs (long long int i)
{
return i < 0 ? -i : i;
}
diff --git a/stdlib/lldiv.c b/stdlib/lldiv.c
index 4a8a870862..b213e7d618 100644
--- a/stdlib/lldiv.c
+++ b/stdlib/lldiv.c
@@ -1,5 +1,5 @@
/* `long long int' divison with remainder.
- 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
@@ -21,9 +21,7 @@
/* Return the `lldiv_t' representation of NUMER over DENOM. */
lldiv_t
-lldiv (numer, denom)
- long long int numer;
- long long int denom;
+lldiv (long long int numer, long long int denom)
{
lldiv_t result;
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 4f2c4f5dfc..5cbc410fb0 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -1,5 +1,5 @@
/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
- 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.
@@ -139,6 +139,9 @@ extern const UQItype __clz_tab[256] attribute_hidden;
#endif /* __aarch64__ */
#if defined (__alpha) && W_TYPE_SIZE == 64
+/* There is a bug in g++ before version 5 that
+ errors on __builtin_alpha_umulh. */
+#if !defined(__cplusplus) || __GNUC__ >= 5
#define umul_ppmm(ph, pl, m0, m1) \
do { \
UDItype __m0 = (m0), __m1 = (m1); \
@@ -146,6 +149,7 @@ extern const UQItype __clz_tab[256] attribute_hidden;
(pl) = __m0 * __m1; \
} while (0)
#define UMUL_TIME 46
+#endif /* !c++ */
#ifndef LONGLONG_STANDALONE
#define udiv_qrnnd(q, r, n1, n0, d) \
do { UDItype __r; \
@@ -1082,7 +1086,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
} while (0)
#endif
-#if defined(__sh__) && !__SHMEDIA__ && W_TYPE_SIZE == 32
+#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
#ifndef __sh1__
#define umul_ppmm(w1, w0, u, v) \
__asm__ ( \
@@ -1098,6 +1102,33 @@ extern UDItype __umulsidi3 (USItype, USItype);
/* This is the same algorithm as __udiv_qrnnd_c. */
#define UDIV_NEEDS_NORMALIZATION 1
+#ifdef __FDPIC__
+/* FDPIC needs a special version of the asm fragment to extract the
+ code address from the function descriptor. __udiv_qrnnd_16 is
+ assumed to be local and not to use the GOT, so loading r12 is
+ not needed. */
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ extern UWtype __udiv_qrnnd_16 (UWtype, UWtype) \
+ __attribute__ ((visibility ("hidden"))); \
+ /* r0: rn r1: qn */ /* r0: n1 r4: n0 r5: d r6: d1 */ /* r2: __m */ \
+ __asm__ ( \
+ "mov%M4 %4,r5\n" \
+" swap.w %3,r4\n" \
+" swap.w r5,r6\n" \
+" mov.l @%5,r2\n" \
+" jsr @r2\n" \
+" shll16 r6\n" \
+" swap.w r4,r4\n" \
+" mov.l @%5,r2\n" \
+" jsr @r2\n" \
+" swap.w r1,%0\n" \
+" or r1,%0" \
+ : "=r" (q), "=&z" (r) \
+ : "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \
+ : "r1", "r2", "r4", "r5", "r6", "pr", "t"); \
+ } while (0)
+#else
#define udiv_qrnnd(q, r, n1, n0, d) \
do { \
extern UWtype __udiv_qrnnd_16 (UWtype, UWtype) \
@@ -1117,6 +1148,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
: "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \
: "r1", "r2", "r4", "r5", "r6", "pr", "t"); \
} while (0)
+#endif /* __FDPIC__ */
#define UDIV_TIME 80
@@ -1127,7 +1159,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
#endif /* __sh__ */
-#if defined (__SH5__) && __SHMEDIA__ && W_TYPE_SIZE == 32
+#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32
#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
#define count_leading_zeros(count, x) \
do \
diff --git a/stdlib/lrand48.c b/stdlib/lrand48.c
index 1c6c4916f5..5e0caad59d 100644
--- a/stdlib/lrand48.c
+++ b/stdlib/lrand48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
diff --git a/stdlib/lrand48_r.c b/stdlib/lrand48_r.c
index 8d554c7800..12b99181de 100644
--- a/stdlib/lrand48_r.c
+++ b/stdlib/lrand48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.org>, August 1995.
@@ -19,9 +19,7 @@
#include <stdlib.h>
int
-lrand48_r (buffer, result)
- struct drand48_data *buffer;
- long int *result;
+lrand48_r (struct drand48_data *buffer, long int *result)
{
/* Be generous for the arguments, detect some errors. */
if (buffer == NULL)
diff --git a/stdlib/lshift.c b/stdlib/lshift.c
index d7b5ab25ad..30fa7abcff 100644
--- a/stdlib/lshift.c
+++ b/stdlib/lshift.c
@@ -1,6 +1,6 @@
/* mpn_lshift -- Shift left low level.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -31,17 +31,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
*/
mp_limb_t
-#if __STDC__
mpn_lshift (register mp_ptr wp,
register mp_srcptr up, mp_size_t usize,
register unsigned int cnt)
-#else
-mpn_lshift (wp, up, usize, cnt)
- register mp_ptr wp;
- register mp_srcptr up;
- mp_size_t usize;
- register unsigned int cnt;
-#endif
{
register mp_limb_t high_limb, low_limb;
register unsigned sh_1, sh_2;
diff --git a/stdlib/makecontext.c b/stdlib/makecontext.c
index 75c436ad2e..a2d61540db 100644
--- a/stdlib/makecontext.c
+++ b/stdlib/makecontext.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/stdlib/mblen.c b/stdlib/mblen.c
index fc0ada77e1..8ce2ba9eee 100644
--- a/stdlib/mblen.c
+++ b/stdlib/mblen.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/stdlib/mbstowcs.c b/stdlib/mbstowcs.c
index b33a55d5bf..735a3099f1 100644
--- a/stdlib/mbstowcs.c
+++ b/stdlib/mbstowcs.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/stdlib/mbtowc.c b/stdlib/mbtowc.c
index a4128d0309..0305788304 100644
--- a/stdlib/mbtowc.c
+++ b/stdlib/mbtowc.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/stdlib/mod_1.c b/stdlib/mod_1.c
index 9323cf72a0..33dde15a0a 100644
--- a/stdlib/mod_1.c
+++ b/stdlib/mod_1.c
@@ -3,7 +3,7 @@
Return the single-limb remainder.
There are no constraints on the value of the divisor.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -37,15 +37,8 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
here (not udiv_qrnnd). */
mp_limb_t
-#if __STDC__
mpn_mod_1 (mp_srcptr dividend_ptr, mp_size_t dividend_size,
mp_limb_t divisor_limb)
-#else
-mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb)
- mp_srcptr dividend_ptr;
- mp_size_t dividend_size;
- mp_limb_t divisor_limb;
-#endif
{
mp_size_t i;
mp_limb_t n1, n0, r;
diff --git a/stdlib/monetary.h b/stdlib/monetary.h
index c78795bfdd..1fe9d6b2d4 100644
--- a/stdlib/monetary.h
+++ b/stdlib/monetary.h
@@ -1,5 +1,5 @@
/* Header file for monetary value formatting functions.
- 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/stdlib/mp_clz_tab.c b/stdlib/mp_clz_tab.c
index 17703d9bee..ec5c0b9162 100644
--- a/stdlib/mp_clz_tab.c
+++ b/stdlib/mp_clz_tab.c
@@ -1,5 +1,5 @@
/* __clz_tab -- support for longlong.h
- 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. Its master source is NOT part of
the C library, however. The master source lives in the GNU MP Library.
diff --git a/stdlib/mpn2dbl.c b/stdlib/mpn2dbl.c
index f590382d49..3f00f3debe 100644
--- a/stdlib/mpn2dbl.c
+++ b/stdlib/mpn2dbl.c
@@ -1,4 +1,4 @@
-/* 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/stdlib/mpn2flt.c b/stdlib/mpn2flt.c
index 38f835a1b2..2bb9e32ae1 100644
--- a/stdlib/mpn2flt.c
+++ b/stdlib/mpn2flt.c
@@ -1,4 +1,4 @@
-/* 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/stdlib/mrand48.c b/stdlib/mrand48.c
index e045893584..c850915f22 100644
--- a/stdlib/mrand48.c
+++ b/stdlib/mrand48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
diff --git a/stdlib/mrand48_r.c b/stdlib/mrand48_r.c
index f0f885c066..c6ae490083 100644
--- a/stdlib/mrand48_r.c
+++ b/stdlib/mrand48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -19,9 +19,7 @@
#include <stdlib.h>
int
-mrand48_r (buffer, result)
- struct drand48_data *buffer;
- long int *result;
+mrand48_r (struct drand48_data *buffer, long int *result)
{
/* Be generous for the arguments, detect some errors. */
if (buffer == NULL)
diff --git a/stdlib/msort.c b/stdlib/msort.c
index 4e17a88747..7217838683 100644
--- a/stdlib/msort.c
+++ b/stdlib/msort.c
@@ -1,6 +1,6 @@
/* An alternative to qsort, with an identical interface.
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.
Written by Mike Haertel, September 1988.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/stdlib/mul.c b/stdlib/mul.c
index bfcd0747f0..de2663eeda 100644
--- a/stdlib/mul.c
+++ b/stdlib/mul.c
@@ -1,6 +1,6 @@
/* mpn_mul -- Multiply two natural numbers.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -42,18 +42,9 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
#endif
mp_limb_t
-#if __STDC__
mpn_mul (mp_ptr prodp,
mp_srcptr up, mp_size_t usize,
mp_srcptr vp, mp_size_t vsize)
-#else
-mpn_mul (prodp, up, usize, vp, vsize)
- mp_ptr prodp;
- mp_srcptr up;
- mp_size_t usize;
- mp_srcptr vp;
- mp_size_t vsize;
-#endif
{
mp_ptr prod_endp = prodp + usize + vsize - 1;
mp_limb_t cy;
diff --git a/stdlib/mul_1.c b/stdlib/mul_1.c
index f31acc1379..dc1884dc63 100644
--- a/stdlib/mul_1.c
+++ b/stdlib/mul_1.c
@@ -1,7 +1,7 @@
/* mpn_mul_1 -- Multiply a limb vector with a single limb and
store the product in a second limb vector.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -24,11 +24,8 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
#include "longlong.h"
mp_limb_t
-mpn_mul_1 (res_ptr, s1_ptr, s1_size, s2_limb)
- register mp_ptr res_ptr;
- register mp_srcptr s1_ptr;
- mp_size_t s1_size;
- register mp_limb_t s2_limb;
+mpn_mul_1 (register mp_ptr res_ptr, register mp_srcptr s1_ptr,
+ mp_size_t s1_size, register mp_limb_t s2_limb)
{
register mp_limb_t cy_limb;
register mp_size_t j;
diff --git a/stdlib/mul_n.c b/stdlib/mul_n.c
index f48b2cfcbd..dd64b15b47 100644
--- a/stdlib/mul_n.c
+++ b/stdlib/mul_n.c
@@ -1,6 +1,6 @@
/* mpn_mul_n -- Multiply two natural numbers of length n.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -49,15 +49,7 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
algorithm below. */
void
-#if __STDC__
impn_mul_n_basecase (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size)
-#else
-impn_mul_n_basecase (prodp, up, vp, size)
- mp_ptr prodp;
- mp_srcptr up;
- mp_srcptr vp;
- mp_size_t size;
-#endif
{
mp_size_t i;
mp_limb_t cy_limb;
@@ -100,17 +92,8 @@ impn_mul_n_basecase (prodp, up, vp, size)
}
void
-#if __STDC__
impn_mul_n (mp_ptr prodp,
mp_srcptr up, mp_srcptr vp, mp_size_t size, mp_ptr tspace)
-#else
-impn_mul_n (prodp, up, vp, size, tspace)
- mp_ptr prodp;
- mp_srcptr up;
- mp_srcptr vp;
- mp_size_t size;
- mp_ptr tspace;
-#endif
{
if ((size & 1) != 0)
{
@@ -219,14 +202,7 @@ impn_mul_n (prodp, up, vp, size, tspace)
}
void
-#if __STDC__
impn_sqr_n_basecase (mp_ptr prodp, mp_srcptr up, mp_size_t size)
-#else
-impn_sqr_n_basecase (prodp, up, size)
- mp_ptr prodp;
- mp_srcptr up;
- mp_size_t size;
-#endif
{
mp_size_t i;
mp_limb_t cy_limb;
@@ -269,16 +245,8 @@ impn_sqr_n_basecase (prodp, up, size)
}
void
-#if __STDC__
impn_sqr_n (mp_ptr prodp,
mp_srcptr up, mp_size_t size, mp_ptr tspace)
-#else
-impn_sqr_n (prodp, up, size, tspace)
- mp_ptr prodp;
- mp_srcptr up;
- mp_size_t size;
- mp_ptr tspace;
-#endif
{
if ((size & 1) != 0)
{
@@ -358,15 +326,7 @@ impn_sqr_n (prodp, up, size, tspace)
/* This should be made into an inline function in gmp.h. */
void
-#if __STDC__
mpn_mul_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size)
-#else
-mpn_mul_n (prodp, up, vp, size)
- mp_ptr prodp;
- mp_srcptr up;
- mp_srcptr vp;
- mp_size_t size;
-#endif
{
TMP_DECL (marker);
TMP_MARK (marker);
diff --git a/stdlib/nrand48.c b/stdlib/nrand48.c
index a13b3ba643..e8199e375b 100644
--- a/stdlib/nrand48.c
+++ b/stdlib/nrand48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -20,8 +20,7 @@
long int
-nrand48 (xsubi)
- unsigned short int xsubi[3];
+nrand48 (unsigned short int xsubi[3])
{
long int result;
diff --git a/stdlib/nrand48_r.c b/stdlib/nrand48_r.c
index 3b1797f24e..7bf8957eae 100644
--- a/stdlib/nrand48_r.c
+++ b/stdlib/nrand48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -19,10 +19,8 @@
#include <stdlib.h>
int
-__nrand48_r (xsubi, buffer, result)
- unsigned short int xsubi[3];
- struct drand48_data *buffer;
- long int *result;
+__nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer,
+ long int *result)
{
/* Compute next state. */
if (__drand48_iterate (xsubi, buffer) < 0)
diff --git a/stdlib/on_exit.c b/stdlib/on_exit.c
index 9fb987dfe4..4d08ea8e12 100644
--- a/stdlib/on_exit.c
+++ b/stdlib/on_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
diff --git a/stdlib/putenv.c b/stdlib/putenv.c
index 829bea20bf..71b9ab1d8c 100644
--- a/stdlib/putenv.c
+++ b/stdlib/putenv.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
@@ -49,8 +49,7 @@ extern char *alloca ();
/* Put STRING, which is of the form "NAME=VALUE", in the environment. */
int
-putenv (string)
- char *string;
+putenv (char *string)
{
const char *const name_end = strchr (string, '=');
diff --git a/stdlib/qsort.c b/stdlib/qsort.c
index 304fbed8e5..12a5a7506a 100644
--- a/stdlib/qsort.c
+++ b/stdlib/qsort.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.
Written by Douglas C. Schmidt (schmidt@ics.uci.edu).
diff --git a/stdlib/quick_exit.c b/stdlib/quick_exit.c
index eb3ef9d0ba..bb47472f9d 100644
--- a/stdlib/quick_exit.c
+++ b/stdlib/quick_exit.c
@@ -1,4 +1,4 @@
-/* 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.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/stdlib/rand.c b/stdlib/rand.c
index db0b214473..d07cb4a4b9 100644
--- a/stdlib/rand.c
+++ b/stdlib/rand.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/stdlib/rand_r.c b/stdlib/rand_r.c
index 1098ffb745..0611bac0f3 100644
--- a/stdlib/rand_r.c
+++ b/stdlib/rand_r.c
@@ -1,5 +1,5 @@
/* Reentrant random function from POSIX.1c.
- 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/stdlib/random.c b/stdlib/random.c
index 7c033df9aa..076fa00c73 100644
--- a/stdlib/random.c
+++ b/stdlib/random.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -50,7 +50,7 @@
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.*/
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
@@ -205,8 +205,7 @@ __libc_lock_define_initialized (static, lock)
introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
for default usage relies on values produced by this routine. */
void
-__srandom (x)
- unsigned int x;
+__srandom (unsigned int x)
{
__libc_lock_lock (lock);
(void) __srandom_r (x, &unsafe_state);
@@ -228,10 +227,7 @@ weak_alias (__srandom, srand)
setstate so that it doesn't matter when initstate is called.
Returns a pointer to the old state. */
char *
-__initstate (seed, arg_state, n)
- unsigned int seed;
- char *arg_state;
- size_t n;
+__initstate (unsigned int seed, char *arg_state, size_t n)
{
int32_t *ostate;
int ret;
@@ -258,8 +254,7 @@ weak_alias (__initstate, initstate)
same state as the current state
Returns a pointer to the old state information. */
char *
-__setstate (arg_state)
- char *arg_state;
+__setstate (char *arg_state)
{
int32_t *ostate;
diff --git a/stdlib/random_r.c b/stdlib/random_r.c
index c4cd9a3b54..3a4a77901b 100644
--- a/stdlib/random_r.c
+++ b/stdlib/random_r.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -158,9 +158,7 @@ static const struct random_poly_info random_poly_info =
introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
for default usage relies on values produced by this routine. */
int
-__srandom_r (seed, buf)
- unsigned int seed;
- struct random_data *buf;
+__srandom_r (unsigned int seed, struct random_data *buf)
{
int type;
int32_t *state;
@@ -229,11 +227,8 @@ weak_alias (__srandom_r, srandom_r)
setstate so that it doesn't matter when initstate is called.
Returns 0 on success, non-zero on failure. */
int
-__initstate_r (seed, arg_state, n, buf)
- unsigned int seed;
- char *arg_state;
- size_t n;
- struct random_data *buf;
+__initstate_r (unsigned int seed, char *arg_state, size_t n,
+ struct random_data *buf)
{
if (buf == NULL)
goto fail;
@@ -297,9 +292,7 @@ weak_alias (__initstate_r, initstate_r)
same state as the current state
Returns 0 on success, non-zero on failure. */
int
-__setstate_r (arg_state, buf)
- char *arg_state;
- struct random_data *buf;
+__setstate_r (char *arg_state, struct random_data *buf)
{
int32_t *new_state = 1 + (int32_t *) arg_state;
int type;
@@ -357,9 +350,7 @@ weak_alias (__setstate_r, setstate_r)
pointer if the front one has wrapped. Returns a 31-bit random number. */
int
-__random_r (buf, result)
- struct random_data *buf;
- int32_t *result;
+__random_r (struct random_data *buf, int32_t *result)
{
int32_t *state;
diff --git a/stdlib/rpmatch.c b/stdlib/rpmatch.c
index 04c0d189db..2b43ad59dd 100644
--- a/stdlib/rpmatch.c
+++ b/stdlib/rpmatch.c
@@ -1,7 +1,7 @@
/* Determine whether string value is affirmation or negative response
according to current locale's data.
This file is part of the GNU C Library.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/stdlib/rshift.c b/stdlib/rshift.c
index 8aaee2e2e9..d76b9c8c02 100644
--- a/stdlib/rshift.c
+++ b/stdlib/rshift.c
@@ -1,6 +1,6 @@
/* mpn_rshift -- Shift right a low-level natural-number integer.
-Copyright (C) 1991-2015 Free Software Foundation, Inc.
+Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -21,6 +21,8 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
#include <gmp.h>
#include "gmp-impl.h"
+#include <assert.h>
+
/* Shift U (pointed to by UP and USIZE limbs long) CNT bits to the right
and store the USIZE least significant limbs of the result at WP.
The bits shifted out to the right are returned.
@@ -31,27 +33,16 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
*/
mp_limb_t
-#if __STDC__
mpn_rshift (register mp_ptr wp,
register mp_srcptr up, mp_size_t usize,
register unsigned int cnt)
-#else
-mpn_rshift (wp, up, usize, cnt)
- register mp_ptr wp;
- register mp_srcptr up;
- mp_size_t usize;
- register unsigned int cnt;
-#endif
{
register mp_limb_t high_limb, low_limb;
register unsigned sh_1, sh_2;
register mp_size_t i;
mp_limb_t retval;
-#ifdef DEBUG
- if (usize == 0 || cnt == 0)
- abort ();
-#endif
+ assert (usize != 0 && cnt != 0);
sh_1 = cnt;
diff --git a/stdlib/secure-getenv.c b/stdlib/secure-getenv.c
index 1b0e7d3331..6be46e5e63 100644
--- a/stdlib/secure-getenv.c
+++ b/stdlib/secure-getenv.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 @@
what values to accept from the environment. This special version
checks for SUID or SGID first before doing any work. */
char *
-__libc_secure_getenv (name)
- const char *name;
+__libc_secure_getenv (const char *name)
{
return __libc_enable_secure ? NULL : getenv (name);
}
diff --git a/stdlib/seed48.c b/stdlib/seed48.c
index 4e7f5b7e8a..9750232954 100644
--- a/stdlib/seed48.c
+++ b/stdlib/seed48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -20,8 +20,7 @@
unsigned short int *
-seed48 (seed16v)
- unsigned short int seed16v[3];
+seed48 (unsigned short int seed16v[3])
{
(void) __seed48_r (seed16v, &__libc_drand48_data);
diff --git a/stdlib/seed48_r.c b/stdlib/seed48_r.c
index a07b501b03..c4cf25d72a 100644
--- a/stdlib/seed48_r.c
+++ b/stdlib/seed48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -21,9 +21,7 @@
#include <limits.h>
int
-__seed48_r (seed16v, buffer)
- unsigned short int seed16v[3];
- struct drand48_data *buffer;
+__seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer)
{
/* Save old value at a private place to be used as return value. */
memcpy (buffer->__old_x, buffer->__x, sizeof (buffer->__x));
diff --git a/stdlib/setcontext.c b/stdlib/setcontext.c
index bb977106fc..7135223d6c 100644
--- a/stdlib/setcontext.c
+++ b/stdlib/setcontext.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
@@ -19,8 +19,7 @@
#include <ucontext.h>
int
-setcontext (ucp)
- const ucontext_t *ucp;
+setcontext (const ucontext_t *ucp)
{
__set_errno (ENOSYS);
return -1;
diff --git a/stdlib/setenv.c b/stdlib/setenv.c
index b9e0ba808d..da61ee0720 100644
--- a/stdlib/setenv.c
+++ b/stdlib/setenv.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
@@ -24,11 +24,7 @@
there seems to be no way to pacify GCC selectively, only for the
place where it's needed. Do not use DIAG_IGNORE_NEEDS_COMMENT
here, as it's not defined yet. */
-#if ((__GNUC__ << 16) + __GNUC_MINOR__) >= ((4 << 16) + 7)
-# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-#else
-# pragma GCC diagnostic ignored "-Wuninitialized"
-#endif
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include <errno.h>
#if !_LIBC
@@ -57,7 +53,7 @@ extern char **environ;
#if _LIBC
/* This lock protects against simultaneous modifications of `environ'. */
-# include <bits/libc-lock.h>
+# include <libc-lock.h>
__libc_lock_define_initialized (static, envlock)
# define LOCK __libc_lock_lock (envlock)
# define UNLOCK __libc_lock_unlock (envlock)
@@ -117,11 +113,8 @@ static char **last_environ;
to reuse values once generated for a `setenv' call since we can never
free the strings. */
int
-__add_to_environ (name, value, combined, replace)
- const char *name;
- const char *value;
- const char *combined;
- int replace;
+__add_to_environ (const char *name, const char *value, const char *combined,
+ int replace)
{
char **ep;
size_t size;
@@ -255,10 +248,7 @@ __add_to_environ (name, value, combined, replace)
}
int
-setenv (name, value, replace)
- const char *name;
- const char *value;
- int replace;
+setenv (const char *name, const char *value, int replace)
{
if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
{
@@ -270,8 +260,7 @@ setenv (name, value, replace)
}
int
-unsetenv (name)
- const char *name;
+unsetenv (const char *name)
{
size_t len;
char **ep;
diff --git a/stdlib/srand48.c b/stdlib/srand48.c
index 8be470ba1f..013e11300a 100644
--- a/stdlib/srand48.c
+++ b/stdlib/srand48.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -20,8 +20,7 @@
void
-srand48 (seedval)
- long seedval;
+srand48 (long seedval)
{
(void) __srand48_r (seedval, &__libc_drand48_data);
}
diff --git a/stdlib/srand48_r.c b/stdlib/srand48_r.c
index 03a96994a1..333dfa014a 100644
--- a/stdlib/srand48_r.c
+++ b/stdlib/srand48_r.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -20,9 +20,7 @@
#include <limits.h>
int
-__srand48_r (seedval, buffer)
- long int seedval;
- struct drand48_data *buffer;
+__srand48_r (long int seedval, struct drand48_data *buffer)
{
/* The standards say we only have 32 bits. */
if (sizeof (long int) > 4)
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 0134378143..cc77708b23 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.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/stdlib/strfmon.c b/stdlib/strfmon.c
index 68e37af804..ca1e91acb8 100644
--- a/stdlib/strfmon.c
+++ b/stdlib/strfmon.c
@@ -1,5 +1,5 @@
/* Formatting a monetary value according to the current locale.
- 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>
and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
diff --git a/stdlib/strfmon_l.c b/stdlib/strfmon_l.c
index 3fae78b782..b3570209fa 100644
--- a/stdlib/strfmon_l.c
+++ b/stdlib/strfmon_l.c
@@ -1,5 +1,5 @@
/* Formatting a monetary value according to the given locale.
- 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 645293b719..4ee83c24e8 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -1,6 +1,6 @@
/* Read decimal floating point numbers.
This file is part of the GNU C Library.
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
The GNU C Library is free software; you can redistribute it and/or
@@ -46,10 +46,7 @@
FLOAT
-INTERNAL (STRTOF) (nptr, endptr, group)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int group;
+INTERNAL (STRTOF) (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group)
{
return INTERNAL(STRTOF_L) (nptr, endptr, group, _NL_CURRENT_LOCALE);
}
@@ -62,9 +59,7 @@ FLOAT
#ifdef weak_function
weak_function
#endif
-STRTOF (nptr, endptr)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
+STRTOF (const STRING_TYPE *nptr, STRING_TYPE **endptr)
{
return INTERNAL(STRTOF_L) (nptr, endptr, 0, _NL_CURRENT_LOCALE);
}
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index e13ab1e7e1..3d66eac706 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to float value, using given locale.
- 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.
@@ -20,8 +20,6 @@
#include <xlocale.h>
extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
-extern unsigned long long int ____strtoull_l_internal (const char *, char **,
- int, int, __locale_t);
/* Configuration part. These macros are defined by `strtold.c',
`strtof.c', `wcstod.c', `wcstold.c', and `wcstof.c' to produce the
@@ -33,30 +31,24 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
# ifdef USE_WIDE_CHAR
# define STRTOF wcstod_l
# define __STRTOF __wcstod_l
+# define STRTOF_NAN __wcstod_nan
# else
# define STRTOF strtod_l
# define __STRTOF __strtod_l
+# define STRTOF_NAN __strtod_nan
# endif
# define MPN2FLOAT __mpn_construct_double
# define FLOAT_HUGE_VAL HUGE_VAL
-# define SET_MANTISSA(flt, mant) \
- do { union ieee754_double u; \
- u.d = (flt); \
- u.ieee_nan.mantissa0 = (mant) >> 32; \
- u.ieee_nan.mantissa1 = (mant); \
- if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0) \
- (flt) = u.d; \
- } while (0)
#endif
/* End of configuration part. */
#include <ctype.h>
#include <errno.h>
#include <float.h>
-#include <ieee754.h>
#include "../locale/localeinfo.h"
#include <locale.h>
#include <math.h>
+#include <math_private.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
@@ -104,7 +96,6 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
# define TOLOWER_C(Ch) __towlower_l ((Ch), _nl_C_locobj_ptr)
# define STRNCASECMP(S1, S2, N) \
__wcsncasecmp_l ((S1), (S2), (N), _nl_C_locobj_ptr)
-# define STRTOULL(S, E, B) ____wcstoull_l_internal ((S), (E), (B), 0, loc)
#else
# define STRING_TYPE char
# define CHAR_TYPE char
@@ -116,7 +107,6 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
# define TOLOWER_C(Ch) __tolower_l ((Ch), _nl_C_locobj_ptr)
# define STRNCASECMP(S1, S2, N) \
__strncasecmp_l ((S1), (S2), (N), _nl_C_locobj_ptr)
-# define STRTOULL(S, E, B) ____strtoull_l_internal ((S), (E), (B), 0, loc)
#endif
@@ -181,10 +171,8 @@ static FLOAT
overflow_value (int negative)
{
__set_errno (ERANGE);
-#if FLT_EVAL_METHOD != 0
- volatile
-#endif
- FLOAT result = (negative ? -MAX_VALUE : MAX_VALUE) * MAX_VALUE;
+ FLOAT result = math_narrow_eval ((negative ? -MAX_VALUE : MAX_VALUE)
+ * MAX_VALUE);
return result;
}
@@ -195,10 +183,8 @@ static FLOAT
underflow_value (int negative)
{
__set_errno (ERANGE);
-#if FLT_EVAL_METHOD != 0
- volatile
-#endif
- FLOAT result = (negative ? -MIN_VALUE : MIN_VALUE) * MIN_VALUE;
+ FLOAT result = math_narrow_eval ((negative ? -MIN_VALUE : MIN_VALUE)
+ * MIN_VALUE);
return result;
}
@@ -300,8 +286,8 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
|| (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0))
{
__set_errno (ERANGE);
- volatile FLOAT force_underflow_exception = MIN_VALUE * MIN_VALUE;
- (void) force_underflow_exception;
+ FLOAT force_underflow = MIN_VALUE * MIN_VALUE;
+ math_force_eval (force_underflow);
}
}
@@ -490,11 +476,8 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
return 0.0. If the number is too big to be represented, set `errno' to
ERANGE and return HUGE_VAL with the appropriate sign. */
FLOAT
-____STRTOF_INTERNAL (nptr, endptr, group, loc)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int group;
- __locale_t loc;
+____STRTOF_INTERNAL (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group,
+ __locale_t loc)
{
int negative; /* The sign of the number. */
MPN_VAR (num); /* MP representation of the number. */
@@ -655,33 +638,14 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
if (*cp == L_('('))
{
const STRING_TYPE *startp = cp;
- do
- ++cp;
- while ((*cp >= L_('0') && *cp <= L_('9'))
- || ({ CHAR_TYPE lo = TOLOWER (*cp);
- lo >= L_('a') && lo <= L_('z'); })
- || *cp == L_('_'));
-
- if (*cp != L_(')'))
- /* The closing brace is missing. Only match the NAN
- part. */
- cp = startp;
+ STRING_TYPE *endp;
+ retval = STRTOF_NAN (cp + 1, &endp, L_(')'));
+ if (*endp == L_(')'))
+ /* Consume the closing parenthesis. */
+ cp = endp + 1;
else
- {
- /* This is a system-dependent way to specify the
- bitmask used for the NaN. We expect it to be
- a number which is put in the mantissa of the
- number. */
- STRING_TYPE *endp;
- unsigned long long int mant;
-
- mant = STRTOULL (startp + 1, &endp, 0);
- if (endp == cp)
- SET_MANTISSA (retval, mant);
-
- /* Consume the closing brace. */
- ++cp;
- }
+ /* Only match the NAN part. */
+ cp = startp;
}
if (endptr != NULL)
@@ -1787,10 +1751,7 @@ FLOAT
#ifdef weak_function
weak_function
#endif
-__STRTOF (nptr, endptr, loc)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- __locale_t loc;
+__STRTOF (const STRING_TYPE *nptr, STRING_TYPE **endptr, __locale_t loc)
{
return ____STRTOF_INTERNAL (nptr, endptr, 0, loc);
}
diff --git a/stdlib/strtod_nan.c b/stdlib/strtod_nan.c
new file mode 100644
index 0000000000..370b2ac552
--- /dev/null
+++ b/stdlib/strtod_nan.c
@@ -0,0 +1,24 @@
+/* Convert string for NaN payload to corresponding NaN. Narrow
+ strings, double.
+ 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 <strtod_nan_narrow.h>
+#include <strtod_nan_double.h>
+
+#define STRTOD_NAN __strtod_nan
+#include <strtod_nan_main.c>
diff --git a/stdlib/strtod_nan_double.h b/stdlib/strtod_nan_double.h
new file mode 100644
index 0000000000..b4227ffa26
--- /dev/null
+++ b/stdlib/strtod_nan_double.h
@@ -0,0 +1,30 @@
+/* Convert string for NaN payload to corresponding NaN. For double.
+ 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
+ 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/>. */
+
+#define FLOAT double
+#define SET_MANTISSA(flt, mant) \
+ do \
+ { \
+ union ieee754_double u; \
+ u.d = (flt); \
+ u.ieee_nan.mantissa0 = (mant) >> 32; \
+ u.ieee_nan.mantissa1 = (mant); \
+ if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0) \
+ (flt) = u.d; \
+ } \
+ while (0)
diff --git a/stdlib/strtod_nan_float.h b/stdlib/strtod_nan_float.h
new file mode 100644
index 0000000000..d295fe749d
--- /dev/null
+++ b/stdlib/strtod_nan_float.h
@@ -0,0 +1,29 @@
+/* Convert string for NaN payload to corresponding NaN. For float.
+ 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
+ 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/>. */
+
+#define FLOAT float
+#define SET_MANTISSA(flt, mant) \
+ do \
+ { \
+ union ieee754_float u; \
+ u.f = (flt); \
+ u.ieee_nan.mantissa = (mant); \
+ if (u.ieee.mantissa != 0) \
+ (flt) = u.f; \
+ } \
+ while (0)
diff --git a/stdlib/strtod_nan_main.c b/stdlib/strtod_nan_main.c
new file mode 100644
index 0000000000..10b1be090e
--- /dev/null
+++ b/stdlib/strtod_nan_main.c
@@ -0,0 +1,63 @@
+/* Convert string for NaN payload to corresponding NaN.
+ 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
+ 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 <ieee754.h>
+#include <locale.h>
+#include <math.h>
+#include <stdlib.h>
+#include <wchar.h>
+
+
+/* If STR starts with an optional n-char-sequence as defined by ISO C
+ (a sequence of ASCII letters, digits and underscores), followed by
+ ENDC, return a NaN whose payload is set based on STR. Otherwise,
+ return a default NAN. If ENDPTR is not NULL, set *ENDPTR to point
+ to the character after the initial n-char-sequence. */
+
+internal_function
+FLOAT
+STRTOD_NAN (const STRING_TYPE *str, STRING_TYPE **endptr, STRING_TYPE endc)
+{
+ const STRING_TYPE *cp = str;
+
+ while ((*cp >= L_('0') && *cp <= L_('9'))
+ || (*cp >= L_('A') && *cp <= L_('Z'))
+ || (*cp >= L_('a') && *cp <= L_('z'))
+ || *cp == L_('_'))
+ ++cp;
+
+ FLOAT retval = NAN;
+ if (*cp != endc)
+ goto out;
+
+ /* This is a system-dependent way to specify the bitmask used for
+ the NaN. We expect it to be a number which is put in the
+ mantissa of the number. */
+ STRING_TYPE *endp;
+ unsigned long long int mant;
+
+ mant = STRTOULL (str, &endp, 0);
+ if (endp == cp)
+ SET_MANTISSA (retval, mant);
+
+ out:
+ if (endptr != NULL)
+ *endptr = (STRING_TYPE *) cp;
+ return retval;
+}
+libc_hidden_def (STRTOD_NAN)
diff --git a/stdlib/strtod_nan_narrow.h b/stdlib/strtod_nan_narrow.h
new file mode 100644
index 0000000000..808dacad7f
--- /dev/null
+++ b/stdlib/strtod_nan_narrow.h
@@ -0,0 +1,22 @@
+/* Convert string for NaN payload to corresponding NaN. Narrow strings.
+ 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
+ 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/>. */
+
+#define STRING_TYPE char
+#define L_(Ch) Ch
+#define STRTOULL(S, E, B) ____strtoull_l_internal ((S), (E), (B), 0, \
+ _nl_C_locobj_ptr)
diff --git a/stdlib/strtod_nan_wide.h b/stdlib/strtod_nan_wide.h
new file mode 100644
index 0000000000..f086ecea1b
--- /dev/null
+++ b/stdlib/strtod_nan_wide.h
@@ -0,0 +1,22 @@
+/* Convert string for NaN payload to corresponding NaN. Wide strings.
+ 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
+ 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/>. */
+
+#define STRING_TYPE wchar_t
+#define L_(Ch) L##Ch
+#define STRTOULL(S, E, B) ____wcstoull_l_internal ((S), (E), (B), 0, \
+ _nl_C_locobj_ptr)
diff --git a/stdlib/strtof.c b/stdlib/strtof.c
index a42f0891ed..4ba7a9abe6 100644
--- a/stdlib/strtof.c
+++ b/stdlib/strtof.c
@@ -1,6 +1,6 @@
/* Read decimal floating point numbers.
This file is part of the GNU C Library.
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/stdlib/strtof_l.c b/stdlib/strtof_l.c
index 2a8646a8f6..32e995edc5 100644
--- a/stdlib/strtof_l.c
+++ b/stdlib/strtof_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to float value, using given locale.
- 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.
@@ -20,26 +20,19 @@
#include <xlocale.h>
extern float ____strtof_l_internal (const char *, char **, int, __locale_t);
-extern unsigned long long int ____strtoull_l_internal (const char *, char **,
- int, int, __locale_t);
#define FLOAT float
#define FLT FLT
#ifdef USE_WIDE_CHAR
# define STRTOF wcstof_l
# define __STRTOF __wcstof_l
+# define STRTOF_NAN __wcstof_nan
#else
# define STRTOF strtof_l
# define __STRTOF __strtof_l
+# define STRTOF_NAN __strtof_nan
#endif
#define MPN2FLOAT __mpn_construct_float
#define FLOAT_HUGE_VAL HUGE_VALF
-#define SET_MANTISSA(flt, mant) \
- do { union ieee754_float u; \
- u.f = (flt); \
- u.ieee_nan.mantissa = (mant); \
- if (u.ieee.mantissa != 0) \
- (flt) = u.f; \
- } while (0)
#include "strtod_l.c"
diff --git a/stdlib/strtof_nan.c b/stdlib/strtof_nan.c
new file mode 100644
index 0000000000..2dc89a3ba0
--- /dev/null
+++ b/stdlib/strtof_nan.c
@@ -0,0 +1,24 @@
+/* Convert string for NaN payload to corresponding NaN. Narrow
+ strings, float.
+ 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 <strtod_nan_narrow.h>
+#include <strtod_nan_float.h>
+
+#define STRTOD_NAN __strtof_nan
+#include <strtod_nan_main.c>
diff --git a/stdlib/strtol.c b/stdlib/strtol.c
index 7afad19d26..1d148841ae 100644
--- a/stdlib/strtol.c
+++ b/stdlib/strtol.c
@@ -1,5 +1,5 @@
/* Convert string representation of a number into an integer value.
- 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
@@ -92,11 +92,8 @@ extern INT INTERNAL (__strtol_l) (const STRING_TYPE *, STRING_TYPE **, int,
INT
-INTERNAL (strtol) (nptr, endptr, base, group)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int base;
- int group;
+INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base, int group)
{
return INTERNAL (__strtol_l) (nptr, endptr, base, group, _NL_CURRENT_LOCALE);
}
diff --git a/stdlib/strtol_l.c b/stdlib/strtol_l.c
index f3319a8936..f4c17694ab 100644
--- a/stdlib/strtol_l.c
+++ b/stdlib/strtol_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- 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.
@@ -137,8 +137,8 @@
# define UCHAR_TYPE wint_t
# define STRING_TYPE wchar_t
# define ISSPACE(Ch) __iswspace_l ((Ch), loc)
-# define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __towupper_l ((Ch), loc)
+# define ISALPHA(Ch) __iswalpha_l ((Ch), _nl_C_locobj_ptr)
+# define TOUPPER(Ch) __towupper_l ((Ch), _nl_C_locobj_ptr)
#else
# if defined _LIBC \
|| defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
@@ -150,8 +150,8 @@
# define UCHAR_TYPE unsigned char
# define STRING_TYPE char
# define ISSPACE(Ch) __isspace_l ((Ch), loc)
-# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __toupper_l ((Ch), loc)
+# define ISALPHA(Ch) __isalpha_l ((Ch), _nl_C_locobj_ptr)
+# define TOUPPER(Ch) __toupper_l ((Ch), _nl_C_locobj_ptr)
#endif
#define INTERNAL(X) INTERNAL1(X)
@@ -222,12 +222,8 @@ extern const unsigned char __strtol_ull_rem_tab[] attribute_hidden;
one converted is stored in *ENDPTR. */
INT
-INTERNAL (__strtol_l) (nptr, endptr, base, group, loc)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int base;
- int group;
- __locale_t loc;
+INTERNAL (__strtol_l) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base, int group, __locale_t loc)
{
int negative;
unsigned LONG int cutoff;
@@ -355,8 +351,8 @@ INTERNAL (__strtol_l) (nptr, endptr, base, group, loc)
&& (wchar_t) c != thousands
# else
&& ({ for (cnt = 0; cnt < thousands_len; ++cnt)
- if (thousands[cnt] != end[cnt])
- break;
+ if (thousands[cnt] != end[cnt])
+ break;
cnt < thousands_len; })
# endif
&& (!ISALPHA (c)
@@ -546,11 +542,8 @@ INT
#ifdef weak_function
weak_function
#endif
-__strtol_l (nptr, endptr, base, loc)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int base;
- __locale_t loc;
+__strtol_l (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base, __locale_t loc)
{
return INTERNAL (__strtol_l) (nptr, endptr, base, 0, loc);
}
diff --git a/stdlib/strtold.c b/stdlib/strtold.c
index c2b92384a9..bb46f23c29 100644
--- a/stdlib/strtold.c
+++ b/stdlib/strtold.c
@@ -1,6 +1,6 @@
/* Read decimal floating point numbers.
This file is part of the GNU C Library.
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/stdlib/strtold_l.c b/stdlib/strtold_l.c
index 0abe45f3ec..73ef0dd1d0 100644
--- a/stdlib/strtold_l.c
+++ b/stdlib/strtold_l.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/stdlib/strtold_nan.c b/stdlib/strtold_nan.c
new file mode 100644
index 0000000000..834d30443e
--- /dev/null
+++ b/stdlib/strtold_nan.c
@@ -0,0 +1,30 @@
+/* Convert string for NaN payload to corresponding NaN. Narrow
+ strings, long double.
+ 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 <math.h>
+
+/* This function is unused if long double and double have the same
+ representation. */
+#ifndef __NO_LONG_DOUBLE_MATH
+# include <strtod_nan_narrow.h>
+# include <strtod_nan_ldouble.h>
+
+# define STRTOD_NAN __strtold_nan
+# include <strtod_nan_main.c>
+#endif
diff --git a/stdlib/strtoll.c b/stdlib/strtoll.c
index fa85c703fd..b744808e16 100644
--- a/stdlib/strtoll.c
+++ b/stdlib/strtoll.c
@@ -1,5 +1,5 @@
/* Function to parse a `long long int' from text.
- 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/stdlib/strtoll_l.c b/stdlib/strtoll_l.c
index c2a2094428..5684bac7e9 100644
--- a/stdlib/strtoll_l.c
+++ b/stdlib/strtoll_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- 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/stdlib/strtoul.c b/stdlib/strtoul.c
index 4f9b9b61ba..ff8026e511 100644
--- a/stdlib/strtoul.c
+++ b/stdlib/strtoul.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/stdlib/strtoul_l.c b/stdlib/strtoul_l.c
index d309eb867e..3cbd3035e1 100644
--- a/stdlib/strtoul_l.c
+++ b/stdlib/strtoul_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- 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/stdlib/strtoull.c b/stdlib/strtoull.c
index b4057225d4..56905c172b 100644
--- a/stdlib/strtoull.c
+++ b/stdlib/strtoull.c
@@ -1,5 +1,5 @@
/* Function to parse an `unsigned long long int' from text.
- 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/stdlib/strtoull_l.c b/stdlib/strtoull_l.c
index 835262db9d..f45f103dfb 100644
--- a/stdlib/strtoull_l.c
+++ b/stdlib/strtoull_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- 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/stdlib/sub_n.c b/stdlib/sub_n.c
index 2e2e7dbcd0..be102662ce 100644
--- a/stdlib/sub_n.c
+++ b/stdlib/sub_n.c
@@ -1,6 +1,6 @@
/* mpn_sub_n -- Subtract two limb vectors of equal, non-zero length.
-Copyright (C) 1992-2015 Free Software Foundation, Inc.
+Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -22,15 +22,7 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
#include "gmp-impl.h"
mp_limb_t
-#if __STDC__
mpn_sub_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size)
-#else
-mpn_sub_n (res_ptr, s1_ptr, s2_ptr, size)
- register mp_ptr res_ptr;
- register mp_srcptr s1_ptr;
- register mp_srcptr s2_ptr;
- mp_size_t size;
-#endif
{
register mp_limb_t x, y, cy;
register mp_size_t j;
diff --git a/stdlib/submul_1.c b/stdlib/submul_1.c
index b3f5c9459c..1f479aafaf 100644
--- a/stdlib/submul_1.c
+++ b/stdlib/submul_1.c
@@ -3,7 +3,7 @@
from the limb vector pointed to by RES_PTR. Return the most significant
limb of the product, adjusted for carry-out from the subtraction.
-Copyright (C) 1992-2015 Free Software Foundation, Inc.
+Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -26,11 +26,8 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, see
#include "longlong.h"
mp_limb_t
-mpn_submul_1 (res_ptr, s1_ptr, s1_size, s2_limb)
- register mp_ptr res_ptr;
- register mp_srcptr s1_ptr;
- mp_size_t s1_size;
- register mp_limb_t s2_limb;
+mpn_submul_1 (register mp_ptr res_ptr, register mp_srcptr s1_ptr,
+ mp_size_t s1_size, register mp_limb_t s2_limb)
{
register mp_limb_t cy_limb;
register mp_size_t j;
diff --git a/stdlib/swapcontext.c b/stdlib/swapcontext.c
index 988e4aae3f..794420ae80 100644
--- a/stdlib/swapcontext.c
+++ b/stdlib/swapcontext.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
@@ -19,9 +19,7 @@
#include <ucontext.h>
int
-swapcontext (oucp, ucp)
- ucontext_t *oucp;
- const ucontext_t *ucp;
+swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
{
__set_errno (ENOSYS);
return -1;
diff --git a/stdlib/system.c b/stdlib/system.c
index f3dbe50c64..2f7d9f9b91 100644
--- a/stdlib/system.c
+++ b/stdlib/system.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,8 +21,7 @@
/* Execute LINE as a shell command. */
int
-__libc_system (line)
- const char *line;
+__libc_system (const char *line)
{
if (line == NULL)
return 0; /* This indicates no command processor. */
diff --git a/stdlib/test-a64l.c b/stdlib/test-a64l.c
index fbcd77d65e..15899ea5a6 100644
--- a/stdlib/test-a64l.c
+++ b/stdlib/test-a64l.c
@@ -1,5 +1,5 @@
/* Test program for the l64a and a64l 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 Andreas Schwab <schwab@suse.de>.
diff --git a/stdlib/test-canon.c b/stdlib/test-canon.c
index 5e174c587b..be7999a997 100644
--- a/stdlib/test-canon.c
+++ b/stdlib/test-canon.c
@@ -1,5 +1,5 @@
/* Test program for returning the canonical absolute name of a given file.
- 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.
Contributed by David Mosberger <davidm@azstarnet.com>.
diff --git a/stdlib/test-canon2.c b/stdlib/test-canon2.c
index d8f497737c..3940449502 100644
--- a/stdlib/test-canon2.c
+++ b/stdlib/test-canon2.c
@@ -1,5 +1,5 @@
/* Test for realpath/canonicalize function.
- 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/stdlib/testdiv.c b/stdlib/testdiv.c
index 300bd232e2..7aa6ed9553 100644
--- a/stdlib/testdiv.c
+++ b/stdlib/testdiv.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/stdlib/testrand.c b/stdlib/testrand.c
index 288b79a5f4..e21fee4494 100644
--- a/stdlib/testrand.c
+++ b/stdlib/testrand.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/stdlib/tst-bsearch.c b/stdlib/tst-bsearch.c
index 2d587ff881..c924b9a9a6 100644
--- a/stdlib/tst-bsearch.c
+++ b/stdlib/tst-bsearch.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/stdlib/tst-environ.c b/stdlib/tst-environ.c
index 9871bd73d4..6317d5121e 100644
--- a/stdlib/tst-environ.c
+++ b/stdlib/tst-environ.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/stdlib/tst-fmtmsg.sh b/stdlib/tst-fmtmsg.sh
index 7cdbcf5f96..90654654a9 100755
--- a/stdlib/tst-fmtmsg.sh
+++ b/stdlib/tst-fmtmsg.sh
@@ -1,6 +1,6 @@
-#! /bin/sh
+#!/bin/sh
# Test of fmtmsg function family.
-# 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/stdlib/tst-makecontext.c b/stdlib/tst-makecontext.c
index 8170e8aeed..abf8a8ff19 100644
--- a/stdlib/tst-makecontext.c
+++ b/stdlib/tst-makecontext.c
@@ -1,4 +1,4 @@
-/* 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/stdlib/tst-makecontext2.c b/stdlib/tst-makecontext2.c
index fda74f844b..060f8c45bc 100644
--- a/stdlib/tst-makecontext2.c
+++ b/stdlib/tst-makecontext2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2008-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/stdlib/tst-makecontext3.c b/stdlib/tst-makecontext3.c
index 95b4da3da2..54afe8c823 100644
--- a/stdlib/tst-makecontext3.c
+++ b/stdlib/tst-makecontext3.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/stdlib/tst-random2.c b/stdlib/tst-random2.c
index 4ff6fc5498..42d642460c 100644
--- a/stdlib/tst-random2.c
+++ b/stdlib/tst-random2.c
@@ -1,5 +1,5 @@
/* Test initstate saving the old state.
- 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.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2005.
diff --git a/stdlib/tst-secure-getenv.c b/stdlib/tst-secure-getenv.c
index 770641189c..58208dbc59 100644
--- a/stdlib/tst-secure-getenv.c
+++ b/stdlib/tst-secure-getenv.c
@@ -1,4 +1,4 @@
-/* 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/stdlib/tst-setcontext.c b/stdlib/tst-setcontext.c
index d37fca79f5..953192ea4b 100644
--- a/stdlib/tst-setcontext.c
+++ b/stdlib/tst-setcontext.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/stdlib/tst-setcontext2.c b/stdlib/tst-setcontext2.c
index 8582cc0c1c..e8474d3f26 100644
--- a/stdlib/tst-setcontext2.c
+++ b/stdlib/tst-setcontext2.c
@@ -1,6 +1,6 @@
/* Testcase checks, if setcontext(), swapcontext() restores signal-mask
and if pending signals are delivered after those calls.
- 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/stdlib/tst-setcontext3.c b/stdlib/tst-setcontext3.c
index fda21285c6..b528abcabd 100644
--- a/stdlib/tst-setcontext3.c
+++ b/stdlib/tst-setcontext3.c
@@ -1,5 +1,5 @@
/* Bug 18125: Verify setcontext calls exit() and not _exit().
- 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/stdlib/tst-setcontext3.sh b/stdlib/tst-setcontext3.sh
index 7bdca91587..4b2adb5f23 100644
--- a/stdlib/tst-setcontext3.sh
+++ b/stdlib/tst-setcontext3.sh
@@ -1,6 +1,6 @@
-#! /bin/sh
+#!/bin/sh
# Bug 18125: Test the exit functionality of setcontext().
-# 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/stdlib/tst-strtod-nan-locale-main.c b/stdlib/tst-strtod-nan-locale-main.c
new file mode 100644
index 0000000000..9cd1402e4f
--- /dev/null
+++ b/stdlib/tst-strtod-nan-locale-main.c
@@ -0,0 +1,89 @@
+/* Test strtod functions work with all ASCII letters in NAN(...) in
+ Turkish locales (bug 19266).
+ 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 <locale.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+
+#define STR_(X) #X
+#define STR(X) STR_(X)
+#define FNPFXS STR (FNPFX)
+#define CONCAT_(X, Y) X ## Y
+#define CONCAT(X, Y) CONCAT_ (X, Y)
+#define FNX(FN) CONCAT (FNPFX, FN)
+
+#define TEST(LOC, STR, FN, TYPE) \
+ do \
+ { \
+ CHAR *ep; \
+ TYPE val = FNX (FN) (STR, &ep); \
+ if (isnan (val) && *ep == 0) \
+ printf ("PASS: %s: " FNPFXS #FN " (" SFMT ")\n", LOC, STR); \
+ else \
+ { \
+ printf ("FAIL: %s: " FNPFXS #FN " (" SFMT ")\n", LOC, STR); \
+ result = 1; \
+ } \
+ } \
+ while (0)
+
+static int
+test_one_locale (const char *loc)
+{
+ if (setlocale (LC_ALL, loc) == NULL)
+ {
+ printf ("setlocale (LC_ALL, \"%s\") failed\n", loc);
+ return 1;
+ }
+ int result = 0;
+ for (int i = 10; i < 36; i++)
+ {
+ CHAR s[7];
+ s[0] = L_('N');
+ s[1] = L_('A');
+ s[2] = L_('N');
+ s[3] = L_('(');
+ s[4] = L_('A') + i - 10;
+ s[5] = L_(')');
+ s[6] = 0;
+ TEST (loc, s, f, float);
+ TEST (loc, s, d, double);
+ TEST (loc, s, ld, long double);
+ s[4] = L_('a') + i - 10;
+ TEST (loc, s, f, float);
+ TEST (loc, s, d, double);
+ TEST (loc, s, ld, long double);
+ }
+ return result;
+}
+
+static int
+do_test (void)
+{
+ int result = 0;
+ result |= test_one_locale ("C");
+ result |= test_one_locale ("tr_TR.UTF-8");
+ result |= test_one_locale ("tr_TR.ISO-8859-9");
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/stdlib/tst-strtod-nan-locale.c b/stdlib/tst-strtod-nan-locale.c
new file mode 100644
index 0000000000..97ef1d8d47
--- /dev/null
+++ b/stdlib/tst-strtod-nan-locale.c
@@ -0,0 +1,25 @@
+/* Test strtod functions work with all ASCII letters in NAN(...) in
+ Turkish locales (bug 19266). Narrow string version.
+ 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/>. */
+
+#define CHAR char
+#define SFMT "\"%s\""
+#define FNPFX strto
+#define L_(C) C
+
+#include <tst-strtod-nan-locale-main.c>
diff --git a/stdlib/tst-strtod-overflow.c b/stdlib/tst-strtod-overflow.c
index 1271f616ca..cd395eebef 100644
--- a/stdlib/tst-strtod-overflow.c
+++ b/stdlib/tst-strtod-overflow.c
@@ -1,5 +1,5 @@
/* Test for integer/buffer overflow in strtod.
- 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/stdlib/tst-strtod-round.c b/stdlib/tst-strtod-round.c
index 5ff096e659..201e51a5b6 100644
--- a/stdlib/tst-strtod-round.c
+++ b/stdlib/tst-strtod-round.c
@@ -1,6 +1,6 @@
/* Test for correct rounding of results of strtod and related
functions.
- 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/stdlib/tst-strtod-underflow.c b/stdlib/tst-strtod-underflow.c
index be7af091b3..5cdaaeeddb 100644
--- a/stdlib/tst-strtod-underflow.c
+++ b/stdlib/tst-strtod-underflow.c
@@ -1,6 +1,6 @@
/* Test for strtod handling of arguments that may cause floating-point
underflow.
- 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/stdlib/tst-strtod.c b/stdlib/tst-strtod.c
index a469208a49..3476a57b51 100644
--- a/stdlib/tst-strtod.c
+++ b/stdlib/tst-strtod.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
@@ -81,8 +81,8 @@ static void expand (char *dst, int c);
static int long_dbl (void);
static int locale_test (void);
-int
-main (int argc, char ** argv)
+static int
+do_test (void)
{
char buf[100];
const struct ltest *lt;
@@ -182,9 +182,7 @@ main (int argc, char ** argv)
}
static void
-expand (dst, c)
- char *dst;
- int c;
+expand (char *dst, int c)
{
if (isprint (c))
{
@@ -276,3 +274,6 @@ locale_test (void)
return result;
}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/stdlib/tst-strtol-locale-main.c b/stdlib/tst-strtol-locale-main.c
new file mode 100644
index 0000000000..99c210c297
--- /dev/null
+++ b/stdlib/tst-strtol-locale-main.c
@@ -0,0 +1,87 @@
+/* Test strtol functions work with all ASCII letters in Turkish
+ locales (bug 19242).
+ 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 <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+
+#define STR_(X) #X
+#define STR(X) STR_(X)
+#define FNPFXS STR (FNPFX)
+#define CONCAT_(X, Y) X ## Y
+#define CONCAT(X, Y) CONCAT_ (X, Y)
+#define FNX(FN) CONCAT (FNPFX, FN)
+
+#define TEST(LOC, STR, EXP_VAL, FN, TYPE, FMT) \
+ do \
+ { \
+ CHAR *ep; \
+ TYPE val = FNX (FN) (STR, &ep, 36); \
+ printf ("%s: " FNPFXS #FN " (" SFMT ") == " FMT "\n", LOC, STR, val); \
+ if (val == (TYPE) (EXP_VAL) && *ep == 0) \
+ printf ("PASS: %s: " FNPFXS #FN " (" SFMT ")\n", LOC, STR); \
+ else \
+ { \
+ printf ("FAIL: %s: " FNPFXS #FN " (" SFMT ")\n", LOC, STR); \
+ result = 1; \
+ } \
+ } \
+ while (0)
+
+static int
+test_one_locale (const char *loc)
+{
+ if (setlocale (LC_ALL, loc) == NULL)
+ {
+ printf ("setlocale (LC_ALL, \"%s\") failed\n", loc);
+ return 1;
+ }
+ int result = 0;
+ for (int i = 10; i < 36; i++)
+ {
+ CHAR s[2];
+ s[0] = L_('A') + i - 10;
+ s[1] = 0;
+ TEST (loc, s, i, l, long int, "%ld");
+ TEST (loc, s, i, ul, unsigned long int, "%lu");
+ TEST (loc, s, i, ll, long long int, "%lld");
+ TEST (loc, s, i, ull, unsigned long long int, "%llu");
+ s[0] = L_('a') + i - 10;
+ s[1] = 0;
+ TEST (loc, s, i, l, long int, "%ld");
+ TEST (loc, s, i, ul, unsigned long int, "%lu");
+ TEST (loc, s, i, ll, long long int, "%lld");
+ TEST (loc, s, i, ull, unsigned long long int, "%llu");
+ }
+ return result;
+}
+
+static int
+do_test (void)
+{
+ int result = 0;
+ result |= test_one_locale ("C");
+ result |= test_one_locale ("tr_TR.UTF-8");
+ result |= test_one_locale ("tr_TR.ISO-8859-9");
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/stdlib/tst-strtol-locale.c b/stdlib/tst-strtol-locale.c
new file mode 100644
index 0000000000..cccb9c203b
--- /dev/null
+++ b/stdlib/tst-strtol-locale.c
@@ -0,0 +1,25 @@
+/* Test strtol functions work with all ASCII letters in Turkish
+ locales (bug 19242). Narrow string version.
+ 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/>. */
+
+#define CHAR char
+#define SFMT "\"%s\""
+#define FNPFX strto
+#define L_(C) C
+
+#include <tst-strtol-locale-main.c>
diff --git a/stdlib/tst-strtol.c b/stdlib/tst-strtol.c
index 448102a2d9..5b80622e07 100644
--- a/stdlib/tst-strtol.c
+++ b/stdlib/tst-strtol.c
@@ -611,9 +611,7 @@ do_test (void)
}
static void
-expand (dst, c)
- char *dst;
- int c;
+expand (char *dst, int c)
{
if (isprint (c))
{
diff --git a/stdlib/tst-strtoll.c b/stdlib/tst-strtoll.c
index 93f1a56a56..de39ee3a5e 100644
--- a/stdlib/tst-strtoll.c
+++ b/stdlib/tst-strtoll.c
@@ -386,9 +386,7 @@ do_test (void)
}
static void
-expand (dst, c)
- char *dst;
- int c;
+expand (char *dst, int c)
{
if (isprint (c))
{
diff --git a/stdlib/tst-system.c b/stdlib/tst-system.c
index b20238001a..8dfe7be302 100644
--- a/stdlib/tst-system.c
+++ b/stdlib/tst-system.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.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
diff --git a/stdlib/tst-tininess.c b/stdlib/tst-tininess.c
index 5750941e6e..509792a80a 100644
--- a/stdlib/tst-tininess.c
+++ b/stdlib/tst-tininess.c
@@ -1,5 +1,5 @@
/* Test that tininess.h is correct for this architecture.
- 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/stdlib/tst-tls-atexit-lib.c b/stdlib/tst-tls-atexit-lib.c
index 2478d80f72..9b9421494f 100644
--- a/stdlib/tst-tls-atexit-lib.c
+++ b/stdlib/tst-tls-atexit-lib.c
@@ -1,5 +1,5 @@
/* Verify that DSO is unloaded only if its TLS objects are destroyed - the DSO.
- 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/stdlib/tst-tls-atexit-nodelete.c b/stdlib/tst-tls-atexit-nodelete.c
index ff290fa987..0fd1dc3f9c 100644
--- a/stdlib/tst-tls-atexit-nodelete.c
+++ b/stdlib/tst-tls-atexit-nodelete.c
@@ -1,7 +1,7 @@
/* Verify that a RTLD_NODELETE DSO is not unloaded even if its TLS objects are
destroyed.
- 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/stdlib/tst-tls-atexit.c b/stdlib/tst-tls-atexit.c
index e9839d8b15..2f69e5d9ac 100644
--- a/stdlib/tst-tls-atexit.c
+++ b/stdlib/tst-tls-atexit.c
@@ -1,5 +1,5 @@
/* Verify that DSO is unloaded only if its TLS objects are destroyed.
- 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/stdlib/tst-xpg-basename.c b/stdlib/tst-xpg-basename.c
index cfa2b4a2c2..182909f03a 100644
--- a/stdlib/tst-xpg-basename.c
+++ b/stdlib/tst-xpg-basename.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.
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
diff --git a/stdlib/ucontext.h b/stdlib/ucontext.h
index eb88b5b227..813a24d270 100644
--- a/stdlib/ucontext.h
+++ b/stdlib/ucontext.h
@@ -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/stdlib/wcstombs.c b/stdlib/wcstombs.c
index f8f3975cbc..f2199041d7 100644
--- a/stdlib/wcstombs.c
+++ b/stdlib/wcstombs.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/stdlib/wctomb.c b/stdlib/wctomb.c
index d8d8551b11..06c3753f9a 100644
--- a/stdlib/wctomb.c
+++ b/stdlib/wctomb.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/stdlib/xpg_basename.c b/stdlib/xpg_basename.c
index f150a4f131..6ea1c202b7 100644
--- a/stdlib/xpg_basename.c
+++ b/stdlib/xpg_basename.c
@@ -1,5 +1,5 @@
/* Return basename of given pathname according to the weird XPG specification.
- 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.