mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 16:50:07 +00:00
30891f35fa
We stopped adding "Contributed by" or similar lines in sources in 2012 in favour of git logs and keeping the Contributors section of the glibc manual up to date. Removing these lines makes the license header a bit more consistent across files and also removes the possibility of error in attribution when license blocks or files are copied across since the contributed-by lines don't actually reflect reality in those cases. Move all "Contributed by" and similar lines (Written by, Test by, etc.) into a new file CONTRIBUTED-BY to retain record of these contributions. These contributors are also mentioned in manual/contrib.texi, so we just maintain this additional record as a courtesy to the earlier developers. The following scripts were used to filter a list of files to edit in place and to clean up the CONTRIBUTED-BY file respectively. These were not added to the glibc sources because they're not expected to be of any use in future given that this is a one time task: https://gist.github.com/siddhesh/b5ecac94eabfd72ed2916d6d8157e7dc https://gist.github.com/siddhesh/15ea1f5e435ace9774f485030695ee02 Reviewed-by: Carlos O'Donell <carlos@redhat.com>
47 lines
1.0 KiB
C
47 lines
1.0 KiB
C
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <iconv.h>
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
const char *dummy_codesets[] =
|
|
{
|
|
"ISO_8859-1", "ISO_8859-2", "ISO_8859-3", "ISO_8859-4",
|
|
"ISO_8859-5", "ISO_8859-6", "ISO_8859-7", "ISO_8859-8"
|
|
};
|
|
iconv_t dummy_cd[8], cd_a;
|
|
int i;
|
|
char buffer[1024], *to = buffer;
|
|
char *from = (char *) "foobar";
|
|
size_t to_left = 1024, from_left = 6;
|
|
|
|
/* load dummy modules */
|
|
for (i = 0; i < 8; i++)
|
|
if ((dummy_cd[i] = iconv_open (dummy_codesets[i], "UTF8")) == (iconv_t) -1)
|
|
exit (1);
|
|
|
|
/* load a module... */
|
|
if ((cd_a = iconv_open ("EUC-JP", "UTF8")) == (iconv_t) -1)
|
|
exit (1);
|
|
/* and close it once. we'll reload this later */
|
|
iconv_close (cd_a);
|
|
|
|
/* unload dummy modules */
|
|
for (i = 0; i < 8; i++)
|
|
iconv_close (dummy_cd[i]);
|
|
|
|
/* load the module again */
|
|
if ((cd_a = iconv_open ("EUC-JP", "UTF8")) == (iconv_t) -1)
|
|
exit (1);
|
|
|
|
puts ("This used to crash");
|
|
printf ("%zd\n", iconv (cd_a, &from, &from_left, &to, &to_left));
|
|
iconv_close (cd_a);
|
|
|
|
puts ("works now");
|
|
|
|
return 0;
|
|
}
|