summaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'iconv')
-rw-r--r--iconv/Makefile2
-rw-r--r--iconv/dummy-repertoire.c2
-rw-r--r--iconv/gconv.c2
-rw-r--r--iconv/gconv.h2
-rw-r--r--iconv/gconv_builtin.c2
-rw-r--r--iconv/gconv_builtin.h2
-rw-r--r--iconv/gconv_cache.c2
-rw-r--r--iconv/gconv_charset.h2
-rw-r--r--iconv/gconv_close.c2
-rw-r--r--iconv/gconv_conf.c4
-rw-r--r--iconv/gconv_db.c43
-rw-r--r--iconv/gconv_dl.c9
-rw-r--r--iconv/gconv_int.h4
-rw-r--r--iconv/gconv_open.c2
-rw-r--r--iconv/gconv_simple.c2
-rw-r--r--iconv/gconv_trans.c4
-rw-r--r--iconv/iconv.c2
-rw-r--r--iconv/iconv.h2
-rw-r--r--iconv/iconv_charmap.c2
-rw-r--r--iconv/iconv_close.c2
-rw-r--r--iconv/iconv_open.c2
-rw-r--r--iconv/iconv_prog.c4
-rw-r--r--iconv/iconv_prog.h2
-rw-r--r--iconv/iconvconfig.c4
-rw-r--r--iconv/iconvconfig.h2
-rw-r--r--iconv/loop.c2
-rw-r--r--iconv/skeleton.c4
-rw-r--r--iconv/strtab.c2
-rw-r--r--iconv/tst-iconv2.c2
-rw-r--r--iconv/tst-iconv5.c2
30 files changed, 73 insertions, 47 deletions
diff --git a/iconv/Makefile b/iconv/Makefile
index 0d55eda94b..b008707eb5 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -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/iconv/dummy-repertoire.c b/iconv/dummy-repertoire.c
index 083f593076..0c29c2e7f7 100644
--- a/iconv/dummy-repertoire.c
+++ b/iconv/dummy-repertoire.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.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
diff --git a/iconv/gconv.c b/iconv/gconv.c
index c8253ccfe8..1ffb9343e1 100644
--- a/iconv/gconv.c
+++ b/iconv/gconv.c
@@ -1,6 +1,6 @@
/* Convert characters in input buffer using conversion descriptor to
output buffer.
- 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/iconv/gconv.h b/iconv/gconv.h
index 83901bfcd1..8d8ce5813b 100644
--- a/iconv/gconv.h
+++ b/iconv/gconv.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/iconv/gconv_builtin.c b/iconv/gconv_builtin.c
index c7b574f5dd..3bd4afa6f9 100644
--- a/iconv/gconv_builtin.c
+++ b/iconv/gconv_builtin.c
@@ -1,5 +1,5 @@
/* Table for builtin transformation mapping.
- 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/iconv/gconv_builtin.h b/iconv/gconv_builtin.h
index ca6061cd45..856d0a9c6f 100644
--- a/iconv/gconv_builtin.h
+++ b/iconv/gconv_builtin.h
@@ -1,5 +1,5 @@
/* Builtin transformations.
- 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/iconv/gconv_cache.c b/iconv/gconv_cache.c
index 6e2c200b96..4103de10a7 100644
--- a/iconv/gconv_cache.c
+++ b/iconv/gconv_cache.c
@@ -1,5 +1,5 @@
/* Cache handling for iconv modules.
- Copyright (C) 2001-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h
index 80290bc2e3..95cbce7b63 100644
--- a/iconv/gconv_charset.h
+++ b/iconv/gconv_charset.h
@@ -1,5 +1,5 @@
/* Charset name normalization.
- Copyright (C) 2001-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
diff --git a/iconv/gconv_close.c b/iconv/gconv_close.c
index 2f0df5b510..c9a61773b2 100644
--- a/iconv/gconv_close.c
+++ b/iconv/gconv_close.c
@@ -1,5 +1,5 @@
/* Release any resource associated with given conversion descriptor.
- 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/iconv/gconv_conf.c b/iconv/gconv_conf.c
index 0ba4739c41..e23518846c 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -1,5 +1,5 @@
/* Handle configuration data.
- 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.
@@ -31,7 +31,7 @@
#include <unistd.h>
#include <sys/param.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include <gconv_int.h>
diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c
index ce46216c2b..a441100df4 100644
--- a/iconv/gconv_db.c
+++ b/iconv/gconv_db.c
@@ -1,5 +1,5 @@
/* Provide access to the collection of available transformation modules.
- 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.
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include <locale/localeinfo.h>
#include <dlfcn.h>
@@ -243,6 +243,8 @@ gen_steps (struct derivation_step *best, const char *toset,
struct __gconv_step *result;
struct derivation_step *current;
int status = __GCONV_NOMEM;
+ char *from_name = NULL;
+ char *to_name = NULL;
/* First determine number of steps. */
for (current = best; current->last != NULL; current = current->last)
@@ -259,12 +261,30 @@ gen_steps (struct derivation_step *best, const char *toset,
current = best;
while (step_cnt-- > 0)
{
- result[step_cnt].__from_name = (step_cnt == 0
- ? __strdup (fromset)
- : (char *)current->last->result_set);
- result[step_cnt].__to_name = (step_cnt + 1 == *nsteps
- ? __strdup (current->result_set)
- : result[step_cnt + 1].__from_name);
+ if (step_cnt == 0)
+ {
+ result[step_cnt].__from_name = from_name = __strdup (fromset);
+ if (from_name == NULL)
+ {
+ failed = 1;
+ break;
+ }
+ }
+ else
+ result[step_cnt].__from_name = (char *)current->last->result_set;
+
+ if (step_cnt + 1 == *nsteps)
+ {
+ result[step_cnt].__to_name = to_name
+ = __strdup (current->result_set);
+ if (to_name == NULL)
+ {
+ failed = 1;
+ break;
+ }
+ }
+ else
+ result[step_cnt].__to_name = result[step_cnt + 1].__from_name;
result[step_cnt].__counter = 1;
result[step_cnt].__data = NULL;
@@ -332,6 +352,8 @@ gen_steps (struct derivation_step *best, const char *toset,
while (++step_cnt < *nsteps)
__gconv_release_step (&result[step_cnt]);
free (result);
+ free (from_name);
+ free (to_name);
*nsteps = 0;
*handle = NULL;
if (status == __GCONV_OK)
@@ -828,8 +850,9 @@ free_modules_db (struct gconv_module *node)
/* Free all resources if necessary. */
libc_freeres_fn (free_mem)
{
- /* First free locale memory. This needs to be done before freeing derivations,
- as ctype cleanup functions dereference steps arrays which we free below. */
+ /* First free locale memory. This needs to be done before freeing
+ derivations, as ctype cleanup functions dereference steps arrays which we
+ free below. */
_nl_locale_subfreeres ();
/* finddomain.c has similar problem. */
diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c
index 77c9b26bd7..4e9dfea437 100644
--- a/iconv/gconv_dl.c
+++ b/iconv/gconv_dl.c
@@ -1,5 +1,5 @@
/* Handle loading/unloading of shared object for transformation.
- 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.
@@ -23,7 +23,7 @@
#include <search.h>
#include <stdlib.h>
#include <string.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include <sys/param.h>
#include <gconv_int.h>
@@ -219,6 +219,9 @@ libc_freeres_fn (free_mem)
#ifdef DEBUG
+
+#include <stdio.h>
+
static void
do_print (const void *nodep, VISIT value, int level)
{
@@ -231,7 +234,7 @@ do_print (const void *nodep, VISIT value, int level)
obj->name, obj->counter);
}
-static void
+static void __attribute__ ((used))
print_all (void)
{
__twalk (loaded, do_print);
diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h
index 162c4844a3..7201ab657e 100644
--- a/iconv/gconv_int.h
+++ b/iconv/gconv_int.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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,7 +23,7 @@
#include <stdlib.h> /* For alloca used in macro below. */
#include <ctype.h> /* For __toupper_l used in macro below. */
#include <string.h> /* For strlen et al used in macro below. */
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
__BEGIN_DECLS
diff --git a/iconv/gconv_open.c b/iconv/gconv_open.c
index 057c1e3b5e..f662872a5d 100644
--- a/iconv/gconv_open.c
+++ b/iconv/gconv_open.c
@@ -1,5 +1,5 @@
/* Find matching transformation algorithms and initialize steps.
- 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/iconv/gconv_simple.c b/iconv/gconv_simple.c
index d08c71c286..5412bd6f65 100644
--- a/iconv/gconv_simple.c
+++ b/iconv/gconv_simple.c
@@ -1,5 +1,5 @@
/* Simple transformations functions.
- 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/iconv/gconv_trans.c b/iconv/gconv_trans.c
index 5d5d4d75a4..91ec843860 100644
--- a/iconv/gconv_trans.c
+++ b/iconv/gconv_trans.c
@@ -1,5 +1,5 @@
/* Transliteration using the locale's data.
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
@@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
#include "gconv_int.h"
#include "../locale/localeinfo.h"
diff --git a/iconv/iconv.c b/iconv/iconv.c
index 6f85e45254..839e17b2af 100644
--- a/iconv/iconv.c
+++ b/iconv/iconv.c
@@ -1,6 +1,6 @@
/* Convert characters in input buffer using conversion descriptor to
output buffer.
- 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/iconv/iconv.h b/iconv/iconv.h
index 1702f55fa3..0c95c98301 100644
--- a/iconv/iconv.h
+++ b/iconv/iconv.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/iconv/iconv_charmap.c b/iconv/iconv_charmap.c
index 25a41acabc..999d21b658 100644
--- a/iconv/iconv_charmap.c
+++ b/iconv/iconv_charmap.c
@@ -1,5 +1,5 @@
/* Convert using charmaps and possibly iconv().
- Copyright (C) 2001-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
diff --git a/iconv/iconv_close.c b/iconv/iconv_close.c
index ad22d2b9b9..50ae0cde45 100644
--- a/iconv/iconv_close.c
+++ b/iconv/iconv_close.c
@@ -1,5 +1,5 @@
/* Release any resource associated with given conversion descriptor.
- 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/iconv/iconv_open.c b/iconv/iconv_open.c
index 2b15be1ad4..ebd46e2103 100644
--- a/iconv/iconv_open.c
+++ b/iconv/iconv_open.c
@@ -1,5 +1,5 @@
/* Get descriptor for character set conversion.
- 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/iconv/iconv_prog.c b/iconv/iconv_prog.c
index e249bce0fe..1ec70abcae 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -1,5 +1,5 @@
/* Convert text in given files from the specified from-set to the to-set.
- 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.
@@ -426,7 +426,7 @@ print_version (FILE *stream, struct argp_state *state)
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2015");
+"), "2016");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
diff --git a/iconv/iconv_prog.h b/iconv/iconv_prog.h
index 1adf4cd6a5..c6c289521f 100644
--- a/iconv/iconv_prog.h
+++ b/iconv/iconv_prog.h
@@ -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.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c
index 4b936e6baa..05674de326 100644
--- a/iconv/iconvconfig.c
+++ b/iconv/iconvconfig.c
@@ -1,5 +1,5 @@
/* Generate fastloading iconv module configuration files.
- 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.
@@ -397,7 +397,7 @@ print_version (FILE *stream, struct argp_state *state)
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2015");
+"), "2016");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
diff --git a/iconv/iconvconfig.h b/iconv/iconvconfig.h
index 001ad07aaf..a08aed9691 100644
--- a/iconv/iconvconfig.h
+++ b/iconv/iconvconfig.h
@@ -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/iconv/loop.c b/iconv/loop.c
index 48f47620c0..c432168eef 100644
--- a/iconv/loop.c
+++ b/iconv/loop.c
@@ -1,5 +1,5 @@
/* Conversion loop frame work.
- 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/iconv/skeleton.c b/iconv/skeleton.c
index 09dfe11065..a15f8b1d0b 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -1,5 +1,5 @@
/* Skeleton for a conversion module.
- 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.
@@ -675,7 +675,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
#else
/* We have a problem in one of the functions below.
Undo the conversion upto the error point. */
- size_t nstatus;
+ size_t nstatus __attribute__ ((unused));
/* Reload the pointers. */
*inptrp = inptr;
diff --git a/iconv/strtab.c b/iconv/strtab.c
index a4ef6c513d..e8fef047e2 100644
--- a/iconv/strtab.c
+++ b/iconv/strtab.c
@@ -1,5 +1,5 @@
/* C string table handling.
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2016 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
This program is free software; you can redistribute it and/or modify
diff --git a/iconv/tst-iconv2.c b/iconv/tst-iconv2.c
index 31ceee02d7..a2b42ba816 100644
--- a/iconv/tst-iconv2.c
+++ b/iconv/tst-iconv2.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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
diff --git a/iconv/tst-iconv5.c b/iconv/tst-iconv5.c
index b17e484155..414905e0a0 100644
--- a/iconv/tst-iconv5.c
+++ b/iconv/tst-iconv5.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by GOTO Masanori <gotom@debian.or.jp>, 2004