libidn-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU libidn branch, master, updated. libidn-1-23-29-g74ea868


From: Simon Josefsson
Subject: [SCM] GNU libidn branch, master, updated. libidn-1-23-29-g74ea868
Date: Sun, 08 Jan 2012 23:42:42 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libidn".

http://git.savannah.gnu.org/cgit/libidn.git/commit/?id=74ea8682cbb89e45867425082959966cdec56b23

The branch, master has been updated
       via  74ea8682cbb89e45867425082959966cdec56b23 (commit)
       via  8cc49246246288e5f0dbb1412eeb974765af5c15 (commit)
       via  b9123f45a0c966e125bd8e272765f621c860b647 (commit)
       via  130d4a479f31dc5250072722fef2ae7d85c27657 (commit)
       via  5b0fde9eb52e841cd2144cfd45bbddca40867fe8 (commit)
       via  ef04dfad2ad45926d13a6a057c8de03e71d4f3cf (commit)
       via  d114facbbe0d623156fe796558a6ffda8fdbb6cd (commit)
       via  a4116421f343522d67e13d685c3970a3262c6078 (commit)
       via  9a180e2cca3a1d43dd5f2abc6afcc080378a6cd9 (commit)
       via  f5809a1b17f5071661fc6609d7eff306c02daf2e (commit)
       via  9ea891aec1c1e4eb40ba5b3f52a1696b2dcda0bb (commit)
       via  3235e05a5769624e016d288532837f415cc53194 (commit)
       via  1bd2d68bd89f85dbfe6a614e0cd7fb1f049d8698 (commit)
       via  b1d44908f49cc6cd85ca2332d4af704f55413f5f (commit)
       via  b45deaf855dfec2bb1d13f5bf306829e62f35ade (commit)
      from  9183f8ac255addb4360bc25c3bd4583dbe10d3d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 74ea8682cbb89e45867425082959966cdec56b23
Author: Simon Josefsson <address@hidden>
Date:   Mon Jan 9 00:42:34 2012 +0100

    Sync intro texts.

commit 8cc49246246288e5f0dbb1412eeb974765af5c15
Author: Simon Josefsson <address@hidden>
Date:   Mon Jan 9 00:27:46 2012 +0100

    Also dist COPYING* files.

commit b9123f45a0c966e125bd8e272765f621c860b647
Author: Simon Josefsson <address@hidden>
Date:   Mon Jan 9 00:21:04 2012 +0100

    Update gnulib files.

commit 130d4a479f31dc5250072722fef2ae7d85c27657
Author: Simon Josefsson <address@hidden>
Date:   Mon Jan 9 00:16:57 2012 +0100

    tst_pr29: Print more debug info.

commit 5b0fde9eb52e841cd2144cfd45bbddca40867fe8
Author: Simon Josefsson <address@hidden>
Date:   Mon Jan 9 00:10:48 2012 +0100

    libidn: Add 'const' keyword to 'stringprep_ucs4_nfkc_normalize' function.

commit ef04dfad2ad45926d13a6a057c8de03e71d4f3cf
Author: Simon Josefsson <address@hidden>
Date:   Sun Jan 8 23:51:39 2012 +0100

    Fix typo.

commit d114facbbe0d623156fe796558a6ffda8fdbb6cd
Author: Simon Josefsson <address@hidden>
Date:   Sun Jan 8 23:51:26 2012 +0100

    libidn: Fix potential infloop in pr29 code.
    
    Reported by Jon Nelson <address@hidden> in
    <http://lists.gnu.org/archive/html/help-libidn/2012-01/msg00008.html>.

commit a4116421f343522d67e13d685c3970a3262c6078
Author: Simon Josefsson <address@hidden>
Date:   Sun Jan 8 23:10:57 2012 +0100

    Fix.

commit 9a180e2cca3a1d43dd5f2abc6afcc080378a6cd9
Author: Simon Josefsson <address@hidden>
Date:   Sun Jan 8 23:10:12 2012 +0100

    Cleanup copyright info.

commit f5809a1b17f5071661fc6609d7eff306c02daf2e
Author: Simon Josefsson <address@hidden>
Date:   Sun Jan 8 23:08:59 2012 +0100

    Update gnulib files.

commit 9ea891aec1c1e4eb40ba5b3f52a1696b2dcda0bb
Author: Simon Josefsson <address@hidden>
Date:   Sun Jan 8 13:43:38 2012 +0100

    Relicense libraries from LGPLv2+ to dual-GPLv2+|LGPLv3+.

commit 3235e05a5769624e016d288532837f415cc53194
Author: Simon Josefsson <address@hidden>
Date:   Thu Jan 5 10:24:23 2012 +0100

    Put strlen calls in its own line, to simplify valgrind output analysis.

commit 1bd2d68bd89f85dbfe6a614e0cd7fb1f049d8698
Author: Simon Josefsson <address@hidden>
Date:   Thu Jan 5 10:21:09 2012 +0100

    Update gnulib files.

commit b1d44908f49cc6cd85ca2332d4af704f55413f5f
Author: Simon Josefsson <address@hidden>
Date:   Thu Jan 5 10:19:31 2012 +0100

    Rename README-alpha to HACKING and include it in tarballs.

commit b45deaf855dfec2bb1d13f5bf306829e62f35ade
Author: Simon Josefsson <address@hidden>
Date:   Thu Jan 5 10:13:34 2012 +0100

    Print whether libiconv was found.

-----------------------------------------------------------------------

Summary of changes:
 COPYING                                         |  689 +-----------
 COPYING.LIB => COPYING.LESSERv2                 |    0
 COPYING.LESSERv3                                |  165 +++
 COPYINGv2                                       |  339 ++++++
 COPYING => COPYINGv3                            |    0
 GNUmakefile                                     |    4 +-
 README-alpha => HACKING                         |   10 +-
 Makefile.am                                     |    3 +
 NEWS                                            |    8 +
 README                                          |   10 +-
 THANKS                                          |    1 +
 build-aux/gnupload                              |   12 +-
 build-aux/useless-if-before-free                |    8 +-
 configure.ac                                    |    1 +
 csharp/AssemblyInfo.cs                          |  148 ++-
 csharp/IDNA.cs                                  |   41 +-
 csharp/IDNAException.cs                         |   41 +-
 csharp/Makefile.am                              |   18 +-
 csharp/NFKC.cs                                  |   41 +-
 csharp/Punycode.cs                              |   41 +-
 csharp/PunycodeException.cs                     |   41 +-
 csharp/Stringprep.cs                            |   41 +-
 csharp/StringprepException.cs                   |   41 +-
 csharp/generate/AssemblyInfo.cs                 |  120 ++-
 csharp/generate/GenerateNFKC.cs                 | 1380 ++++++++++++-----------
 csharp/generate/GenerateRFC3454.cs              |  598 +++++-----
 csharp/generate/HashSet.cs                      |  192 ++--
 csharp/generate/Program.cs                      |   88 +-
 csharp/generate/Tokenizer.cs                    |  456 ++++----
 doc/Makefile.am                                 |    8 +-
 doc/gpl-3.0.texi                                |  717 ------------
 doc/lgpl-2.1.texi                               |  549 ---------
 doc/libidn.texi                                 |   37 +-
 doc/reference/libidn-docs.sgml                  |   11 +-
 gl/Makefile.am                                  |    2 +-
 gl/error.c                                      |   13 +-
 gl/error.h                                      |    6 +-
 gl/getopt.c                                     |   64 +-
 gl/getopt.in.h                                  |   52 +-
 gl/getopt1.c                                    |    4 +-
 gl/getopt_int.h                                 |   14 +-
 gl/m4/alloca.m4                                 |   16 +-
 gl/m4/extensions.m4                             |    4 +-
 gl/m4/gnulib-cache.m4                           |    4 +-
 gl/m4/gnulib-common.m4                          |    6 +-
 gl/m4/gnulib-comp.m4                            |    4 -
 gl/m4/include_next.m4                           |    2 +-
 gl/m4/inttypes.m4                               |    3 +-
 gl/m4/longlong.m4                               |    6 +-
 gl/m4/lstat.m4                                  |    4 +-
 gl/m4/time_h.m4                                 |    2 +-
 gl/msvc-inval.c                                 |    2 +-
 gl/msvc-inval.h                                 |    2 +-
 gl/msvc-nothrow.c                               |    2 +-
 gl/verify.h                                     |   14 +-
 gl/version-etc.h                                |    4 +-
 gltests/Makefile.am                             |    4 +-
 gltests/dup2.c                                  |    2 +-
 gltests/fcntl.in.h                              |    4 +-
 gltests/getcwd-lgpl.c                           |    2 +-
 gltests/init.sh                                 |    8 +-
 gltests/inttypes.in.h                           |   26 +-
 gltests/lstat.c                                 |    6 +-
 gltests/putenv.c                                |    4 +-
 gltests/setenv.c                                |   10 +-
 gltests/stdio.in.h                              |    6 +-
 gltests/test-dup2.c                             |    6 +-
 gltests/test-init.sh                            |   12 +-
 gltests/test-vc-list-files-cvs.sh               |    1 -
 gltests/unsetenv.c                              |    2 +-
 java/Makefile.am                                |   17 +-
 java/gnu/Makefile.am                            |   18 +
 java/gnu/inet/Makefile.am                       |   18 +
 java/gnu/inet/encoding/IDNA.java                |   50 +-
 java/gnu/inet/encoding/IDNAException.java       |   50 +-
 java/gnu/inet/encoding/Makefile.am              |   25 +-
 java/gnu/inet/encoding/NFKC.java                |   50 +-
 java/gnu/inet/encoding/Punycode.java            |   50 +-
 java/gnu/inet/encoding/PunycodeException.java   |   50 +-
 java/gnu/inet/encoding/Stringprep.java          |   50 +-
 java/gnu/inet/encoding/StringprepException.java |   50 +-
 java/misc/GenerateNFKC.java                     |   50 +-
 java/misc/GenerateRFC3454.java                  |   50 +-
 java/misc/Makefile.am                           |   28 +-
 java/misc/TestIDNA.java                         |   50 +-
 java/misc/TestNFKC.java                         |   50 +-
 lib/Makefile.am                                 |   17 +-
 lib/gl/m4/alloca.m4                             |   16 +-
 lib/gl/m4/extensions.m4                         |    4 +-
 lib/gl/m4/gnulib-common.m4                      |    6 +-
 lib/gl/m4/include_next.m4                       |    2 +-
 lib/gl/m4/inttypes.m4                           |    3 +-
 lib/gl/m4/ld-version-script.m4                  |   15 +-
 lib/gl/m4/locale-fr.m4                          |   10 +-
 lib/gl/m4/locale-ja.m4                          |    9 +-
 lib/gl/m4/locale-tr.m4                          |    6 +-
 lib/gl/m4/locale-zh.m4                          |    6 +-
 lib/gl/m4/longlong.m4                           |    6 +-
 lib/gl/m4/threadlib.m4                          |   32 +-
 lib/gl/strverscmp.c                             |    2 +-
 lib/gltests/Makefile.am                         |    4 +-
 lib/gltests/glthread/lock.c                     |    2 +-
 lib/gltests/glthread/lock.h                     |   14 +-
 lib/gltests/glthread/thread.c                   |    2 +-
 lib/gltests/glthread/thread.h                   |    4 +-
 lib/gltests/glthread/yield.h                    |    4 +-
 lib/gltests/init.sh                             |    8 +-
 lib/gltests/inttypes.in.h                       |   26 +-
 lib/gltests/localename.c                        |   24 +-
 lib/gltests/putenv.c                            |    4 +-
 lib/gltests/setenv.c                            |   10 +-
 lib/gltests/setlocale.c                         |    2 +-
 lib/gltests/test-init.sh                        |   12 +-
 lib/gltests/test-lock.c                         |   12 +-
 lib/gltests/test-setlocale2.sh                  |    6 +-
 lib/gltests/test-thread_create.c                |    2 +-
 lib/gltests/unsetenv.c                          |    2 +-
 lib/gltests/verify.h                            |   14 +-
 lib/idn-free.c                                  |   49 +-
 lib/idn-free.h                                  |   49 +-
 lib/idna.c                                      |   54 +-
 lib/idna.h                                      |   48 +-
 lib/libidn.map                                  |   17 +-
 lib/nfkc.c                                      |   52 +-
 lib/pr29.c                                      |   48 +-
 lib/pr29.h                                      |   46 +-
 lib/profiles.c                                  |   46 +-
 lib/punycode.c                                  |   46 +-
 lib/punycode.h                                  |   49 +-
 lib/strerror-idna.c                             |   46 +-
 lib/strerror-pr29.c                             |   46 +-
 lib/strerror-punycode.c                         |   46 +-
 lib/strerror-stringprep.c                       |   46 +-
 lib/strerror-tld.c                              |   46 +-
 lib/stringprep.c                                |   46 +-
 lib/stringprep.h                                |   48 +-
 lib/tld.c                                       |   54 +-
 lib/tld.h                                       |   52 +-
 lib/toutf8.c                                    |   46 +-
 lib/version.c                                   |   44 +-
 libc/example.c                                  |   19 +-
 maint.mk                                        |   26 +-
 pom.xml.in                                      |    2 +-
 src/idn.c                                       |    8 +-
 tests/tst_pr29.c                                |   35 +-
 tests/utils.c                                   |    2 +-
 win32/include/ac-stdint.h                       |   33 +-
 win32/include/config.h                          |   29 +
 win32/include/idn-int.h                         |   33 +-
 win32/include/stdbool.h                         |   33 +-
 150 files changed, 3754 insertions(+), 4614 deletions(-)
 rename COPYING.LIB => COPYING.LESSERv2 (100%)
 create mode 100644 COPYING.LESSERv3
 create mode 100644 COPYINGv2
 copy COPYING => COPYINGv3 (100%)
 rename README-alpha => HACKING (84%)
 delete mode 100644 doc/gpl-3.0.texi
 delete mode 100644 doc/lgpl-2.1.texi

diff --git a/COPYING b/COPYING
index 94a9ed0..f651116 100644
--- a/COPYING
+++ b/COPYING
@@ -1,674 +1,27 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
+Libidn COPYING -- Explanation of licensing conditions.
+Copyright (C) 2002-2012 Simon Josefsson
+See the end for copying conditions.
 
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+The source code for the C library (libidn.a or libidn.so), the C#
+library (Libidn.dll) and the Java library (libidn-*.jar) are licensed
+under the terms of either the GNU General Public License version 2.0
+or later (see the file COPYINGv2) or the GNU Lesser General Public
+License version 3.0 or later (see the file COPYING.LESSERv3), or both
+in parallel as here.
 
-                            Preamble
+The manual is licensed under the GNU Free Documentation License,
+Version 1.3 or any later.
 
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
+The command line tool, self tests, examples, and other auxilliary
+files, are licensed under the GNU General Public License version 3.0
+or later.
 
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
+Other files are licensed as indicated in each file.
 
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
+There may be exceptions to these general rules, see each file for
+precise information.
 
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program 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 General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+----------------------------------------------------------------------
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/COPYING.LIB b/COPYING.LESSERv2
similarity index 100%
rename from COPYING.LIB
rename to COPYING.LESSERv2
diff --git a/COPYING.LESSERv3 b/COPYING.LESSERv3
new file mode 100644
index 0000000..65c5ca8
--- /dev/null
+++ b/COPYING.LESSERv3
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/COPYINGv2 b/COPYINGv2
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/COPYINGv2
@@ -0,0 +1,339 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program 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 General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/COPYING b/COPYINGv3
similarity index 100%
copy from COPYING
copy to COPYINGv3
diff --git a/GNUmakefile b/GNUmakefile
index f343cef..d0fd3e8 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,4 +1,4 @@
-# Having a separate GNUmakefile lets me `include' the dynamically
+# Having a separate GNUmakefile lets me 'include' the dynamically
 # generated rules created via cfg.mk (package-local configuration)
 # as well as maint.mk (generic maintainer rules).
 # This makefile is used only if you run GNU Make.
@@ -114,7 +114,7 @@ endif
 
 abort-due-to-no-makefile:
        @echo There seems to be no Makefile in this directory.   1>&2
-       @echo "You must run ./configure before running \`make'." 1>&2
+       @echo "You must run ./configure before running 'make'." 1>&2
        @exit 1
 
 endif
diff --git a/README-alpha b/HACKING
similarity index 84%
rename from README-alpha
rename to HACKING
index 843268c..15a0e8f 100644
--- a/README-alpha
+++ b/HACKING
@@ -1,4 +1,4 @@
-Libidn README-alpha -- Information for developers.              -*- outline -*-
+Libidn HACKING -- Information for contributors.                 -*- outline -*-
 Copyright (C) 2009-2012 Simon Josefsson
 See the end for copying conditions.
 
@@ -34,10 +34,10 @@ system, and the instructions for installing them differ.  
Here are
 some hints:
 
 gNewSense/Debian/Ubuntu:
-sudo apt-get install make git-core autoconf automake libtool gettext cvs
-sudo apt-get install texinfo texlive texlive-generic-recommended 
texlive-extra-utils
-sudo apt-get install help2man gtk-doc-tools valgrind gengetopt
-sudo apt-get install gcj gjdoc transfig mono-mcs binfmt-support gperf
+apt-get install make git-core autoconf automake libtool gettext cvs
+apt-get install texinfo texlive texlive-generic-recommended texlive-extra-utils
+apt-get install help2man gtk-doc-tools valgrind gengetopt
+apt-get install gcj-jdk gjdoc transfig mono-mcs binfmt-support gperf
 
 To download the version controlled sources:
 
diff --git a/Makefile.am b/Makefile.am
index d3a2474..522a76f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,6 +20,7 @@ SUBDIRS = gl lib/gl lib po src doc gltests lib/gltests tests 
examples \
        java csharp
 
 EXTRA_DIST = cfg.mk maint.mk .clcopying
+EXTRA_DIST += COPYING.LESSERv2 COPYING.LESSERv3 COPYINGv2 COPYINGv3
 
 ACLOCAL_AMFLAGS = -I m4 -I gl/m4 -I lib/gl/m4
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
@@ -40,5 +41,7 @@ EXTRA_DIST += win32/libidn.sln win32/libidn.vcproj            
        \
        win32/include/stdbool.h win32/include/ac-stdint.h               \
        win32/include/config.h win32/libidn4win.mk
 
+EXTRA_DIST += HACKING
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libidn.pc
diff --git a/NEWS b/NEWS
index 55321a3..1b4db5d 100644
--- a/NEWS
+++ b/NEWS
@@ -4,9 +4,17 @@ See the end for copying conditions.
 
 * Version 1.24 (unreleased) [?]
 
+** Libraries are re-licensed from LGPLv2+ to dual-GPLv2+|LGPLv3+.
+
 ** build: Fix parallel Windows builds.
 Reported by René Berber <address@hidden>.
 
+** libidn: Fix potential infloop in pr29 code.
+Reported by Jon Nelson <address@hidden> in
+<http://lists.gnu.org/archive/html/help-libidn/2012-01/msg00008.html>.
+
+** libidn: Add 'const' keyword to 'stringprep_ucs4_nfkc_normalize' function.
+
 ** Sync glib NFKC code and improve copyright/license statements.
 
 ** Update gnulib files and translations.
diff --git a/README b/README
index 135c359..cf1fc8c 100644
--- a/README
+++ b/README
@@ -4,19 +4,11 @@ See the end for copying conditions.
 
 Libidn is a package for internationalized string handling based on the
 Stringprep, Punycode, IDNA and TLD specifications.  Libidn is a GNU
-project.
+project.  See the file COPYING for licensing information.
 
 Read INSTALL for installation instructions, and doc/libidn.* for the
 manual in various formats (including Info, HTML, PostScript, and PDF).
 
-The C library (libidn.a), C# library (Libidn.dll) and Java library
-(libidn-*.jar) are licensed under the GNU Lesser General Public
-License version 2.1 or later.  See the file COPYING.LIB.
-
-The command line tool, self tests, examples, and other auxilliary
-files, are licensed under the GNU General Public License version 3.0
-or later.  See the file COPYING.
-
 Libidn will not be stable without your help.  Report bugs, proof read
 the manual, or make a monetary donation.
 
diff --git a/THANKS b/THANKS
index 858c33e..3fdd879 100644
--- a/THANKS
+++ b/THANKS
@@ -101,6 +101,7 @@ Volker Grabsch <address@hidden>
 Olga Limburg <address@hidden>
 Bittner Ede <address@hidden>
 René Berber <address@hidden>
+Jon Nelson <address@hidden>
 
 ----------------------------------------------------------------------
 Copying and distribution of this file, with or without modification,
diff --git a/build-aux/gnupload b/build-aux/gnupload
index 68215ca..24e91f4 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -57,7 +57,7 @@ Options:
   --version                output version information and exit
 
 If --symlink-regex is given without EXPR, then the link target name
-is created by replacing the version information with \`-latest', e.g.:
+is created by replacing the version information with '-latest', e.g.:
 
   foo-1.3.4.tar.gz -> foo-latest.tar.gz
 
@@ -170,7 +170,7 @@ while test -n "$1"; do
       break
       ;;
     -*)
-      echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
+      echo "$0: Unknown option '$1', try '$0 --help'" 1>&2
       exit 1
       ;;
     esac
@@ -219,7 +219,7 @@ else
   for file
   do
     if test ! -f $file; then
-      echo "$0: Cannot find \`$file'" 1>&2
+      echo "$0: Cannot find '$file'" 1>&2
       exit 1
     elif test -n "$symlink_expr"; then
       linkname=`echo $file | sed "$symlink_expr"`
@@ -238,10 +238,10 @@ fi
 unset passphrase
 
 # Reset PATH to be sure that echo is a built-in.  We will later use
-# `echo $passphrase' to output the passphrase, so it is important that
-# it is a built-in (third-party programs tend to appear in `ps'
+# 'echo $passphrase' to output the passphrase, so it is important that
+# it is a built-in (third-party programs tend to appear in 'ps'
 # listings with their arguments...).
-# Remember this script runs with `set -e', so if echo is not built-in
+# Remember this script runs with 'set -e', so if echo is not built-in
 # it will exit now.
 PATH=/empty echo -n "Enter GPG passphrase: "
 stty -echo
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index b1c5902..2b64630 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -4,7 +4,7 @@ eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
 # Detect instances of "if (p) free (p);".
 # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
 
-my $VERSION = '2011-04-20 13:43'; # UTC
+my $VERSION = '2012-01-06 07:23'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -47,7 +47,7 @@ sub usage ($)
   my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
   if ($exit_code != 0)
     {
-      print $STREAM "Try `$ME --help' for more information.\n";
+      print $STREAM "Try '$ME --help' for more information.\n";
     }
   else
     {
@@ -62,7 +62,7 @@ detect free-like functions named FOO and BAR.
 OPTIONS:
 
    --list       print only the name of each matching FILE (\\0-terminated)
-   --name=N     add name N to the list of \`free\'-like functions to detect;
+   --name=N     add name N to the list of \'free\'-like functions to detect;
                   may be repeated
 
    --help       display this help and exit
@@ -125,7 +125,7 @@ sub is_NULL ($)
   foreach my $file (@ARGV)
     {
       open FH, '<', $file
-        or (warn "$ME: can't open `$file' for reading: $!\n"),
+        or (warn "$ME: can't open '$file' for reading: $!\n"),
           $err = EXIT_ERROR, next;
       while (defined (my $line = <FH>))
         {
diff --git a/configure.ac b/configure.ac
index 7e5a67f..dc340da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,6 +196,7 @@ AC_MSG_NOTICE([summary of build options:
   Compiler:         ${CC}
   Warning flags:    ${WARN_CFLAGS}
   Library types:    Shared=${enable_shared}, Static=${enable_static}
+  Libiconv:         $am_cv_func_iconv
   Valgrind:         ${VALGRIND}
   Version script:   $have_ld_version_script
   TLD code:         $enable_tld
diff --git a/csharp/AssemblyInfo.cs b/csharp/AssemblyInfo.cs
index 177a4f0..5e14dd9 100644
--- a/csharp/AssemblyInfo.cs
+++ b/csharp/AssemblyInfo.cs
@@ -1,58 +1,90 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]                
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build 
Numbers 
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the 
-// Microsoft .NET Framework documentation for more information on assembly 
signing.
-//
-// Use the attributes below to control which key is used for signing. 
-//
-// Notes: 
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which 
contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the 
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) 
utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile 
is
-//       located in the project directory, you would specify the 
AssemblyKeyFile 
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
+/// <summary>
+/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
+///
+/// Author: Alexander Gnauck AG-Software, mailto:address@hidden
+///
+/// This file is part of GNU Libidn.
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
+/// </summary>
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Versionu
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build 
Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly 
signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which 
contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) 
utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile 
is
+//       located in the project directory, you would specify the 
AssemblyKeyFile
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/csharp/IDNA.cs b/csharp/IDNA.cs
index 6c785a2..47e999a 100644
--- a/csharp/IDNA.cs
+++ b/csharp/IDNA.cs
@@ -1,24 +1,33 @@
 /// <summary>
 /// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
+///
 /// Author: Alexander Gnauck AG-Software, mailto:address@hidden
-/// *
+///
 /// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This library is distributed in the hope that it will be useful, but
-/// WITHOUT ANY WARRANTY; without even the implied warranty of
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
 /// </summary>
 
 using System;
diff --git a/csharp/IDNAException.cs b/csharp/IDNAException.cs
index 4a8033d..2a1a6a5 100644
--- a/csharp/IDNAException.cs
+++ b/csharp/IDNAException.cs
@@ -1,24 +1,33 @@
 /// <summary>
 /// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
+///
 /// Author: Alexander Gnauck AG-Software, mailto:address@hidden
-/// *
+///
 /// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This library is distributed in the hope that it will be useful, but
-/// WITHOUT ANY WARRANTY; without even the implied warranty of
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
 /// </summary>
 
 using System;
diff --git a/csharp/Makefile.am b/csharp/Makefile.am
index 2bf9aff..e1d2f74 100644
--- a/csharp/Makefile.am
+++ b/csharp/Makefile.am
@@ -3,20 +3,18 @@
 #
 # This file is part of GNU Libidn.
 #
-# GNU Libidn 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.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-# GNU Libidn is distributed in the hope that it will be useful,
+# This program 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.
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with GNU Libidn; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 CSHARPEXEC = $(SHELL) $(top_builddir)/csharpexec.sh
 CSHARPCOMP = $(SHELL) $(top_builddir)/csharpcomp.sh
diff --git a/csharp/NFKC.cs b/csharp/NFKC.cs
index 5d4fb54..5ad4fb0 100644
--- a/csharp/NFKC.cs
+++ b/csharp/NFKC.cs
@@ -1,24 +1,33 @@
 /// <summary>
 /// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
+///
 /// Author: Alexander Gnauck AG-Software, mailto:address@hidden
-/// *
+///
 /// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This library is distributed in the hope that it will be useful, but
-/// WITHOUT ANY WARRANTY; without even the implied warranty of
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
 /// </summary>
 
 using System;
diff --git a/csharp/Punycode.cs b/csharp/Punycode.cs
index e23c2b8..3595088 100644
--- a/csharp/Punycode.cs
+++ b/csharp/Punycode.cs
@@ -1,24 +1,33 @@
 /// <summary>
 /// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
+///
 /// Author: Alexander Gnauck AG-Software, mailto:address@hidden
-/// *
+///
 /// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This library is distributed in the hope that it will be useful, but
-/// WITHOUT ANY WARRANTY; without even the implied warranty of
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
 /// </summary>
 
 using System;
diff --git a/csharp/PunycodeException.cs b/csharp/PunycodeException.cs
index 779fb48..371fc13 100644
--- a/csharp/PunycodeException.cs
+++ b/csharp/PunycodeException.cs
@@ -1,24 +1,33 @@
 /// <summary>
 /// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
+///
 /// Author: Alexander Gnauck AG-Software, mailto:address@hidden
-/// *
+///
 /// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This library is distributed in the hope that it will be useful, but
-/// WITHOUT ANY WARRANTY; without even the implied warranty of
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
 /// </summary>
 
 using System;
diff --git a/csharp/Stringprep.cs b/csharp/Stringprep.cs
index 8156d90..b87647b 100644
--- a/csharp/Stringprep.cs
+++ b/csharp/Stringprep.cs
@@ -1,24 +1,33 @@
 /// <summary>
 /// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
+///
 /// Author: Alexander Gnauck AG-Software, mailto:address@hidden
-/// *
+///
 /// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This library is distributed in the hope that it will be useful, but
-/// WITHOUT ANY WARRANTY; without even the implied warranty of
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
 /// </summary>
 
 using System;
diff --git a/csharp/StringprepException.cs b/csharp/StringprepException.cs
index edb39bc..a1b0e31 100644
--- a/csharp/StringprepException.cs
+++ b/csharp/StringprepException.cs
@@ -1,24 +1,33 @@
 /// <summary>
 /// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
+///
 /// Author: Alexander Gnauck AG-Software, mailto:address@hidden
-/// *
+///
 /// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This library is distributed in the hope that it will be useful, but
-/// WITHOUT ANY WARRANTY; without even the implied warranty of
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
 /// </summary>
 
 using System;
diff --git a/csharp/generate/AssemblyInfo.cs b/csharp/generate/AssemblyInfo.cs
index 92642c8..956476d 100644
--- a/csharp/generate/AssemblyInfo.cs
+++ b/csharp/generate/AssemblyInfo.cs
@@ -1,55 +1,65 @@
-/// <summary>
-/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
-/// Author: Alexander Gnauck AG-Software
-/// *
-/// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
-/// </summary>
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed 
to COM
-[assembly: Guid("6D72484E-39BA-4312-9B64-74FD5CB81001")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+/// <summary>
+/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
+///
+/// Author: Alexander Gnauck AG-Software, mailto:address@hidden
+///
+/// This file is part of GNU Libidn.
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
+/// </summary>
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed 
to COM
+[assembly: Guid("6D72484E-39BA-4312-9B64-74FD5CB81001")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/csharp/generate/GenerateNFKC.cs b/csharp/generate/GenerateNFKC.cs
index ca68c80..e7d321f 100644
--- a/csharp/generate/GenerateNFKC.cs
+++ b/csharp/generate/GenerateNFKC.cs
@@ -1,685 +1,695 @@
-/// <summary>
-/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
-/// Author: Alexander Gnauck AG-Software
-/// *
-/// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
-/// </summary>
-using System;
-using System.IO;
-using System.Collections;
-using System.Text;
-
-namespace gnu.inet.encoding.misc
-{
-    public class GenerateNFKC
-    {
-        internal static string stripComment(string sIn)
-        {
-            int c = sIn.IndexOf('#');
-            if (c == -1)
-            {
-                return sIn;
-            }
-            else
-            {
-                return sIn.Substring(0, (c) - (0));
-            }
-        }
-
-        internal static string[] split(string sIn, char sep)
-        {
-            StringBuilder sb = new StringBuilder(sIn);
-            int c = 0;
-            for (int i = 0; i < sb.Length; i++)
-            {
-                if (sb[i] == sep)
-                {
-                    c++;
-                }
-            }
-
-            string[] sOut = new string[c + 1];
-            c = 0;
-            int l = 0;
-            for (int i = 0; i < sb.Length; i++)
-            {
-                if (sb[i] == sep)
-                {
-                    if (l >= i)
-                    {
-                        sOut[c] = "";
-                    }
-                    else
-                    {
-                        // TODO, check this
-                        sOut[c] = sb.ToString(l, i-l);
-                    }
-                    l = i + 1;
-                    c++;
-                }
-            }
-            if (l < sb.Length)
-            {
-                sOut[c] = sb.ToString(l, sb.Length - l);
-            }
-            return sOut;
-        }
-
-        internal static bool isCompatibilityMapping(string sIn)
-        {
-            return sIn.Length > 0 && sIn[0] == '<';
-        }
-
-        internal static string stripCompatibilityTag(string sIn)
-        {
-            return sIn.Substring(sIn.IndexOf('>') + 2);
-        }
-
-        internal static string toString(string sIn)
-        {
-            StringBuilder sOut = new StringBuilder();
-            string[] chars = split(sIn, ' ');
-            for (int i = 0; i < chars.Length; i++)
-            {
-                if (chars[i].Equals("005C"))
-                {
-                    sOut.Append("\\\\");
-                }
-                else if (chars[i].Equals("0022"))
-                {
-                    sOut.Append("\\\"");
-                }
-                else
-                {
-                    sOut.Append("\\u");
-                    sOut.Append(chars[i]);
-                }
-            }
-            return sOut.ToString();
-        }
-            
-        internal static string decompose(string sIn, SortedList mappings)
-        {
-            StringBuilder sOut = new StringBuilder();
-            string[] c = split(sIn, ' ');
-
-            for (int i = 0; i < c.Length; i++)
-            {
-                if (mappings.ContainsKey(c[i]))
-                {
-                    if (sOut.Length > 0)
-                    {
-                        sOut.Append(" ");
-                    }
-                    sOut.Append(decompose((string)mappings[c[i]], mappings));
-                }
-                else
-                {
-                    if (sOut.Length > 0)
-                    {
-                        sOut.Append(" ");
-                    }
-                    sOut.Append(c[i]);
-                }
-            }
-
-            return sOut.ToString();
-        }
-            
-        public static void Generate()
-        {
-            // Check if the unicode files exist
-            {
-                FileInfo f1 = new FileInfo("CompositionExclusions.txt");
-                FileInfo f2 = new FileInfo("UnicodeData.txt");
-                bool tmpBool;
-                if (File.Exists(f1.FullName))
-                    tmpBool = true;
-                else
-                    tmpBool = Directory.Exists(f1.FullName);
-                bool tmpBool2;
-                if (File.Exists(f2.FullName))
-                    tmpBool2 = true;
-                else
-                    tmpBool2 = Directory.Exists(f2.FullName);
-                if (!tmpBool || !tmpBool2)
-                {
-                    Console.WriteLine("Unable to find UnicodeData.txt or 
CompositionExclusions.txt.");
-                    Console.WriteLine("Please download the latest version of 
these file from:");
-                    
Console.WriteLine("http://www.unicode.org/Public/UNIDATA/";);
-                    System.Environment.Exit(1);
-                }
-            }
-                    
-            ArrayList exclusions = new ArrayList();
-            {            
-                StreamReader r = new StreamReader("CompositionExclusions.txt", 
System.Text.Encoding.Default);
-                string line;
-                while (null != (line = r.ReadLine()))
-                {
-                    line = stripComment(line);
-                    line = line.Trim();
-                    if (line.Length == 0)
-                    {
-                        // Empty line
-                    }
-                    else if (line.Length == 4)
-                    {
-                        exclusions.Add(line);
-                    }
-                    else
-                    {
-                        // Skip code points > 0xffff
-                    }
-                }
-                r.Close();
-            }
-
-            // Read UnicodeData
-            
-            SortedList canonical = new SortedList();        
-            SortedList compatibility = new SortedList();        
-            SortedList combiningClasses = new SortedList();
-            {        
-                StreamReader r = new StreamReader("UnicodeData.txt", 
Encoding.Default);
-                string line;
-                while (null != (line = r.ReadLine()))
-                {
-                    line = stripComment(line);
-                    line = line.Trim();
-
-                    if (line.Length == 0)
-                    {
-                        // Empty line
-                    }
-                    else
-                    {
-                        string[] f = split(line, ';');
-
-                        if (f[0].Length == 4)
-                        {
-                            if (!f[5].Equals(""))
-                            {
-                                if (isCompatibilityMapping(f[5]))
-                                {
-                                    compatibility[f[0]] = 
stripCompatibilityTag(f[5]);
-                                }
-                                else
-                                {
-                                    compatibility[f[0]] = f[5];
-                                    if (!exclusions.Contains(f[0]))
-                                    {
-                                        canonical[f[0]] = f[5];
-                                    }
-                                }
-                            }
-                            if (!f[3].Equals("0"))
-                            {
-                                //UPGRADE_TODO: Method 
'java.lang.Integer.parseInt' was converted to 'System.Convert.ToInt32' which 
has a different behavior. 
"ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
-                                
combiningClasses[(int)System.Convert.ToInt32(f[0], 16)] = f[3];
-                            }
-                        }
-                        else
-                        {
-                            // Skip code points > 0xffff
-                        }
-                    }
-                }
-                r.Close();
-            }
-
-            // Recursively apply compatibility mappings
-            while (true)
-            {
-                bool replaced = false;
-                            
-                IEnumerator i = new 
HashSet(compatibility.Keys).GetEnumerator();            
-                while (i.MoveNext())
-                {                
-                    string k = (string)i.Current;
-                    string v = (string)compatibility[k];
-
-                    string d = decompose(v, compatibility);
-                    if (!d.Equals(v))
-                    {
-                        replaced = true;
-                        compatibility[k] = d;
-                    }
-                }
-
-                if (!replaced)
-                {
-                    break;
-                }
-            }
-
-            // Eliminate duplicate mappings        
-            SortedList compatibilityKeys = new SortedList();
-            ArrayList compatibilityMappings = new ArrayList();
-            {            
-                IEnumerator i = new 
HashSet(compatibility.Keys).GetEnumerator();            
-                while (i.MoveNext())
-                {                
-                    string k = (string)i.Current;
-                    string v = (string)compatibility[k];
-
-                    int index = compatibilityMappings.IndexOf(v);
-                    if (index == -1)
-                    {
-                        index = compatibilityMappings.Count;
-                        compatibilityMappings.Add(v);
-                    }
-                    compatibilityKeys[k] = (int)index;
-                }
-            }
-
-            // Create composition tables        
-            SortedList firstMap = new SortedList();        
-            SortedList secondMap = new SortedList();
-            {            
-                IEnumerator i = new HashSet(canonical.Keys).GetEnumerator();   
         
-                while (i.MoveNext())
-                {                
-                    string k = (string)i.Current;
-                    string v = (string)canonical[k];
-
-                    string[] s = split(v, ' ');
-
-                    if (s.Length == 2)
-                    {
-                        // If both characters have the same combining class, 
they
-                        // won't be combined (in the sequence AB, B is blocked 
from
-                        // A if both have the same combining class)            
        
-                        string cc1 = 
(string)combiningClasses[(int)System.Convert.ToInt32(s[0], 16)];                
    
-                        string cc2 = 
(string)combiningClasses[(int)System.Convert.ToInt32(s[1], 16)];
-                        if (cc1 != null || (cc1 != null && cc1.Equals(cc2)))
-                        {
-                            // Ignore this composition                        
-                            // TODO check this
-                            //i.remove();                        
-                            canonical.Remove(k);
-                            continue;
-                        }
-
-                        if (firstMap.ContainsKey(s[0]))
-                        {
-                            int c = (int)firstMap[s[0]];
-                            firstMap[s[0]] = (int)(c + 1);
-                        }
-                        else
-                        {
-                            firstMap[s[0]] = 1;
-                        }
-
-                        if (secondMap.ContainsKey(s[1]))
-                        {
-                            int c = (int)secondMap[s[1]];
-                            secondMap[s[1]] = (int)(c + 1);
-                        }
-                        else
-                        {
-                            secondMap[s[1]] = 1;
-                        }
-                    }
-                    else if (s.Length > 2)
-                    {
-                        Console.WriteLine("? wrong canonical mapping for " + 
k);
-                        System.Environment.Exit(1);
-                    }
-                }
-            }
-                    
-            SortedList singleFirstComposition = new SortedList();        
-            SortedList singleSecondComposition = new SortedList();        
-            SortedList complexComposition = new SortedList();
-
-            int composeLookupMax = 0;
-            {            
-                IEnumerator i = new HashSet(canonical.Keys).GetEnumerator();   
      
-                while (i.MoveNext())
-                {                
-                    string k = (string) i.Current;
-                    string v = (string) canonical[k];
-
-                    string[] s = split(v, ' ');
-
-                    if (s.Length == 2)
-                    {
-                        // TODO, check this
-                        int first = 0;
-                        if(firstMap.Contains(s[0]))
-                            first = (int) firstMap[s[0]];
-                        
-                        int second = 0;
-                        if (secondMap.Contains(s[1]))
-                            second = (int) secondMap[s[1]];
-                        // TODO, check this
-
-                        if (first == 1)
-                        {
-                            singleFirstComposition[s[0]] = new string[] { 
s[1], k };                        
-                            composeLookupMax = 
System.Math.Max(composeLookupMax, System.Convert.ToInt32(s[0], 16));
-                        }
-                        else if (second == 1)
-                        {
-                            singleSecondComposition[s[1]] = new string[] { 
s[0], k };                        
-                            composeLookupMax = 
System.Math.Max(composeLookupMax, System.Convert.ToInt32(s[1], 16));
-                        }
-                        else
-                        {
-                            if (complexComposition.ContainsKey(s[0]))
-                            {                            
-                                SortedList m = 
(SortedList)complexComposition[s[0]];
-                                if (m.ContainsKey(s[1]))
-                                {
-                                    Console.WriteLine("? ambiguous canonical 
mapping for " + s[0]);
-                                    System.Environment.Exit(1);
-                                }
-                                m[s[1]] = k;
-                            }
-                            else
-                            {                            
-                                SortedList m = new SortedList();
-                                m[s[1]] = k;
-                                complexComposition[s[0]] = m;
-                            }                        
-                            composeLookupMax = 
System.Math.Max(composeLookupMax, System.Convert.ToInt32(s[0], 16));            
            
-                            composeLookupMax = 
System.Math.Max(composeLookupMax, System.Convert.ToInt32(s[1], 16));
-                        }
-                    }
-                }
-            }
-
-            Console.WriteLine("Generating CombiningClass.cs file...");
-
-            // Dump combining classes
-            {
-                StreamWriter w = new StreamWriter("CombiningClass.cs", false, 
Encoding.Default);
-                w.WriteLine("// Do not edit !!!");
-                w.WriteLine("// this file is generated automatically");
-                w.WriteLine();            
-                w.WriteLine("public class CombiningClass");            
-                w.WriteLine("{");            
-                w.WriteLine("\tpublic static readonly int[,] c = new int[,] 
{");
-                System.Text.StringBuilder index = new 
System.Text.StringBuilder();
-
-                int count = 0;
-
-                for (int i = 0; i < 256; i++)
-                {
-                    bool empty = true;
-
-                    StringBuilder page = new StringBuilder();
-                    page.Append("    { /* Page " + i + " */");
-
-                    for (int j = 0; j < 256; j++)
-                    {
-                        int c = (int)((i << 8) + j);
-                        string cc = (string)combiningClasses[c];
-
-                        if (0 == (j & 31))
-                        {
-                            page.Append("\r\n      ");
-                        }
-                        if (cc == null)
-                        {
-                            page.Append("0, ");
-                        }
-                        else
-                        {
-                            page.Append(cc + ", ");
-                            empty = false;
-                        }
-                    }
-                    page.Append("\r\n    },");
-
-                    index.Append("    ");
-
-                    if (!empty)
-                    {                    
-                        w.WriteLine(page.ToString());
-                        index.Append(count++);
-                        index.Append(",\r\n");
-                    }
-                    else
-                    {
-                        index.Append("-1,\r\n");
-                    }
-                }            
-                w.WriteLine("  };\r\n");
-                            
-                w.WriteLine("\tpublic static readonly int[] i = new int[] {");
-                w.Write(index.ToString());            
-                w.WriteLine("  };");            
-                w.WriteLine("}");            
-                w.Close();
-            }
-
-            //Console.WriteLine(" Ok.");
-            Console.WriteLine("Generating DecompositionKeys.cs file...");
-
-            // Dump compatibility decomposition
-            {
-                StreamWriter w = new StreamWriter("DecompositionKeys.cs", 
false, Encoding.Default);
-                w.WriteLine("// Do not edit !!!");
-                w.WriteLine("// this file is generated automatically");        
 
-                w.WriteLine();            
-                w.WriteLine("public class DecompositionKeys");            
-                w.WriteLine("{");
-
-                w.WriteLine("\tpublic static readonly int[] k = new int[] {"); 
           
-                IEnumerator i = new 
HashSet(compatibilityKeys.Keys).GetEnumerator();            
-                while (i.MoveNext())
-                {            
-                    string k = (string)i.Current;
-                    int index = ((int)compatibilityKeys[k]);             
-                    w.WriteLine("    '\\u" + k + "', " + index + ",");
-                }            
-                w.WriteLine("  };");            
-                w.WriteLine("}");            
-                w.Close();
-            }
-
-            //Console.WriteLine(" Ok.");
-            Console.WriteLine("Generating DecompositionMappings.cs file...");
-
-            {
-                StreamWriter w = new StreamWriter("DecompositionMappings.cs", 
false, Encoding.Default);
-                w.WriteLine("// Do not edit !!!");
-                w.WriteLine("// this file is generated automatically");
-                w.WriteLine();            
-                w.WriteLine("public class DecompositionMappings");            
-                w.WriteLine("{");            
-                w.WriteLine("\tpublic static readonly string[] m = new 
string[] {");
-                IEnumerator i = compatibilityMappings.GetEnumerator();
-                while (i.MoveNext())
-                {                
-                    string m = (string)i.Current;             
-                    w.WriteLine("    \"" + toString(m) + "\",");
-                }            
-                w.WriteLine("  };");            
-                w.WriteLine("}");            
-                w.Close();
-            }
-
-            //Console.WriteLine(" Ok.");
-            Console.WriteLine("Generating Composition.cs file...");
-
-            // Dump canonical composition
-            {
-                StreamWriter w = new StreamWriter("Composition.cs", false, 
Encoding.Default);
-                w.WriteLine("// Do not edit !!!");
-                w.WriteLine("// this file is generated automatically");
-                w.WriteLine();            
-                w.WriteLine("public class Composition");            
-                w.WriteLine("{");
-
-                IEnumerator i;
-                int index = 0;
-                           
-                SortedList indices = new SortedList();
-                            
-                i = new HashSet(complexComposition.Keys).GetEnumerator();      
      
-                while (i.MoveNext())
-                {                
-                    string s0 = (string)i.Current;             
-                    indices[(int)System.Convert.ToInt32(s0, 16)] = (int)index;
-                    index++;
-                }
-
-                int multiSecondStart = index;
-                w.WriteLine("\t/* jagged Array */");
-                w.WriteLine("\tpublic static readonly char[][] multiFirst = 
new char[][] {");
-                //w.WriteLine("  public final static char[][] multiFirst = new 
char[][] {");
-                i = new HashSet(complexComposition.Keys).GetEnumerator();      
      
-                while (i.MoveNext())
-                {                
-                    string s0 = (string)i.Current;             
-                    SortedList m = (SortedList)complexComposition[s0];
-                                   
-                    SortedList line = new SortedList();
-                    int maxIndex = 1;
-                                    
-                    System.Collections.IEnumerator i2 = new 
HashSet(m.Keys).GetEnumerator();                
-                    while (i2.MoveNext())
-                    {                    
-                        string s1 = (string)i2.Current;
-                        string k = (string)m[s1];
-                                         
-                        int s1i = (int)System.Convert.ToInt32(s1, 16);
-
-                        if (!indices.ContainsKey(s1i))
-                        {
-                            indices[s1i] = (int)index;
-                            index++;
-                        }
-                        line[indices[s1i]] = k;
-                        maxIndex = System.Math.Max(maxIndex, 
((int)indices[s1i]));
-                    }
-
-                    w.Write("\tnew char[] { ");
-                    for (int j = multiSecondStart; j <= maxIndex; j++)
-                    {
-                        if (line.ContainsKey((int)j))
-                        {
-                            string s = (string)line[(int)j];
-                            w.Write("'" + toString(s) + "', ");
-                        }
-                        else
-                        {
-                            //w.Write("       0, ");
-                            w.Write("'" + toString("0000") + "', ");
-                        }
-                    }                
-                    w.WriteLine("},");
-                }            
-                w.WriteLine("  };");
-
-                int singleFirstStart = index;
-
-                w.WriteLine("\tpublic static readonly char[,] singleFirst = 
new char[,] {");
-                i = new HashSet(singleFirstComposition.Keys).GetEnumerator();  
          
-                while (i.MoveNext())
-                {            
-                    string k = (string)i.Current;
-                    string[] v = ((string[])singleFirstComposition[k]);        
     
-                    w.WriteLine("    { '" + toString(v[0]) + "', '" + 
toString(v[1]) + "' },");
-                                    
-                    if (indices.ContainsKey((int)System.Convert.ToInt32(k, 
16)))
-                    {
-                        Console.WriteLine(k + " already indexed!");
-                    }
-                                    
-                    indices[(int)System.Convert.ToInt32(k, 16)] = (int)index;
-                    index++;
-                }            
-                w.WriteLine("  };");
-
-                int singleSecondStart = index;
-                            
-                w.WriteLine("\tpublic static readonly char[,] singleSecond = 
new char[,] {");
-                i = new HashSet(singleSecondComposition.Keys).GetEnumerator(); 
           
-                while (i.MoveNext())
-                {                
-                    string k = (string)i.Current;
-                    string[] v = ((string[])singleSecondComposition[k]);       
      
-                    w.WriteLine("    { '" + toString(v[0]) + "', '" + 
toString(v[1]) + "' },");
-                                    
-                    indices[(int)System.Convert.ToInt32(k, 16)] = (int)index;
-                    index++;
-                }            
-                w.WriteLine("  };");
-                            
-                w.WriteLine("\tpublic static readonly int multiSecondStart = " 
+ multiSecondStart + ";");            
-                w.WriteLine("\tpublic static readonly int singleFirstStart = " 
+ singleFirstStart + ";");            
-                w.WriteLine("\tpublic static readonly int singleSecondStart = 
" + singleSecondStart + ";");
-
-                System.Text.StringBuilder compositionPages = new 
System.Text.StringBuilder();
-                            
-                w.WriteLine("\tpublic static readonly int[] composePage = new 
int[] {");
-                int pageCount = 0;
-                for (int j = 0; j * 256 < composeLookupMax + 255; j++)
-                {
-                    bool empty = true;
-                    StringBuilder page = new StringBuilder();
-                    for (int k = 0; k < 256; k++)
-                    {
-                        if (k % 16 == 0)
-                        {
-                            page.Append("\r\n      ");
-                        }
-                        if (indices.ContainsKey((int)(j * 256 + k)))
-                        {
-                            page.Append(indices[(int)(j * 256 + k)]);
-                            page.Append(", ");
-                            empty = false;
-                        }
-                        else
-                        {
-                            page.Append("-1, ");
-                        }
-                    }
-
-                    if (empty)
-                    {                    
-                        w.WriteLine("    -1,");
-                    }
-                    else
-                    {                 
-                        w.WriteLine("    " + pageCount + ",");
-                        compositionPages.Append("\t{");
-                        compositionPages.Append(page);
-                        compositionPages.Append("\r\n    },\r\n");
-                        pageCount++;
-                    }
-                }            
-                w.WriteLine("  };");
-                //w.WriteLine("\t/* jagged Array */");                        
-                w.WriteLine("\tpublic static readonly int[,] composeData = new 
int[,] {");
-                w.Write(compositionPages);            
-                w.WriteLine("  };");                        
-                w.WriteLine("}");            
-                w.Close();
-            }
-
-            //Console.WriteLine(" Ok.");             
-            Console.WriteLine("Finished!");
-        }
-    }
-}
+/// <summary>
+/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
+///
+/// Author: Alexander Gnauck AG-Software, mailto:address@hidden
+///
+/// This file is part of GNU Libidn.
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
+/// </summary>
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Text;
+
+namespace gnu.inet.encoding.misc
+{
+    public class GenerateNFKC
+    {
+        internal static string stripComment(string sIn)
+        {
+            int c = sIn.IndexOf('#');
+            if (c == -1)
+            {
+                return sIn;
+            }
+            else
+            {
+                return sIn.Substring(0, (c) - (0));
+            }
+        }
+
+        internal static string[] split(string sIn, char sep)
+        {
+            StringBuilder sb = new StringBuilder(sIn);
+            int c = 0;
+            for (int i = 0; i < sb.Length; i++)
+            {
+                if (sb[i] == sep)
+                {
+                    c++;
+                }
+            }
+
+            string[] sOut = new string[c + 1];
+            c = 0;
+            int l = 0;
+            for (int i = 0; i < sb.Length; i++)
+            {
+                if (sb[i] == sep)
+                {
+                    if (l >= i)
+                    {
+                        sOut[c] = "";
+                    }
+                    else
+                    {
+                        // TODO, check this
+                        sOut[c] = sb.ToString(l, i-l);
+                    }
+                    l = i + 1;
+                    c++;
+                }
+            }
+            if (l < sb.Length)
+            {
+                sOut[c] = sb.ToString(l, sb.Length - l);
+            }
+            return sOut;
+        }
+
+        internal static bool isCompatibilityMapping(string sIn)
+        {
+            return sIn.Length > 0 && sIn[0] == '<';
+        }
+
+        internal static string stripCompatibilityTag(string sIn)
+        {
+            return sIn.Substring(sIn.IndexOf('>') + 2);
+        }
+
+        internal static string toString(string sIn)
+        {
+            StringBuilder sOut = new StringBuilder();
+            string[] chars = split(sIn, ' ');
+            for (int i = 0; i < chars.Length; i++)
+            {
+                if (chars[i].Equals("005C"))
+                {
+                    sOut.Append("\\\\");
+                }
+                else if (chars[i].Equals("0022"))
+                {
+                    sOut.Append("\\\"");
+                }
+                else
+                {
+                    sOut.Append("\\u");
+                    sOut.Append(chars[i]);
+                }
+            }
+            return sOut.ToString();
+        }
+
+        internal static string decompose(string sIn, SortedList mappings)
+        {
+            StringBuilder sOut = new StringBuilder();
+            string[] c = split(sIn, ' ');
+
+            for (int i = 0; i < c.Length; i++)
+            {
+                if (mappings.ContainsKey(c[i]))
+                {
+                    if (sOut.Length > 0)
+                    {
+                        sOut.Append(" ");
+                    }
+                    sOut.Append(decompose((string)mappings[c[i]], mappings));
+                }
+                else
+                {
+                    if (sOut.Length > 0)
+                    {
+                        sOut.Append(" ");
+                    }
+                    sOut.Append(c[i]);
+                }
+            }
+
+            return sOut.ToString();
+        }
+
+        public static void Generate()
+        {
+            // Check if the unicode files exist
+            {
+                FileInfo f1 = new FileInfo("CompositionExclusions.txt");
+                FileInfo f2 = new FileInfo("UnicodeData.txt");
+                bool tmpBool;
+                if (File.Exists(f1.FullName))
+                    tmpBool = true;
+                else
+                    tmpBool = Directory.Exists(f1.FullName);
+                bool tmpBool2;
+                if (File.Exists(f2.FullName))
+                    tmpBool2 = true;
+                else
+                    tmpBool2 = Directory.Exists(f2.FullName);
+                if (!tmpBool || !tmpBool2)
+                {
+                    Console.WriteLine("Unable to find UnicodeData.txt or 
CompositionExclusions.txt.");
+                    Console.WriteLine("Please download the latest version of 
these file from:");
+                    
Console.WriteLine("http://www.unicode.org/Public/UNIDATA/";);
+                    System.Environment.Exit(1);
+                }
+            }
+
+            ArrayList exclusions = new ArrayList();
+            {
+                StreamReader r = new StreamReader("CompositionExclusions.txt", 
System.Text.Encoding.Default);
+                string line;
+                while (null != (line = r.ReadLine()))
+                {
+                    line = stripComment(line);
+                    line = line.Trim();
+                    if (line.Length == 0)
+                    {
+                        // Empty line
+                    }
+                    else if (line.Length == 4)
+                    {
+                        exclusions.Add(line);
+                    }
+                    else
+                    {
+                        // Skip code points > 0xffff
+                    }
+                }
+                r.Close();
+            }
+
+            // Read UnicodeData
+
+            SortedList canonical = new SortedList();
+            SortedList compatibility = new SortedList();
+            SortedList combiningClasses = new SortedList();
+            {
+                StreamReader r = new StreamReader("UnicodeData.txt", 
Encoding.Default);
+                string line;
+                while (null != (line = r.ReadLine()))
+                {
+                    line = stripComment(line);
+                    line = line.Trim();
+
+                    if (line.Length == 0)
+                    {
+                        // Empty line
+                    }
+                    else
+                    {
+                        string[] f = split(line, ';');
+
+                        if (f[0].Length == 4)
+                        {
+                            if (!f[5].Equals(""))
+                            {
+                                if (isCompatibilityMapping(f[5]))
+                                {
+                                    compatibility[f[0]] = 
stripCompatibilityTag(f[5]);
+                                }
+                                else
+                                {
+                                    compatibility[f[0]] = f[5];
+                                    if (!exclusions.Contains(f[0]))
+                                    {
+                                        canonical[f[0]] = f[5];
+                                    }
+                                }
+                            }
+                            if (!f[3].Equals("0"))
+                            {
+                                //UPGRADE_TODO: Method 
'java.lang.Integer.parseInt' was converted to 'System.Convert.ToInt32' which 
has a different behavior. 
"ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'"
+                                
combiningClasses[(int)System.Convert.ToInt32(f[0], 16)] = f[3];
+                            }
+                        }
+                        else
+                        {
+                            // Skip code points > 0xffff
+                        }
+                    }
+                }
+                r.Close();
+            }
+
+            // Recursively apply compatibility mappings
+            while (true)
+            {
+                bool replaced = false;
+
+                IEnumerator i = new 
HashSet(compatibility.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string k = (string)i.Current;
+                    string v = (string)compatibility[k];
+
+                    string d = decompose(v, compatibility);
+                    if (!d.Equals(v))
+                    {
+                        replaced = true;
+                        compatibility[k] = d;
+                    }
+                }
+
+                if (!replaced)
+                {
+                    break;
+                }
+            }
+
+            // Eliminate duplicate mappings
+            SortedList compatibilityKeys = new SortedList();
+            ArrayList compatibilityMappings = new ArrayList();
+            {
+                IEnumerator i = new 
HashSet(compatibility.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string k = (string)i.Current;
+                    string v = (string)compatibility[k];
+
+                    int index = compatibilityMappings.IndexOf(v);
+                    if (index == -1)
+                    {
+                        index = compatibilityMappings.Count;
+                        compatibilityMappings.Add(v);
+                    }
+                    compatibilityKeys[k] = (int)index;
+                }
+            }
+
+            // Create composition tables
+            SortedList firstMap = new SortedList();
+            SortedList secondMap = new SortedList();
+            {
+                IEnumerator i = new HashSet(canonical.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string k = (string)i.Current;
+                    string v = (string)canonical[k];
+
+                    string[] s = split(v, ' ');
+
+                    if (s.Length == 2)
+                    {
+                        // If both characters have the same combining class, 
they
+                        // won't be combined (in the sequence AB, B is blocked 
from
+                        // A if both have the same combining class)
+                        string cc1 = 
(string)combiningClasses[(int)System.Convert.ToInt32(s[0], 16)];
+                        string cc2 = 
(string)combiningClasses[(int)System.Convert.ToInt32(s[1], 16)];
+                        if (cc1 != null || (cc1 != null && cc1.Equals(cc2)))
+                        {
+                            // Ignore this composition
+                            // TODO check this
+                            //i.remove();
+                            canonical.Remove(k);
+                            continue;
+                        }
+
+                        if (firstMap.ContainsKey(s[0]))
+                        {
+                            int c = (int)firstMap[s[0]];
+                            firstMap[s[0]] = (int)(c + 1);
+                        }
+                        else
+                        {
+                            firstMap[s[0]] = 1;
+                        }
+
+                        if (secondMap.ContainsKey(s[1]))
+                        {
+                            int c = (int)secondMap[s[1]];
+                            secondMap[s[1]] = (int)(c + 1);
+                        }
+                        else
+                        {
+                            secondMap[s[1]] = 1;
+                        }
+                    }
+                    else if (s.Length > 2)
+                    {
+                        Console.WriteLine("? wrong canonical mapping for " + 
k);
+                        System.Environment.Exit(1);
+                    }
+                }
+            }
+
+            SortedList singleFirstComposition = new SortedList();
+            SortedList singleSecondComposition = new SortedList();
+            SortedList complexComposition = new SortedList();
+
+            int composeLookupMax = 0;
+            {
+                IEnumerator i = new HashSet(canonical.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string k = (string) i.Current;
+                    string v = (string) canonical[k];
+
+                    string[] s = split(v, ' ');
+
+                    if (s.Length == 2)
+                    {
+                        // TODO, check this
+                        int first = 0;
+                        if(firstMap.Contains(s[0]))
+                            first = (int) firstMap[s[0]];
+
+                        int second = 0;
+                        if (secondMap.Contains(s[1]))
+                            second = (int) secondMap[s[1]];
+                        // TODO, check this
+
+                        if (first == 1)
+                        {
+                            singleFirstComposition[s[0]] = new string[] { 
s[1], k };
+                            composeLookupMax = 
System.Math.Max(composeLookupMax, System.Convert.ToInt32(s[0], 16));
+                        }
+                        else if (second == 1)
+                        {
+                            singleSecondComposition[s[1]] = new string[] { 
s[0], k };
+                            composeLookupMax = 
System.Math.Max(composeLookupMax, System.Convert.ToInt32(s[1], 16));
+                        }
+                        else
+                        {
+                            if (complexComposition.ContainsKey(s[0]))
+                            {
+                                SortedList m = 
(SortedList)complexComposition[s[0]];
+                                if (m.ContainsKey(s[1]))
+                                {
+                                    Console.WriteLine("? ambiguous canonical 
mapping for " + s[0]);
+                                    System.Environment.Exit(1);
+                                }
+                                m[s[1]] = k;
+                            }
+                            else
+                            {
+                                SortedList m = new SortedList();
+                                m[s[1]] = k;
+                                complexComposition[s[0]] = m;
+                            }
+                            composeLookupMax = 
System.Math.Max(composeLookupMax, System.Convert.ToInt32(s[0], 16));
+                            composeLookupMax = 
System.Math.Max(composeLookupMax, System.Convert.ToInt32(s[1], 16));
+                        }
+                    }
+                }
+            }
+
+            Console.WriteLine("Generating CombiningClass.cs file...");
+
+            // Dump combining classes
+            {
+                StreamWriter w = new StreamWriter("CombiningClass.cs", false, 
Encoding.Default);
+                w.WriteLine("// Do not edit !!!");
+                w.WriteLine("// this file is generated automatically");
+                w.WriteLine();
+                w.WriteLine("public class CombiningClass");
+                w.WriteLine("{");
+                w.WriteLine("\tpublic static readonly int[,] c = new int[,] 
{");
+                System.Text.StringBuilder index = new 
System.Text.StringBuilder();
+
+                int count = 0;
+
+                for (int i = 0; i < 256; i++)
+                {
+                    bool empty = true;
+
+                    StringBuilder page = new StringBuilder();
+                    page.Append("    { /* Page " + i + " */");
+
+                    for (int j = 0; j < 256; j++)
+                    {
+                        int c = (int)((i << 8) + j);
+                        string cc = (string)combiningClasses[c];
+
+                        if (0 == (j & 31))
+                        {
+                            page.Append("\r\n      ");
+                        }
+                        if (cc == null)
+                        {
+                            page.Append("0, ");
+                        }
+                        else
+                        {
+                            page.Append(cc + ", ");
+                            empty = false;
+                        }
+                    }
+                    page.Append("\r\n    },");
+
+                    index.Append("    ");
+
+                    if (!empty)
+                    {
+                        w.WriteLine(page.ToString());
+                        index.Append(count++);
+                        index.Append(",\r\n");
+                    }
+                    else
+                    {
+                        index.Append("-1,\r\n");
+                    }
+                }
+                w.WriteLine("  };\r\n");
+
+                w.WriteLine("\tpublic static readonly int[] i = new int[] {");
+                w.Write(index.ToString());
+                w.WriteLine("  };");
+                w.WriteLine("}");
+                w.Close();
+            }
+
+            //Console.WriteLine(" Ok.");
+            Console.WriteLine("Generating DecompositionKeys.cs file...");
+
+            // Dump compatibility decomposition
+            {
+                StreamWriter w = new StreamWriter("DecompositionKeys.cs", 
false, Encoding.Default);
+                w.WriteLine("// Do not edit !!!");
+                w.WriteLine("// this file is generated automatically");
+                w.WriteLine();
+                w.WriteLine("public class DecompositionKeys");
+                w.WriteLine("{");
+
+                w.WriteLine("\tpublic static readonly int[] k = new int[] {");
+                IEnumerator i = new 
HashSet(compatibilityKeys.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string k = (string)i.Current;
+                    int index = ((int)compatibilityKeys[k]);
+                    w.WriteLine("    '\\u" + k + "', " + index + ",");
+                }
+                w.WriteLine("  };");
+                w.WriteLine("}");
+                w.Close();
+            }
+
+            //Console.WriteLine(" Ok.");
+            Console.WriteLine("Generating DecompositionMappings.cs file...");
+
+            {
+                StreamWriter w = new StreamWriter("DecompositionMappings.cs", 
false, Encoding.Default);
+                w.WriteLine("// Do not edit !!!");
+                w.WriteLine("// this file is generated automatically");
+                w.WriteLine();
+                w.WriteLine("public class DecompositionMappings");
+                w.WriteLine("{");
+                w.WriteLine("\tpublic static readonly string[] m = new 
string[] {");
+                IEnumerator i = compatibilityMappings.GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string m = (string)i.Current;
+                    w.WriteLine("    \"" + toString(m) + "\",");
+                }
+                w.WriteLine("  };");
+                w.WriteLine("}");
+                w.Close();
+            }
+
+            //Console.WriteLine(" Ok.");
+            Console.WriteLine("Generating Composition.cs file...");
+
+            // Dump canonical composition
+            {
+                StreamWriter w = new StreamWriter("Composition.cs", false, 
Encoding.Default);
+                w.WriteLine("// Do not edit !!!");
+                w.WriteLine("// this file is generated automatically");
+                w.WriteLine();
+                w.WriteLine("public class Composition");
+                w.WriteLine("{");
+
+                IEnumerator i;
+                int index = 0;
+
+                SortedList indices = new SortedList();
+
+                i = new HashSet(complexComposition.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string s0 = (string)i.Current;
+                    indices[(int)System.Convert.ToInt32(s0, 16)] = (int)index;
+                    index++;
+                }
+
+                int multiSecondStart = index;
+                w.WriteLine("\t/* jagged Array */");
+                w.WriteLine("\tpublic static readonly char[][] multiFirst = 
new char[][] {");
+                //w.WriteLine("  public final static char[][] multiFirst = new 
char[][] {");
+                i = new HashSet(complexComposition.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string s0 = (string)i.Current;
+                    SortedList m = (SortedList)complexComposition[s0];
+
+                    SortedList line = new SortedList();
+                    int maxIndex = 1;
+
+                    System.Collections.IEnumerator i2 = new 
HashSet(m.Keys).GetEnumerator();
+                    while (i2.MoveNext())
+                    {
+                        string s1 = (string)i2.Current;
+                        string k = (string)m[s1];
+
+                        int s1i = (int)System.Convert.ToInt32(s1, 16);
+
+                        if (!indices.ContainsKey(s1i))
+                        {
+                            indices[s1i] = (int)index;
+                            index++;
+                        }
+                        line[indices[s1i]] = k;
+                        maxIndex = System.Math.Max(maxIndex, 
((int)indices[s1i]));
+                    }
+
+                    w.Write("\tnew char[] { ");
+                    for (int j = multiSecondStart; j <= maxIndex; j++)
+                    {
+                        if (line.ContainsKey((int)j))
+                        {
+                            string s = (string)line[(int)j];
+                            w.Write("'" + toString(s) + "', ");
+                        }
+                        else
+                        {
+                            //w.Write("       0, ");
+                            w.Write("'" + toString("0000") + "', ");
+                        }
+                    }
+                    w.WriteLine("},");
+                }
+                w.WriteLine("  };");
+
+                int singleFirstStart = index;
+
+                w.WriteLine("\tpublic static readonly char[,] singleFirst = 
new char[,] {");
+                i = new HashSet(singleFirstComposition.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string k = (string)i.Current;
+                    string[] v = ((string[])singleFirstComposition[k]);
+                    w.WriteLine("    { '" + toString(v[0]) + "', '" + 
toString(v[1]) + "' },");
+
+                    if (indices.ContainsKey((int)System.Convert.ToInt32(k, 
16)))
+                    {
+                        Console.WriteLine(k + " already indexed!");
+                    }
+
+                    indices[(int)System.Convert.ToInt32(k, 16)] = (int)index;
+                    index++;
+                }
+                w.WriteLine("  };");
+
+                int singleSecondStart = index;
+
+                w.WriteLine("\tpublic static readonly char[,] singleSecond = 
new char[,] {");
+                i = new HashSet(singleSecondComposition.Keys).GetEnumerator();
+                while (i.MoveNext())
+                {
+                    string k = (string)i.Current;
+                    string[] v = ((string[])singleSecondComposition[k]);
+                    w.WriteLine("    { '" + toString(v[0]) + "', '" + 
toString(v[1]) + "' },");
+
+                    indices[(int)System.Convert.ToInt32(k, 16)] = (int)index;
+                    index++;
+                }
+                w.WriteLine("  };");
+
+                w.WriteLine("\tpublic static readonly int multiSecondStart = " 
+ multiSecondStart + ";");
+                w.WriteLine("\tpublic static readonly int singleFirstStart = " 
+ singleFirstStart + ";");
+                w.WriteLine("\tpublic static readonly int singleSecondStart = 
" + singleSecondStart + ";");
+
+                System.Text.StringBuilder compositionPages = new 
System.Text.StringBuilder();
+
+                w.WriteLine("\tpublic static readonly int[] composePage = new 
int[] {");
+                int pageCount = 0;
+                for (int j = 0; j * 256 < composeLookupMax + 255; j++)
+                {
+                    bool empty = true;
+                    StringBuilder page = new StringBuilder();
+                    for (int k = 0; k < 256; k++)
+                    {
+                        if (k % 16 == 0)
+                        {
+                            page.Append("\r\n      ");
+                        }
+                        if (indices.ContainsKey((int)(j * 256 + k)))
+                        {
+                            page.Append(indices[(int)(j * 256 + k)]);
+                            page.Append(", ");
+                            empty = false;
+                        }
+                        else
+                        {
+                            page.Append("-1, ");
+                        }
+                    }
+
+                    if (empty)
+                    {
+                        w.WriteLine("    -1,");
+                    }
+                    else
+                    {
+                        w.WriteLine("    " + pageCount + ",");
+                        compositionPages.Append("\t{");
+                        compositionPages.Append(page);
+                        compositionPages.Append("\r\n    },\r\n");
+                        pageCount++;
+                    }
+                }
+                w.WriteLine("  };");
+                //w.WriteLine("\t/* jagged Array */");
+                w.WriteLine("\tpublic static readonly int[,] composeData = new 
int[,] {");
+                w.Write(compositionPages);
+                w.WriteLine("  };");
+                w.WriteLine("}");
+                w.Close();
+            }
+
+            //Console.WriteLine(" Ok.");
+            Console.WriteLine("Finished!");
+        }
+    }
+}
diff --git a/csharp/generate/GenerateRFC3454.cs 
b/csharp/generate/GenerateRFC3454.cs
index 60696a9..dffab70 100644
--- a/csharp/generate/GenerateRFC3454.cs
+++ b/csharp/generate/GenerateRFC3454.cs
@@ -1,294 +1,304 @@
-/// <summary>
-/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
-/// Author: Alexander Gnauck AG-Software
-/// *
-/// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
-/// </summary>
-using System;
-using System.IO;
-using System.Text;
-
-namespace gnu.inet.encoding.misc
-{
-    public class GenerateRFC3454
-    {
-        internal const string FILE_RFC3454  = "rfc3454.txt";
-        internal const string FILE_OUTPUT   = "RFC3454.cs";
-                
-        public static void Generate()
-        {
-            if (!File.Exists(FILE_RFC3454))
-            {
-                Console.WriteLine("Unable to find rfc3454.txt.");
-                Console.WriteLine("Please download this file from:");
-                Console.WriteLine("http://www.ietf.org/rfc/rfc3454.txt";);
-                
-                return;                
-            }
-
-            Console.WriteLine("Generating " + FILE_OUTPUT + " file...");
-                        
-            
-            StreamReader r = new StreamReader(FILE_RFC3454);            
-            StreamWriter w = new StreamWriter(FILE_OUTPUT);
-
-            w.WriteLine("// Do not edit !!!");
-            w.WriteLine("// this file is generated automatically");
-            w.WriteLine();
-            w.WriteLine("using System;");
-            w.WriteLine();
-            w.WriteLine("namespace Gnu.Inet.Encoding{");
-            w.WriteLine();
-            w.WriteLine("public class RFC3454");
-
-            w.WriteLine("{");
-
-            int n = 0;
-
-            string t = null;
-            System.Text.StringBuilder o1 = null;
-            System.Text.StringBuilder o2 = null;
-
-            while (true)
-            {
-                string line = r.ReadLine();
-                string l = line;
-                
-                if (null == l)
-                {
-                    break;
-                }
-                l = l.Trim();
-
-                if (l.Equals(""))
-                {
-                    // Ignore empty line
-                }
-                else if (-1 != l.IndexOf("\u000c"))
-                {
-                    // Ignore FF
-                }
-                else if (0 == l.IndexOf("RFC"))
-                {
-                    // Ignore page header
-                }
-                else if (0 == l.IndexOf("Hoffman & Blanchet"))
-                {
-                    // Ignore page footer
-                }
-                else if (-1 != l.IndexOf("----- Start Table "))
-                {
-                    // Start of a table
-                    t = l.Substring(l.IndexOf("Table") + 6, 
(l.LastIndexOf("-----") - 1) - (l.IndexOf("Table") + 6));
-                    o1 = new System.Text.StringBuilder();
-                    o2 = new System.Text.StringBuilder();
-                }
-                else if (-1 != l.IndexOf("----- End Table "))
-                {
-                    // End of a table
-                    if ("A.1".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] A1 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("B.1".Equals(t))
-                    {
-                        w.WriteLine("  public static char[] B1 = new char[] 
{\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("B.2".Equals(t))
-                    {
-                        w.WriteLine("  public static char[] B2search = new 
char[] {\r\n" + o1.ToString() + "  };\r\n");
-                        w.WriteLine("  public static string[] B2replace = new 
string[] {\r\n" + o2.ToString() + "  };\r\n");
-                    }
-                    else if ("B.3".Equals(t))
-                    {
-                        w.WriteLine("  public static char[] B3search = new 
char[] {\r\n" + o1.ToString() + "  };\r\n");
-                        w.WriteLine("  public static string[] B3replace = new 
string[] {\r\n" + o2.ToString() + "  };\r\n");
-                    }
-                    else if ("C.1.1".Equals(t))
-                    {
-                        w.WriteLine("  public static char[] C11 = new char[] 
{\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.1.2".Equals(t))
-                    {
-                        w.WriteLine("  public static char[] C12 = new char[] 
{\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.2.1".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] C21 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.2.2".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] C22 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.3".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] C3 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.4".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] C4 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.5".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] C5 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.6".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] C6 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.7".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] C7 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("C.8".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] C8 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("D.1".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] D1 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    else if ("D.2".Equals(t))
-                    {
-                        w.WriteLine("  public static char[][] D2 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
-                    }
-                    t = null;
-                }
-                else if (null != t)
-                {
-                    // Filter comments
-                    if (-1 != l.LastIndexOf(";"))
-                    {
-                        string c = l.Substring(l.LastIndexOf(";")).Trim();
-                        try
-                        {                            
-                           Convert.ToInt32(c, 16);
-                        }
-                        catch
-                        {
-                            l = l.Substring(0, (l.LastIndexOf(";")) - (0));
-                        }
-                    }
-
-                    if ("A.1".Equals(t))
-                    {
-                        if (4 == l.Length)
-                        {
-                            o1.Append("    new char[] { '\\u");
-                            o1.Append(l);
-                            o1.Append("' },");
-                            o1.Append("\t/* " + line.Trim() + " */\r\n");
-                        }
-                        else if (5 == l.Length)
-                        {
-                            //Char
-                            o1.Append("\t/* Skip characters outside the range 
of .NET unicode " + line.Trim() + " */\n");
-                            //Console.WriteLine("Skip: " + l);                 
           
-                            // Skip characters outside the range of Java 
unicode
-                        }
-                        else if (9 == l.Length)
-                        {
-                            o1.Append("    new char[] { '\\u");
-                            o1.Append(l.Substring(0, (4) - (0)));
-                            o1.Append("', '\\u");
-                            o1.Append(l.Substring(5, (9) - (5)));
-                            o1.Append("' },");
-                            o1.Append("\t/* " + line.Trim() + " */\r\n");
-                        }
-                        else if (11 == l.Length)
-                        {
-                            o1.Append("\t/* Skip characters outside the range 
of .NET unicode " + line.Trim() + " */\n");
-                            //o1.AppendLine("// " + l);
-                            // Console.WriteLine("Skip: " + l);
-                            // Skip characters outside the range of Java 
unicode
-                        }
-                        else
-                        {
-                            Console.WriteLine("Unknown format of A.1 line: " + 
l);
-                        }
-                    }
-                    else if ("B.1".Equals(t))
-                    {
-                        Tokenizer tok = new Tokenizer(l, " ;");
-                        o1.Append("    '\\u" + tok.NextToken() + "',");
-                        o1.Append("\t/* " + line.Trim() + " */\r\n");
-                    }
-                    else if ("B.2".Equals(t) || "B.3".Equals(t))
-                    {
-                        Tokenizer tok = new Tokenizer(l, "; ");
-                        string c = tok.NextToken();
-                        if (c.Length == 4)
-                        {
-                            o1.Append("    '\\u" + c + "',");
-                            o1.Append("\t/*" + line.Trim() + "*/\r\n");
-                            if (tok.HasMoreTokens())
-                            {
-                                o2.Append("    \"");
-                                while (tok.HasMoreTokens())
-                                {
-                                    o2.Append("\\u" + tok.NextToken());
-                                }
-                                o2.Append("\",");
-                                o2.Append("\t/*" + line.Trim() + "*/\r\n");
-                            }
-                            else
-                            {
-                                o2.Append("    null,");
-                                o2.Append("\t/*" + line.Trim() + "*/\r\n");
-                            }
-                        }
-                    }
-                    else if ("C.1.1".Equals(t))
-                    {
-                        o1.Append("    '\\u" + l + "',");
-                        o1.Append("\t/* " + line.Trim() + " */\r\n");
-                    }
-                    else if ("C.1.2".Equals(t))
-                    {
-                        o1.Append("    '\\u" + l + "',");
-                        o1.Append("\t/* " + line.Trim() + " */\r\n");
-                    }
-                    else if ("C.2.1".Equals(t) || "C.2.2".Equals(t) || 
"C.3".Equals(t) || "C.4".Equals(t) || "C.5".Equals(t) || "C.6".Equals(t) || 
"C.7".Equals(t) || "C.8".Equals(t) || "D.1".Equals(t) || "D.2".Equals(t))
-                    {
-                        if (4 == l.Length)
-                        {
-                            o1.Append("    new char[] { '\\u" + l + "' },");
-                            o1.Append("\t/* " + line.Trim() + " */\r\n");
-                        }
-                        else if (9 == l.Length)
-                        {
-                            o1.Append("    new char[] { '\\u");
-                            o1.Append(l.Substring(0, (4) - (0)));
-                            o1.Append("', '\\u");
-                            o1.Append(l.Substring(5, (9) - (5)));
-                            o1.Append("' },");
-                            o1.Append("\t/* " + line.Trim() + " */\r\n");
-                        }
-                    }
-                }
-
-                n++;
-            }
-
-            w.WriteLine("}");
-            w.WriteLine("}");
-            w.Close();            
-        }
-    }
-}
+/// <summary>
+/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
+///
+/// Author: Alexander Gnauck AG-Software, mailto:address@hidden
+///
+/// This file is part of GNU Libidn.
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
+/// </summary>
+
+using System;
+using System.IO;
+using System.Text;
+
+namespace gnu.inet.encoding.misc
+{
+    public class GenerateRFC3454
+    {
+        internal const string FILE_RFC3454  = "rfc3454.txt";
+        internal const string FILE_OUTPUT   = "RFC3454.cs";
+
+        public static void Generate()
+        {
+            if (!File.Exists(FILE_RFC3454))
+            {
+                Console.WriteLine("Unable to find rfc3454.txt.");
+                Console.WriteLine("Please download this file from:");
+                Console.WriteLine("http://www.ietf.org/rfc/rfc3454.txt";);
+
+                return;
+            }
+
+            Console.WriteLine("Generating " + FILE_OUTPUT + " file...");
+
+
+            StreamReader r = new StreamReader(FILE_RFC3454);
+            StreamWriter w = new StreamWriter(FILE_OUTPUT);
+
+            w.WriteLine("// Do not edit !!!");
+            w.WriteLine("// this file is generated automatically");
+            w.WriteLine();
+            w.WriteLine("using System;");
+            w.WriteLine();
+            w.WriteLine("namespace Gnu.Inet.Encoding{");
+            w.WriteLine();
+            w.WriteLine("public class RFC3454");
+
+            w.WriteLine("{");
+
+            int n = 0;
+
+            string t = null;
+            System.Text.StringBuilder o1 = null;
+            System.Text.StringBuilder o2 = null;
+
+            while (true)
+            {
+                string line = r.ReadLine();
+                string l = line;
+
+                if (null == l)
+                {
+                    break;
+                }
+                l = l.Trim();
+
+                if (l.Equals(""))
+                {
+                    // Ignore empty line
+                }
+                else if (-1 != l.IndexOf("\u000c"))
+                {
+                    // Ignore FF
+                }
+                else if (0 == l.IndexOf("RFC"))
+                {
+                    // Ignore page header
+                }
+                else if (0 == l.IndexOf("Hoffman & Blanchet"))
+                {
+                    // Ignore page footer
+                }
+                else if (-1 != l.IndexOf("----- Start Table "))
+                {
+                    // Start of a table
+                    t = l.Substring(l.IndexOf("Table") + 6, 
(l.LastIndexOf("-----") - 1) - (l.IndexOf("Table") + 6));
+                    o1 = new System.Text.StringBuilder();
+                    o2 = new System.Text.StringBuilder();
+                }
+                else if (-1 != l.IndexOf("----- End Table "))
+                {
+                    // End of a table
+                    if ("A.1".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] A1 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("B.1".Equals(t))
+                    {
+                        w.WriteLine("  public static char[] B1 = new char[] 
{\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("B.2".Equals(t))
+                    {
+                        w.WriteLine("  public static char[] B2search = new 
char[] {\r\n" + o1.ToString() + "  };\r\n");
+                        w.WriteLine("  public static string[] B2replace = new 
string[] {\r\n" + o2.ToString() + "  };\r\n");
+                    }
+                    else if ("B.3".Equals(t))
+                    {
+                        w.WriteLine("  public static char[] B3search = new 
char[] {\r\n" + o1.ToString() + "  };\r\n");
+                        w.WriteLine("  public static string[] B3replace = new 
string[] {\r\n" + o2.ToString() + "  };\r\n");
+                    }
+                    else if ("C.1.1".Equals(t))
+                    {
+                        w.WriteLine("  public static char[] C11 = new char[] 
{\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.1.2".Equals(t))
+                    {
+                        w.WriteLine("  public static char[] C12 = new char[] 
{\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.2.1".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] C21 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.2.2".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] C22 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.3".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] C3 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.4".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] C4 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.5".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] C5 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.6".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] C6 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.7".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] C7 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("C.8".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] C8 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("D.1".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] D1 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    else if ("D.2".Equals(t))
+                    {
+                        w.WriteLine("  public static char[][] D2 = new 
char[][] {\r\n" + o1.ToString() + "  };\r\n");
+                    }
+                    t = null;
+                }
+                else if (null != t)
+                {
+                    // Filter comments
+                    if (-1 != l.LastIndexOf(";"))
+                    {
+                        string c = l.Substring(l.LastIndexOf(";")).Trim();
+                        try
+                        {
+                           Convert.ToInt32(c, 16);
+                        }
+                        catch
+                        {
+                            l = l.Substring(0, (l.LastIndexOf(";")) - (0));
+                        }
+                    }
+
+                    if ("A.1".Equals(t))
+                    {
+                        if (4 == l.Length)
+                        {
+                            o1.Append("    new char[] { '\\u");
+                            o1.Append(l);
+                            o1.Append("' },");
+                            o1.Append("\t/* " + line.Trim() + " */\r\n");
+                        }
+                        else if (5 == l.Length)
+                        {
+                            //Char
+                            o1.Append("\t/* Skip characters outside the range 
of .NET unicode " + line.Trim() + " */\n");
+                            //Console.WriteLine("Skip: " + l);
+                            // Skip characters outside the range of Java 
unicode
+                        }
+                        else if (9 == l.Length)
+                        {
+                            o1.Append("    new char[] { '\\u");
+                            o1.Append(l.Substring(0, (4) - (0)));
+                            o1.Append("', '\\u");
+                            o1.Append(l.Substring(5, (9) - (5)));
+                            o1.Append("' },");
+                            o1.Append("\t/* " + line.Trim() + " */\r\n");
+                        }
+                        else if (11 == l.Length)
+                        {
+                            o1.Append("\t/* Skip characters outside the range 
of .NET unicode " + line.Trim() + " */\n");
+                            //o1.AppendLine("// " + l);
+                            // Console.WriteLine("Skip: " + l);
+                            // Skip characters outside the range of Java 
unicode
+                        }
+                        else
+                        {
+                            Console.WriteLine("Unknown format of A.1 line: " + 
l);
+                        }
+                    }
+                    else if ("B.1".Equals(t))
+                    {
+                        Tokenizer tok = new Tokenizer(l, " ;");
+                        o1.Append("    '\\u" + tok.NextToken() + "',");
+                        o1.Append("\t/* " + line.Trim() + " */\r\n");
+                    }
+                    else if ("B.2".Equals(t) || "B.3".Equals(t))
+                    {
+                        Tokenizer tok = new Tokenizer(l, "; ");
+                        string c = tok.NextToken();
+                        if (c.Length == 4)
+                        {
+                            o1.Append("    '\\u" + c + "',");
+                            o1.Append("\t/*" + line.Trim() + "*/\r\n");
+                            if (tok.HasMoreTokens())
+                            {
+                                o2.Append("    \"");
+                                while (tok.HasMoreTokens())
+                                {
+                                    o2.Append("\\u" + tok.NextToken());
+                                }
+                                o2.Append("\",");
+                                o2.Append("\t/*" + line.Trim() + "*/\r\n");
+                            }
+                            else
+                            {
+                                o2.Append("    null,");
+                                o2.Append("\t/*" + line.Trim() + "*/\r\n");
+                            }
+                        }
+                    }
+                    else if ("C.1.1".Equals(t))
+                    {
+                        o1.Append("    '\\u" + l + "',");
+                        o1.Append("\t/* " + line.Trim() + " */\r\n");
+                    }
+                    else if ("C.1.2".Equals(t))
+                    {
+                        o1.Append("    '\\u" + l + "',");
+                        o1.Append("\t/* " + line.Trim() + " */\r\n");
+                    }
+                    else if ("C.2.1".Equals(t) || "C.2.2".Equals(t) || 
"C.3".Equals(t) || "C.4".Equals(t) || "C.5".Equals(t) || "C.6".Equals(t) || 
"C.7".Equals(t) || "C.8".Equals(t) || "D.1".Equals(t) || "D.2".Equals(t))
+                    {
+                        if (4 == l.Length)
+                        {
+                            o1.Append("    new char[] { '\\u" + l + "' },");
+                            o1.Append("\t/* " + line.Trim() + " */\r\n");
+                        }
+                        else if (9 == l.Length)
+                        {
+                            o1.Append("    new char[] { '\\u");
+                            o1.Append(l.Substring(0, (4) - (0)));
+                            o1.Append("', '\\u");
+                            o1.Append(l.Substring(5, (9) - (5)));
+                            o1.Append("' },");
+                            o1.Append("\t/* " + line.Trim() + " */\r\n");
+                        }
+                    }
+                }
+
+                n++;
+            }
+
+            w.WriteLine("}");
+            w.WriteLine("}");
+            w.Close();
+        }
+    }
+}
diff --git a/csharp/generate/HashSet.cs b/csharp/generate/HashSet.cs
index c9ea7bc..28e1e04 100644
--- a/csharp/generate/HashSet.cs
+++ b/csharp/generate/HashSet.cs
@@ -1,91 +1,101 @@
-/// <summary>
-/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
-/// Author: Alexander Gnauck AG-Software
-/// *
-/// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
-/// </summary>
-using System;
-using System.Collections;
-
-namespace gnu.inet.encoding.misc
-{
-    /// <summary>
-    /// HashSet class.
-    /// </summary>    
-    public class HashSet : ArrayList
-    {
-        public HashSet() : base()
-        {
-        }
-
-        public HashSet(System.Collections.ICollection c)
-        {
-            this.AddAll(c);
-        }
-
-        public HashSet(int capacity) : base(capacity)
-        {
-        }
-
-        /// <summary>
-        /// Adds a new element to the ArrayList if it is not already present.
-        /// </summary>         
-        /// <param name="obj">Element to insert to the ArrayList.</param>
-        /// <returns>Returns true if the new element was inserted, false 
otherwise.</returns>
-        new public virtual bool Add(System.Object obj)
-        {
-            bool inserted;
-
-            if ((inserted = this.Contains(obj)) == false)
-            {
-                base.Add(obj);
-            }
-
-            return !inserted;
-        }
-
-        /// <summary>
-        /// Adds all the elements of the specified collection that are not 
present to the list.
-        /// </summary>
-        /// <param name="c">Collection where the new elements will be 
added</param>
-        /// <returns>Returns true if at least one element was added, false 
otherwise.</returns>
-        public bool AddAll(System.Collections.ICollection c)
-        {
-            System.Collections.IEnumerator e = new 
System.Collections.ArrayList(c).GetEnumerator();
-            bool added = false;
-
-            while (e.MoveNext() == true)
-            {
-                if (this.Add(e.Current) == true)
-                    added = true;
-            }
-
-            return added;
-        }
-
-        /// <summary>
-        /// Returns a copy of the HashSet instance.
-        /// </summary>         
-        /// <returns>Returns a shallow copy of the current HashSet.</returns>
-        public override System.Object Clone()
-        {
-            return base.MemberwiseClone();
-        }
-    }
-}
+/// <summary>
+/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
+///
+/// Author: Alexander Gnauck AG-Software, mailto:address@hidden
+///
+/// This file is part of GNU Libidn.
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
+/// </summary>
+
+using System;
+using System.Collections;
+
+namespace gnu.inet.encoding.misc
+{
+    /// <summary>
+    /// HashSet class.
+    /// </summary>
+    public class HashSet : ArrayList
+    {
+        public HashSet() : base()
+        {
+        }
+
+        public HashSet(System.Collections.ICollection c)
+        {
+            this.AddAll(c);
+        }
+
+        public HashSet(int capacity) : base(capacity)
+        {
+        }
+
+        /// <summary>
+        /// Adds a new element to the ArrayList if it is not already present.
+        /// </summary>
+        /// <param name="obj">Element to insert to the ArrayList.</param>
+        /// <returns>Returns true if the new element was inserted, false 
otherwise.</returns>
+        new public virtual bool Add(System.Object obj)
+        {
+            bool inserted;
+
+            if ((inserted = this.Contains(obj)) == false)
+            {
+                base.Add(obj);
+            }
+
+            return !inserted;
+        }
+
+        /// <summary>
+        /// Adds all the elements of the specified collection that are not 
present to the list.
+        /// </summary>
+        /// <param name="c">Collection where the new elements will be 
added</param>
+        /// <returns>Returns true if at least one element was added, false 
otherwise.</returns>
+        public bool AddAll(System.Collections.ICollection c)
+        {
+            System.Collections.IEnumerator e = new 
System.Collections.ArrayList(c).GetEnumerator();
+            bool added = false;
+
+            while (e.MoveNext() == true)
+            {
+                if (this.Add(e.Current) == true)
+                    added = true;
+            }
+
+            return added;
+        }
+
+        /// <summary>
+        /// Returns a copy of the HashSet instance.
+        /// </summary>
+        /// <returns>Returns a shallow copy of the current HashSet.</returns>
+        public override System.Object Clone()
+        {
+            return base.MemberwiseClone();
+        }
+    }
+}
diff --git a/csharp/generate/Program.cs b/csharp/generate/Program.cs
index 0685e40..ee369f4 100644
--- a/csharp/generate/Program.cs
+++ b/csharp/generate/Program.cs
@@ -1,39 +1,49 @@
-/// <summary>
-/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
-/// Author: Alexander Gnauck AG-Software
-/// *
-/// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
-/// </summary>
-using System;
-
-namespace gnu.inet.encoding.misc
-{
-    class Program
-    {
-        /// <summary>
-        /// Main entry point of this console app
-        /// </summary>
-        /// <param name="args"></param>
-        static void Main(string[] args)
-        {
-            GenerateRFC3454.Generate();
-            GenerateNFKC.Generate();
-        }
-    }
-}
+/// <summary>
+/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
+///
+/// Author: Alexander Gnauck AG-Software, mailto:address@hidden
+///
+/// This file is part of GNU Libidn.
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
+/// </summary>
+
+using System;
+
+namespace gnu.inet.encoding.misc
+{
+    class Program
+    {
+        /// <summary>
+        /// Main entry point of this console app
+        /// </summary>
+        /// <param name="args"></param>
+        static void Main(string[] args)
+        {
+            GenerateRFC3454.Generate();
+            GenerateNFKC.Generate();
+        }
+    }
+}
diff --git a/csharp/generate/Tokenizer.cs b/csharp/generate/Tokenizer.cs
index a4db4ac..1ed2ae2 100644
--- a/csharp/generate/Tokenizer.cs
+++ b/csharp/generate/Tokenizer.cs
@@ -1,223 +1,233 @@
-/// <summary>
-/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
-/// *
-/// Author: Alexander Gnauck AG-Software
-/// *
-/// This file is part of GNU Libidn.
-/// *
-/// This 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.
-/// *
-/// This 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 this library; if not, write to the Free Software
-/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-/// USA
-/// </summary>
-using System;
-using System.Collections;
-using System.Text;
-
-namespace gnu.inet.encoding.misc
-{
-    /// <summary>
-    /// The class performs token processing in strings
-    /// </summary>
-    public class Tokenizer : IEnumerator
-    {
-        /// Position over the string
-        private long currentPos = 0;
-
-        /// Include demiliters in the results.
-        private bool includeDelims = false;
-
-        /// Char representation of the String to tokenize.
-        private char[] chars = null;
-
-        //The tokenizer uses the default delimiter set: the space character, 
the tab character, the newline character, and the carriage-return character and 
the form-feed character
-        private string delimiters = " \t\n\r\f";
-
-        /// <summary>
-        /// Initializes a new class instance with a specified string to process
-        /// </summary>
-        /// <param name="source">String to tokenize</param>
-        public Tokenizer(string source)
-        {
-            this.chars = source.ToCharArray();
-        }
-
-        /// <summary>
-        /// Initializes a new class instance with a specified string to process
-        /// and the specified token delimiters to use
-        /// </summary>
-        /// <param name="source">String to tokenize</param>
-        /// <param name="delimiters">String containing the delimiters</param>
-        public Tokenizer(string source, string delimiters)
-            : this(source)
-        {
-            this.delimiters = delimiters;
-        }
-
-
-        /// <summary>
-        /// Initializes a new class instance with a specified string to 
process, the specified token 
-        /// delimiters to use, and whether the delimiters must be included in 
the results.
-        /// </summary>
-        /// <param name="source">String to tokenize</param>
-        /// <param name="delimiters">String containing the delimiters</param>
-        /// <param name="includeDelims">Determines if delimiters are included 
in the results.</param>
-        public Tokenizer(string source, string delimiters, bool includeDelims)
-            : this(source, delimiters)
-        {
-            this.includeDelims = includeDelims;
-        }
-
-
-        /// <summary>
-        /// Returns the next token from the token list
-        /// </summary>
-        /// <returns>The string value of the token</returns>
-        public string NextToken()
-        {
-            return NextToken(this.delimiters);
-        }
-
-        /// <summary>
-        /// Returns the next token from the source string, using the provided
-        /// token delimiters
-        /// </summary>
-        /// <param name="delimiters">String containing the delimiters to 
use</param>
-        /// <returns>The string value of the token</returns>
-        public string NextToken(string delimiters)
-        {
-            //According to documentation, the usage of the received delimiters 
should be temporary (only for this call).
-            //However, it seems it is not true, so the following line is 
necessary.
-            this.delimiters = delimiters;
-
-            //at the end 
-            if (this.currentPos == this.chars.Length)
-                throw new System.ArgumentOutOfRangeException();
-            //if over a delimiter and delimiters must be returned
-            else if ((System.Array.IndexOf(delimiters.ToCharArray(), 
chars[this.currentPos]) != -1)
-                     && this.includeDelims)
-                return "" + this.chars[this.currentPos++];
-            //need to get the token wo delimiters.
-            else
-                return nextToken(delimiters.ToCharArray());
-        }
-
-        //Returns the nextToken wo delimiters
-        private string nextToken(char[] delimiters)
-        {
-            string token = "";
-            long pos = this.currentPos;
-
-            //skip possible delimiters
-            while (System.Array.IndexOf(delimiters, this.chars[currentPos]) != 
-1)
-                //The last one is a delimiter (i.e there is no more tokens)
-                if (++this.currentPos == this.chars.Length)
-                {
-                    this.currentPos = pos;
-                    throw new System.ArgumentOutOfRangeException();
-                }
-
-            //getting the token
-            while (System.Array.IndexOf(delimiters, 
this.chars[this.currentPos]) == -1)
-            {
-               // don't use += to work around bug in compiler
-               // see https://bugzilla.novell.com/show_bug.cgi?id=372483
-                token = token + this.chars[this.currentPos];
-                //the last one is not a delimiter
-                if (++this.currentPos == this.chars.Length)
-                    break;
-            }
-            return token;
-        }
-
-
-        /// <summary>
-        /// Determines if there are more tokens to return from the source 
string
-        /// </summary>
-        /// <returns>True or false, depending if there are more 
tokens</returns>
-        public bool HasMoreTokens()
-        {
-            //keeping the current pos
-            long pos = this.currentPos;
-
-            try
-            {
-                this.NextToken();
-            }
-            catch (System.ArgumentOutOfRangeException)
-            {
-                return false;
-            }
-            finally
-            {
-                this.currentPos = pos;
-            }
-            return true;
-        }
-
-        /// <summary>
-        /// Remaining tokens count
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                //keeping the current pos
-                long pos = this.currentPos;
-                int i = 0;
-
-                try
-                {
-                    while (true)
-                    {
-                        this.NextToken();
-                        i++;
-                    }
-                }
-                catch (System.ArgumentOutOfRangeException)
-                {
-                    this.currentPos = pos;
-                    return i;
-                }
-            }
-        }
-
-        /// <summary>
-        ///  Performs the same action as NextToken.
-        /// </summary>
-        public System.Object Current
-        {
-            get
-            {
-                return (Object)this.NextToken();
-            }
-        }
-
-        /// <summary>
-        //  Performs the same action as HasMoreTokens.
-        /// </summary>
-        /// <returns>True or false, depending if there are more 
tokens</returns>
-        public bool MoveNext()
-        {
-            return this.HasMoreTokens();
-        }
-
-        /// <summary>
-        /// Does nothing.
-        /// </summary>
-        public void Reset()
-        {
-            ;
-        }
-    }
-}
+/// <summary>
+/// Copyright (C) 2004-2012 Free Software Foundation, Inc.
+///
+/// Author: Alexander Gnauck AG-Software, mailto:address@hidden
+///
+/// This file is part of GNU Libidn.
+///
+/// GNU Libidn is free software: you can redistribute it and/or
+/// modify it under the terms of either:
+///
+///   * the GNU Lesser General Public License as published by the Free
+///     Software Foundation; either version 3 of the License, or (at
+///     your option) any later version.
+///
+/// or
+///
+///   * the GNU General Public License as published by the Free
+///     Software Foundation; either version 2 of the License, or (at
+///     your option) any later version.
+///
+/// or both in parallel, as here.
+///
+/// GNU Libidn 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
+/// General Public License for more details.
+///
+/// You should have received copies of the GNU General Public License and
+/// the GNU Lesser General Public License along with this program.  If
+/// not, see <http://www.gnu.org/licenses/>.
+/// </summary>
+
+using System;
+using System.Collections;
+using System.Text;
+
+namespace gnu.inet.encoding.misc
+{
+    /// <summary>
+    /// The class performs token processing in strings
+    /// </summary>
+    public class Tokenizer : IEnumerator
+    {
+        /// Position over the string
+        private long currentPos = 0;
+
+        /// Include demiliters in the results.
+        private bool includeDelims = false;
+
+        /// Char representation of the String to tokenize.
+        private char[] chars = null;
+
+        //The tokenizer uses the default delimiter set: the space character, 
the tab character, the newline character, and the carriage-return character and 
the form-feed character
+        private string delimiters = " \t\n\r\f";
+
+        /// <summary>
+        /// Initializes a new class instance with a specified string to process
+        /// </summary>
+        /// <param name="source">String to tokenize</param>
+        public Tokenizer(string source)
+        {
+            this.chars = source.ToCharArray();
+        }
+
+        /// <summary>
+        /// Initializes a new class instance with a specified string to process
+        /// and the specified token delimiters to use
+        /// </summary>
+        /// <param name="source">String to tokenize</param>
+        /// <param name="delimiters">String containing the delimiters</param>
+        public Tokenizer(string source, string delimiters)
+            : this(source)
+        {
+            this.delimiters = delimiters;
+        }
+
+
+        /// <summary>
+        /// Initializes a new class instance with a specified string to 
process, the specified token
+        /// delimiters to use, and whether the delimiters must be included in 
the results.
+        /// </summary>
+        /// <param name="source">String to tokenize</param>
+        /// <param name="delimiters">String containing the delimiters</param>
+        /// <param name="includeDelims">Determines if delimiters are included 
in the results.</param>
+        public Tokenizer(string source, string delimiters, bool includeDelims)
+            : this(source, delimiters)
+        {
+            this.includeDelims = includeDelims;
+        }
+
+
+        /// <summary>
+        /// Returns the next token from the token list
+        /// </summary>
+        /// <returns>The string value of the token</returns>
+        public string NextToken()
+        {
+            return NextToken(this.delimiters);
+        }
+
+        /// <summary>
+        /// Returns the next token from the source string, using the provided
+        /// token delimiters
+        /// </summary>
+        /// <param name="delimiters">String containing the delimiters to 
use</param>
+        /// <returns>The string value of the token</returns>
+        public string NextToken(string delimiters)
+        {
+            //According to documentation, the usage of the received delimiters 
should be temporary (only for this call).
+            //However, it seems it is not true, so the following line is 
necessary.
+            this.delimiters = delimiters;
+
+            //at the end
+            if (this.currentPos == this.chars.Length)
+                throw new System.ArgumentOutOfRangeException();
+            //if over a delimiter and delimiters must be returned
+            else if ((System.Array.IndexOf(delimiters.ToCharArray(), 
chars[this.currentPos]) != -1)
+                     && this.includeDelims)
+                return "" + this.chars[this.currentPos++];
+            //need to get the token wo delimiters.
+            else
+                return nextToken(delimiters.ToCharArray());
+        }
+
+        //Returns the nextToken wo delimiters
+        private string nextToken(char[] delimiters)
+        {
+            string token = "";
+            long pos = this.currentPos;
+
+            //skip possible delimiters
+            while (System.Array.IndexOf(delimiters, this.chars[currentPos]) != 
-1)
+                //The last one is a delimiter (i.e there is no more tokens)
+                if (++this.currentPos == this.chars.Length)
+                {
+                    this.currentPos = pos;
+                    throw new System.ArgumentOutOfRangeException();
+                }
+
+            //getting the token
+            while (System.Array.IndexOf(delimiters, 
this.chars[this.currentPos]) == -1)
+            {
+               // don't use += to work around bug in compiler
+               // see https://bugzilla.novell.com/show_bug.cgi?id=372483
+                token = token + this.chars[this.currentPos];
+                //the last one is not a delimiter
+                if (++this.currentPos == this.chars.Length)
+                    break;
+            }
+            return token;
+        }
+
+
+        /// <summary>
+        /// Determines if there are more tokens to return from the source 
string
+        /// </summary>
+        /// <returns>True or false, depending if there are more 
tokens</returns>
+        public bool HasMoreTokens()
+        {
+            //keeping the current pos
+            long pos = this.currentPos;
+
+            try
+            {
+                this.NextToken();
+            }
+            catch (System.ArgumentOutOfRangeException)
+            {
+                return false;
+            }
+            finally
+            {
+                this.currentPos = pos;
+            }
+            return true;
+        }
+
+        /// <summary>
+        /// Remaining tokens count
+        /// </summary>
+        public int Count
+        {
+            get
+            {
+                //keeping the current pos
+                long pos = this.currentPos;
+                int i = 0;
+
+                try
+                {
+                    while (true)
+                    {
+                        this.NextToken();
+                        i++;
+                    }
+                }
+                catch (System.ArgumentOutOfRangeException)
+                {
+                    this.currentPos = pos;
+                    return i;
+                }
+            }
+        }
+
+        /// <summary>
+        ///  Performs the same action as NextToken.
+        /// </summary>
+        public System.Object Current
+        {
+            get
+            {
+                return (Object)this.NextToken();
+            }
+        }
+
+        /// <summary>
+        //  Performs the same action as HasMoreTokens.
+        /// </summary>
+        /// <returns>True or false, depending if there are more 
tokens</returns>
+        public bool MoveNext()
+        {
+            return this.HasMoreTokens();
+        }
+
+        /// <summary>
+        /// Does nothing.
+        /// </summary>
+        public void Reset()
+        {
+            ;
+        }
+    }
+}
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 2b42b3b..100eaf0 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -25,8 +25,10 @@ EXTRA_DIST = gdoc libidn.html libidn.ps libidn.pdf 
texinfo.css       \
        components.fig
 
 info_TEXINFOS = libidn.texi
-libidn_TEXINFOS = fdl-1.3.texi gpl-3.0.texi lgpl-2.1.texi $(gdoc_TEXINFOS) \
-       libidn-components.eps libidn-components.png libidn-components.pdf
+libidn_TEXINFOS = fdl-1.3.texi
+libidn_TEXINFOS += $(gdoc_TEXINFOS)
+libidn_TEXINFOS += libidn-components.eps libidn-components.png \
+                       libidn-components.pdf
 
 imagesdir = $(infodir)
 images_DATA = libidn-components.png
@@ -72,6 +74,6 @@ GDOC_MAN_PREFIX = man/
 GDOC_MAN_EXTRA_ARGS = -module $(PACKAGE) -sourceversion $(VERSION) \
        -bugsto $(PACKAGE_BUGREPORT) -pkg-name "$(PACKAGE_NAME)" \
        -includefuncprefix -seeinfo $(PACKAGE) \
-       -copyright "2002-2011 Simon Josefsson" \
+       -copyright "2002-2012 Simon Josefsson" \
        -verbatimcopying
 include $(srcdir)/Makefile.gdoci
diff --git a/doc/gpl-3.0.texi b/doc/gpl-3.0.texi
deleted file mode 100644
index 97a17e1..0000000
--- a/doc/gpl-3.0.texi
+++ /dev/null
@@ -1,717 +0,0 @@
address@hidden The GNU General Public License.
address@hidden Version 3, 29 June 2007
-
address@hidden This file is intended to be included within another document,
address@hidden hence no sectioning command or @node.
-
address@hidden
-Copyright @copyright{} 2007 Free Software Foundation, Inc. 
@url{http://fsf.org/}
-
-Everyone is permitted to copy and distribute verbatim copies of this
-license document, but changing it is not allowed.
address@hidden display
-
address@hidden Preamble
-
-The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom
-to share and change all versions of a program---to make sure it remains
-free software for all its users.  We, the Free Software Foundation,
-use the GNU General Public License for most of our software; it
-applies also to any other work released this way by its authors.  You
-can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you
-have certain responsibilities if you distribute copies of the
-software, or if you modify it: responsibilities to respect the freedom
-of others.
-
-For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too,
-receive or can get the source code.  And you must show them these
-terms so they know their rights.
-
-Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the
-manufacturer can do so.  This is fundamentally incompatible with the
-aim of protecting users' freedom to change the software.  The
-systematic pattern of such abuse occurs in the area of products for
-individuals to use, which is precisely where it is most unacceptable.
-Therefore, we have designed this version of the GPL to prohibit the
-practice for those products.  If such problems arise substantially in
-other domains, we stand ready to extend this provision to those
-domains in future versions of the GPL, as needed to protect the
-freedom of users.
-
-Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish
-to avoid the special danger that patents applied to a free program
-could make it effectively proprietary.  To prevent this, the GPL
-assures that patents cannot be used to render the program non-free.
-
-The precise terms and conditions for copying, distribution and
-modification follow.
-
address@hidden TERMS AND CONDITIONS
-
address@hidden 0
address@hidden Definitions.
-
-``This License'' refers to version 3 of the GNU General Public License.
-
-``Copyright'' also means copyright-like laws that apply to other kinds
-of works, such as semiconductor masks.
-
-``The Program'' refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as ``you''.  ``Licensees'' and
-``recipients'' may be individuals or organizations.
-
-To ``modify'' a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of
-an exact copy.  The resulting work is called a ``modified version'' of
-the earlier work or a work ``based on'' the earlier work.
-
-A ``covered work'' means either the unmodified Program or a work based
-on the Program.
-
-To ``propagate'' a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-To ``convey'' a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user
-through a computer network, with no transfer of a copy, is not
-conveying.
-
-An interactive user interface displays ``Appropriate Legal Notices'' to
-the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
address@hidden Source Code.
-
-The ``source code'' for a work means the preferred form of the work for
-making modifications to it.  ``Object code'' means any non-source form
-of a work.
-
-A ``Standard Interface'' means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-The ``System Libraries'' of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-``Major Component'', in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-The ``Corresponding Source'' for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-The Corresponding Source need not include anything that users can
-regenerate automatically from other parts of the Corresponding Source.
-
-The Corresponding Source for a work in source code form is that same
-work.
-
address@hidden Basic Permissions.
-
-All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-You may make, run and propagate covered works that you do not convey,
-without conditions so long as your license otherwise remains in force.
-You may convey covered works to others for the sole purpose of having
-them make modifications exclusively for you, or provide you with
-facilities for running those works, provided that you comply with the
-terms of this License in conveying all material for which you do not
-control copyright.  Those thus making or running the covered works for
-you must do so exclusively on your behalf, under your direction and
-control, on terms that prohibit them from making any copies of your
-copyrighted material outside their relationship with you.
-
-Conveying under any other circumstances is permitted solely under the
-conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
address@hidden Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such
-circumvention is effected by exercising rights under this License with
-respect to the covered work, and you disclaim any intention to limit
-operation or modification of the work as a means of enforcing, against
-the work's users, your or third parties' legal rights to forbid
-circumvention of technological measures.
-
address@hidden Conveying Verbatim Copies.
-
-You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
address@hidden Conveying Modified Source Versions.
-
-You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these
-conditions:
-
address@hidden a
address@hidden
-The work must carry prominent notices stating that you modified it,
-and giving a relevant date.
-
address@hidden
-The work must carry prominent notices stating that it is released
-under this License and any conditions added under section 7.  This
-requirement modifies the requirement in section 4 to ``keep intact all
-notices''.
-
address@hidden
-You must license the entire work, as a whole, under this License to
-anyone who comes into possession of a copy.  This License will
-therefore apply, along with any applicable section 7 additional terms,
-to the whole of the work, and all its parts, regardless of how they
-are packaged.  This License gives no permission to license the work in
-any other way, but it does not invalidate such permission if you have
-separately received it.
-
address@hidden
-If the work has interactive user interfaces, each must display
-Appropriate Legal Notices; however, if the Program has interactive
-interfaces that do not display Appropriate Legal Notices, your work
-need not make them do so.
address@hidden enumerate
-
-A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-``aggregate'' if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
address@hidden  Conveying Non-Source Forms.
-
-You may convey a covered work in object code form under the terms of
-sections 4 and 5, provided that you also convey the machine-readable
-Corresponding Source under the terms of this License, in one of these
-ways:
-
address@hidden a
address@hidden
-Convey the object code in, or embodied in, a physical product
-(including a physical distribution medium), accompanied by the
-Corresponding Source fixed on a durable physical medium customarily
-used for software interchange.
-
address@hidden
-Convey the object code in, or embodied in, a physical product
-(including a physical distribution medium), accompanied by a written
-offer, valid for at least three years and valid for as long as you
-offer spare parts or customer support for that product model, to give
-anyone who possesses the object code either (1) a copy of the
-Corresponding Source for all the software in the product that is
-covered by this License, on a durable physical medium customarily used
-for software interchange, for a price no more than your reasonable
-cost of physically performing this conveying of source, or (2) access
-to copy the Corresponding Source from a network server at no charge.
-
address@hidden
-Convey individual copies of the object code with a copy of the written
-offer to provide the Corresponding Source.  This alternative is
-allowed only occasionally and noncommercially, and only if you
-received the object code with such an offer, in accord with subsection
-6b.
-
address@hidden
-Convey the object code by offering access from a designated place
-(gratis or for a charge), and offer equivalent access to the
-Corresponding Source in the same way through the same place at no
-further charge.  You need not require recipients to copy the
-Corresponding Source along with the object code.  If the place to copy
-the object code is a network server, the Corresponding Source may be
-on a different server (operated by you or a third party) that supports
-equivalent copying facilities, provided you maintain clear directions
-next to the object code saying where to find the Corresponding Source.
-Regardless of what server hosts the Corresponding Source, you remain
-obligated to ensure that it is available for as long as needed to
-satisfy these requirements.
-
address@hidden
-Convey the object code using peer-to-peer transmission, provided you
-inform other peers where the object code and Corresponding Source of
-the work are being offered to the general public at no charge under
-subsection 6d.
-
address@hidden enumerate
-
-A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-A ``User Product'' is either (1) a ``consumer product'', which means any
-tangible personal property which is normally used for personal,
-family, or household purposes, or (2) anything designed or sold for
-incorporation into a dwelling.  In determining whether a product is a
-consumer product, doubtful cases shall be resolved in favor of
-coverage.  For a particular product received by a particular user,
-``normally used'' refers to a typical or common use of that class of
-product, regardless of the status of the particular user or of the way
-in which the particular user actually uses, or expects or is expected
-to use, the product.  A product is a consumer product regardless of
-whether the product has substantial commercial, industrial or
-non-consumer uses, unless such uses represent the only significant
-mode of use of the product.
-
-``Installation Information'' for a User Product means any methods,
-procedures, authorization keys, or other information required to
-install and execute modified versions of a covered work in that User
-Product from a modified version of its Corresponding Source.  The
-information must suffice to ensure that the continued functioning of
-the modified object code is in no case prevented or interfered with
-solely because modification has been made.
-
-If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or
-updates for a work that has been modified or installed by the
-recipient, or for the User Product in which it has been modified or
-installed.  Access to a network may be denied when the modification
-itself materially and adversely affects the operation of the network
-or violates the rules and protocols for communication across the
-network.
-
-Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
address@hidden Additional Terms.
-
-``Additional permissions'' are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders
-of that material) supplement the terms of this License with terms:
-
address@hidden a
address@hidden
-Disclaiming warranty or limiting liability differently from the terms
-of sections 15 and 16 of this License; or
-
address@hidden
-Requiring preservation of specified reasonable legal notices or author
-attributions in that material or in the Appropriate Legal Notices
-displayed by works containing it; or
-
address@hidden
-Prohibiting misrepresentation of the origin of that material, or
-requiring that modified versions of such material be marked in
-reasonable ways as different from the original version; or
-
address@hidden
-Limiting the use for publicity purposes of names of licensors or
-authors of the material; or
-
address@hidden
-Declining to grant rights under trademark law for use of some trade
-names, trademarks, or service marks; or
-
address@hidden
-Requiring indemnification of licensors and authors of that material by
-anyone who conveys the material (or modified versions of it) with
-contractual assumptions of liability to the recipient, for any
-liability that these contractual assumptions directly impose on those
-licensors and authors.
address@hidden enumerate
-
-All other non-permissive additional terms are considered ``further
-restrictions'' within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions; the
-above requirements apply either way.
-
address@hidden Termination.
-
-You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-However, if you cease all violation of this License, then your license
-from a particular copyright holder is reinstated (a) provisionally,
-unless and until the copyright holder explicitly and finally
-terminates your license, and (b) permanently, if the copyright holder
-fails to notify you of the violation by some reasonable means prior to
-60 days after the cessation.
-
-Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
address@hidden Acceptance Not Required for Having Copies.
-
-You are not required to accept this License in order to receive or run
-a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
address@hidden Automatic Licensing of Downstream Recipients.
-
-Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-An ``entity transaction'' is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
address@hidden Patents.
-
-A ``contributor'' is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's ``contributor version''.
-
-A contributor's ``essential patent claims'' are all patent claims owned
-or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, ``control'' includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-In the following three paragraphs, a ``patent license'' is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To ``grant'' such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  ``Knowingly relying'' means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-A patent license is ``discriminatory'' if it does not include within the
-scope of its coverage, prohibits the exercise of, or is conditioned on
-the non-exercise of one or more of the rights that are specifically
-granted under this License.  You may not convey a covered work if you
-are a party to an arrangement with a third party that is in the
-business of distributing software, under which you make payment to the
-third party based on the extent of your activity of conveying the
-work, and under which the third party grants, to any of the parties
-who would receive the covered work from you, a discriminatory patent
-license (a) in connection with copies of the covered work conveyed by
-you (or copies made from those copies), or (b) primarily for and in
-connection with specific products or compilations that contain the
-covered work, unless you entered into that arrangement, or that patent
-license was granted, prior to 28 March 2007.
-
-Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
address@hidden No Surrender of Others' Freedom.
-
-If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey
-a covered work so as to satisfy simultaneously your obligations under
-this License and any other pertinent obligations, then as a
-consequence you may not convey it at all.  For example, if you agree
-to terms that obligate you to collect a royalty for further conveying
-from those to whom you convey the Program, the only way you could
-satisfy both those terms and this License would be to refrain entirely
-from conveying the Program.
-
address@hidden Use with the GNU Affero General Public License.
-
-Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
address@hidden Revised Versions of this License.
-
-The Free Software Foundation may publish revised and/or new versions
-of the GNU General Public License from time to time.  Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies that a certain numbered version of the GNU General Public
-License ``or any later version'' applies to it, you have the option of
-following the terms and conditions either of that numbered version or
-of any later version published by the Free Software Foundation.  If
-the Program does not specify a version number of the GNU General
-Public License, you may choose any version ever published by the Free
-Software Foundation.
-
-If the Program specifies that a proxy can decide which future versions
-of the GNU General Public License can be used, that proxy's public
-statement of acceptance of a version permanently authorizes you to
-choose that version for the Program.
-
-Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
address@hidden Disclaimer of Warranty.
-
-THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
-WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE
-DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
-CORRECTION.
-
address@hidden Limitation of Liability.
-
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
-CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
-NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
-LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
-TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
-PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
address@hidden Interpretation of Sections 15 and 16.
-
-If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
address@hidden enumerate
-
address@hidden END OF TERMS AND CONDITIONS
-
address@hidden How to Apply These Terms to Your New Programs
-
-If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these
-terms.
-
-To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the ``copyright'' line and a pointer to where the full notice is found.
-
address@hidden
address@hidden line to give the program's name and a brief idea of what it 
does.}
-Copyright (C) @var{year} @var{name of author}
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or (at
-your option) any later version.
-
-This program 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
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see @url{http://www.gnu.org/licenses/}.
address@hidden smallexample
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
address@hidden
address@hidden Copyright (C) @var{year} @var{name of author}
-This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type @samp{show c} for details.
address@hidden smallexample
-
-The hypothetical commands @samp{show w} and @samp{show c} should show
-the appropriate parts of the General Public License.  Of course, your
-program's commands might be different; for a GUI interface, you would
-use an ``about box''.
-
-You should also get your employer (if you work as a programmer) or school,
-if any, to sign a ``copyright disclaimer'' for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
address@hidden://www.gnu.org/licenses/}.
-
-The GNU General Public License does not permit incorporating your
-program into proprietary programs.  If your program is a subroutine
-library, you may consider it more useful to permit linking proprietary
-applications with the library.  If this is what you want to do, use
-the GNU Lesser General Public License instead of this License.  But
-first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
diff --git a/doc/lgpl-2.1.texi b/doc/lgpl-2.1.texi
deleted file mode 100644
index ab03d6c..0000000
--- a/doc/lgpl-2.1.texi
+++ /dev/null
@@ -1,549 +0,0 @@
address@hidden The GNU Lesser General Public License.
address@hidden Version 2.1, February 1999
-
address@hidden This file is intended to be included within another document,
address@hidden hence no sectioning command or @node.
-
address@hidden
-Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
-as the successor of the GNU Library Public License, version 2, hence the
-version number 2.1.]
address@hidden display
-
address@hidden Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software---to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software---typically libraries---of the Free
-Software Foundation and other authors who decide to use it.  You can use
-it too, but we suggest you first think carefully about whether this
-license or the ordinary General Public License is the better strategy to
-use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of it
-in new free programs; and that you are informed that you can do these
-things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the @dfn{Lesser} General Public License because it
-does @emph{Less} to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-``work based on the library'' and a ``work that uses the library''.  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
address@hidden TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
address@hidden 0
address@hidden
-This License Agreement applies to any software library or other program
-which contains a notice placed by the copyright holder or other
-authorized party saying it may be distributed under the terms of this
-Lesser General Public License (also called ``this License'').  Each
-licensee is addressed as ``you''.
-
-  A ``library'' means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The ``Library'', below, refers to any such software library or work
-which has been distributed under these terms.  A ``work based on the
-Library'' means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term ``modification''.)
-
-  ``Source code'' for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
address@hidden
-You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
address@hidden
-You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
address@hidden a
address@hidden
-The modified work must itself be a software library.
-
address@hidden
-You must cause the files modified to carry prominent notices
-stating that you changed the files and the date of any change.
-
address@hidden
-You must cause the whole of the work to be licensed at no
-charge to all third parties under the terms of this License.
-
address@hidden
-If a facility in the modified Library refers to a function or a
-table of data to be supplied by an application program that uses
-the facility, other than as an argument passed when the facility
-is invoked, then you must make a good faith effort to ensure that,
-in the event an application does not supply such function or
-table, the facility still operates, and performs whatever part of
-its purpose remains meaningful.
-
-(For example, a function in a library to compute square roots has
-a purpose that is entirely well-defined independent of the
-application.  Therefore, Subsection 2d requires that any
-application-supplied function or table used by this function must
-be optional: if the application does not supply it, the square
-root function must still compute square roots.)
address@hidden enumerate
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
address@hidden
-You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
address@hidden
-You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
address@hidden
-A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a ``work that uses the Library''.  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a ``work that uses the Library'' with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a ``work that uses the
-library''.  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a ``work that uses the Library'' uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
address@hidden
-As an exception to the Sections above, you may also combine or
-link a ``work that uses the Library'' with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
address@hidden a
address@hidden
-Accompany the work with the complete corresponding
-machine-readable source code for the Library including whatever
-changes were used in the work (which must be distributed under
-Sections 1 and 2 above); and, if the work is an executable linked
-with the Library, with the complete machine-readable ``work that
-uses the Library'', as object code and/or source code, so that the
-user can modify the Library and then relink to produce a modified
-executable containing the modified Library.  (It is understood
-that the user who changes the contents of definitions files in the
-Library will not necessarily be able to recompile the application
-to use the modified definitions.)
-
address@hidden
-Use a suitable shared library mechanism for linking with the Library.  A
-suitable mechanism is one that (1) uses at run time a copy of the
-library already present on the user's computer system, rather than
-copying library functions into the executable, and (2) will operate
-properly with a modified version of the library, if the user installs
-one, as long as the modified version is interface-compatible with the
-version that the work was made with.
-
address@hidden
-Accompany the work with a written offer, valid for at
-least three years, to give the same user the materials
-specified in Subsection 6a, above, for a charge no more
-than the cost of performing this distribution.
-
address@hidden
-If distribution of the work is made by offering access to copy
-from a designated place, offer equivalent access to copy the above
-specified materials from the same place.
-
address@hidden
-Verify that the user has already received a copy of these
-materials or that you have already sent this user a copy.
address@hidden enumerate
-
-  For an executable, the required form of the ``work that uses the
-Library'' must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies the
-executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
address@hidden
-You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
address@hidden a
address@hidden
-Accompany the combined library with a copy of the same work
-based on the Library, uncombined with any other library
-facilities.  This must be distributed under the terms of the
-Sections above.
-
address@hidden
-Give prominent notice with the combined library of the fact
-that part of it is a work based on the Library, and explaining
-where to find the accompanying uncombined form of the same work.
address@hidden enumerate
-
address@hidden
-You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
address@hidden
-You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
address@hidden
-Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
address@hidden
-If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
address@hidden
-If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
address@hidden
-The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-``any later version'', you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
address@hidden
-If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
address@hidden @b{NO WARRANTY}
-
address@hidden
-BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY ``AS IS'' WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
address@hidden
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
address@hidden enumerate
-
address@hidden END OF TERMS AND CONDITIONS
-
address@hidden
address@hidden How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-``copyright'' line and a pointer to where the full notice is found.
-
address@hidden
address@hidden line to give the library's name and an idea of what it does.}
-Copyright (C) @var{year}  @var{name of author}
-
-This 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.
-
-This 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 this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-USA.
address@hidden smallexample
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a ``copyright disclaimer'' for the library, if
-necessary.  Here is a sample; alter the names:
-
address@hidden
-Yoyodyne, Inc., hereby disclaims all copyright interest in the library
-`Frob' (a library for tweaking knobs) written by James Random Hacker.
-
address@hidden of Ty Coon}, 1 April 1990
-Ty Coon, President of Vice
address@hidden smallexample
-
-That's all there is to it!
diff --git a/doc/libidn.texi b/doc/libidn.texi
index 67258e2..d9ff83c 100644
--- a/doc/libidn.texi
+++ b/doc/libidn.texi
@@ -81,7 +81,7 @@ Appendices
 
 * PR29 discussion::             Implementation aspects of the PR29 flaw.
 * On Label Separators::         Discussions of a flaw in the IDNA spec.
-* Copying Information::                License text covering the Libidn 
library.
+* Copying Information::                License texts.
 
 Indices
 
@@ -96,11 +96,10 @@ Indices
 
 GNU Libidn is a fully documented implementation of the Stringprep,
 Punycode and IDNA specifications.  Libidn's purpose is to encode and
-decode internationalized domain names.  The native C, C# and Java
-libraries are available under the GNU Lesser General Public License
-version 2.1 or later (@pxref{GNU LGPL}).
+decode internationalized domain name strings.  There are native C, C#
+and Java libraries.
 
-The library contains a generic Stringprep implementation.  Profiles
+The C library contains a generic Stringprep implementation.  Profiles
 for Nameprep, iSCSI, SASL, XMPP and Kerberos V5 are included.
 Punycode and ASCII Compatible Encoding (ACE) via IDNA are supported.
 A mechanism to define Top-Level Domain (TLD) specific validation
@@ -132,8 +131,7 @@ C++, Emacs Lisp, Python and Java.  A native Java and C# 
port is
 included.
 
 Also included is a command line tool, several self tests, code
-examples, and more, all licensed under the GNU General Public License
-version 3.0 or later (@pxref{GNU GPL}).
+examples, and more.
 
 @menu
 * Getting Started::
@@ -176,9 +174,8 @@ doing a similar job.
 
 @table @asis
 @item It's Free Software
-Anybody can use, modify, and redistribute it under the terms of the
-GNU Lesser General Public License version 2.1 or later (@pxref{GNU
-LGPL}).
+Anybody can use, modify, and redistribute it under the terms of a free
+software license.
 
 @item It's thread-safe
 No global state is kept in the library.  All functions are re-entrant.
@@ -1543,8 +1540,8 @@ xn--rksmrgs-5wao1o.se
 jas@@latte:~$
 @end example
 
-Reading input from command line, and disabling copyright and license
-information:
+Reading input from command line, and disable printing copyright and
+license information:
 
 @example
 jas@@latte:~$ idn --quiet r@"aksm@"address@hidden address@hidden@address@hidden
@@ -2152,8 +2149,6 @@ recommended way to work around this problem.
 
 @menu
 * GNU Free Documentation License::   License for copying this manual.
-* GNU LGPL::                         License for copying the library.
-* GNU GPL::                          License for copying the programs.
 @end menu
 
 @node GNU Free Documentation License
@@ -2163,20 +2158,6 @@ recommended way to work around this problem.
 
 @include fdl-1.3.texi
 
address@hidden GNU LGPL
address@hidden GNU Lesser General Public License
address@hidden LGPL, GNU Lesser General Public License
address@hidden License, GNU LGPL
-
address@hidden lgpl-2.1.texi
-
address@hidden GNU GPL
address@hidden GNU General Public License
address@hidden GPL, GNU General Public License
address@hidden License, GNU GPL
-
address@hidden gpl-3.0.texi
-
 @node Function and Variable Index
 @unnumbered Function and Variable Index
 
diff --git a/doc/reference/libidn-docs.sgml b/doc/reference/libidn-docs.sgml
index 1362e30..a432b9d 100644
--- a/doc/reference/libidn-docs.sgml
+++ b/doc/reference/libidn-docs.sgml
@@ -21,13 +21,12 @@
     <para>
 GNU Libidn is a fully documented implementation of the Stringprep,
 Punycode and IDNA specifications.  Libidn's purpose is to encode and
-decode internationalized domain names.  The native C, C# and Java
-libraries are available under the GNU Lesser General Public License
-version 2.1 or later.
+decode internationalized domain name strings.  There are native C, C#
+and Java libraries.
     </para>
 
     <para>
-The library contains a generic Stringprep implementation.  Profiles
+The C library contains a generic Stringprep implementation.  Profiles
 for Nameprep, iSCSI, SASL, XMPP and Kerberos V5 are included.
 Punycode and ASCII Compatible Encoding (ACE) via IDNA are supported.
 A mechanism to define Top-Level Domain (TLD) specific validation
@@ -67,9 +66,7 @@ included.
 
     <para>
 Also included is a command line tool, several self tests, code
-examples, and more, all licensed under the GNU General Public License
-version 3.0 or later.
-    </para>
+examples, and more.
 
     <para>
       The internal layout of the library, and how your application
diff --git a/gl/Makefile.am b/gl/Makefile.am
index e63f896..aaf9cf1 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=build-aux --with-tests --avoid=fcntl-h-tests 
--avoid=stdlib-tests --avoid=string-tests --avoid=sys_stat-tests 
--avoid=time-tests --avoid=unistd-tests --avoid=update-copyright-tests 
--avoid=wchar-tests --no-conditional-dependencies --libtool --macro-prefix=gl 
--no-vc-files autobuild csharpcomp-script csharpexec-script error fdl-1.3 
gendocs getopt-gnu gnupload gpl-3.0 lgpl-2.1 maintainer-makefile manywarnings 
pmccabe2html progname update-copyright useless-if-before-free valgrind-tests 
vc-list-files version-etc warnings
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=build-aux --with-tests --avoid=fcntl-h-tests 
--avoid=stdlib-tests --avoid=string-tests --avoid=sys_stat-tests 
--avoid=time-tests --avoid=unistd-tests --avoid=update-copyright-tests 
--avoid=wchar-tests --no-conditional-dependencies --libtool --macro-prefix=gl 
--no-vc-files autobuild csharpcomp-script csharpexec-script error fdl-1.3 
gendocs getopt-gnu gnupload maintainer-makefile manywarnings pmccabe2html 
progname update-copyright useless-if-before-free valgrind-tests vc-list-files 
version-etc warnings
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
diff --git a/gl/error.c b/gl/error.c
index b253ef7..dc8c65f 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -54,7 +54,7 @@
    function without parameters instead.  */
 void (*error_print_progname) (void);
 
-/* This variable is incremented each time `error' is called.  */
+/* This variable is incremented each time 'error' is called.  */
 unsigned int error_message_count;
 
 #ifdef _LIBC
@@ -65,7 +65,7 @@ unsigned int error_message_count;
 # include <limits.h>
 # include <libio/libioP.h>
 
-/* In GNU libc we want do not want to use the common name `error' directly.
+/* In GNU libc we want do not want to use the common name 'error' directly.
    Instead make it a weak alias.  */
 extern void __error (int status, int errnum, const char *message, ...)
      __attribute__ ((__format__ (__printf__, 3, 4)));
@@ -89,7 +89,7 @@ extern void __error_at_line (int status, int errnum, const 
char *file_name,
 # include <unistd.h>
 
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 #  define WIN32_LEAN_AND_MEAN
 #  include <windows.h>
 /* Get _get_osfhandle.  */
@@ -125,9 +125,10 @@ static inline int
 is_open (int fd)
 {
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-  /* On Win32: The initial state of unassigned standard file descriptors is
-     that they are open but point to an INVALID_HANDLE_VALUE.  There is no
-     fcntl, and the gnulib replacement fcntl does not support F_GETFL.  */
+  /* On native Windows: The initial state of unassigned standard file
+     descriptors is that they are open but point to an INVALID_HANDLE_VALUE.
+     There is no fcntl, and the gnulib replacement fcntl does not support
+     F_GETFL.  */
   return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
 # else
 #  ifndef F_GETFL
diff --git a/gl/error.h b/gl/error.h
index 5bcdf0d..9c2cb8b 100644
--- a/gl/error.h
+++ b/gl/error.h
@@ -35,9 +35,9 @@
 extern "C" {
 #endif
 
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
+/* Print a message with 'fprintf (stderr, FORMAT, ...)';
    if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
-   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
+   If STATUS is nonzero, terminate the program with 'exit (STATUS)'.  */
 
 extern void error (int __status, int __errnum, const char *__format, ...)
      _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
@@ -51,7 +51,7 @@ extern void error_at_line (int __status, int __errnum, const 
char *__fname,
    function without parameters instead.  */
 extern void (*error_print_progname) (void);
 
-/* This variable is incremented each time `error' is called.  */
+/* This variable is incremented each time 'error' is called.  */
 extern unsigned int error_message_count;
 
 /* Sometimes we want to have at most one error per line.  This
diff --git a/gl/getopt.c b/gl/getopt.c
index 807375a..4342a34 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -41,15 +41,15 @@
 # include <wchar.h>
 #endif
 
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
+/* This version of 'getopt' appears to the caller like standard Unix 'getopt'
    but it behaves differently for the user, since it allows the user
    to intersperse the options with the other arguments.
 
-   As `getopt_long' works, it permutes the elements of ARGV so that,
+   As 'getopt_long' works, it permutes the elements of ARGV so that,
    when it is done, all the options precede everything else.  Thus
    all application programs are extended to handle flexible argument order.
 
-   Using `getopt' or setting the environment variable POSIXLY_CORRECT
+   Using 'getopt' or setting the environment variable POSIXLY_CORRECT
    disables permutation.
    Then the behavior is completely standard.
 
@@ -58,24 +58,24 @@
 
 #include "getopt_int.h"
 
-/* For communication from `getopt' to the caller.
-   When `getopt' finds an option that takes an argument,
+/* For communication from 'getopt' to the caller.
+   When 'getopt' finds an option that takes an argument,
    the argument value is returned here.
-   Also, when `ordering' is RETURN_IN_ORDER,
+   Also, when 'ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
 char *optarg;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
-   and for communication between successive calls to `getopt'.
+   and for communication between successive calls to 'getopt'.
 
-   On entry to `getopt', zero means this is the first call; initialize.
+   On entry to 'getopt', zero means this is the first call; initialize.
 
-   When `getopt' returns -1, this is the index of the first of the
+   When 'getopt' returns -1, this is the index of the first of the
    non-option elements that the caller should itself scan.
 
-   Otherwise, `optind' communicates from one call to the next
+   Otherwise, 'optind' communicates from one call to the next
    how much of ARGV has been scanned so far.  */
 
 /* 1003.2 says this must be 1 before any call.  */
@@ -137,7 +137,7 @@ extern char *__getopt_nonoption_flags;
    The other is elements [last_nonopt,optind), which contains all
    the options processed since those non-options were skipped.
 
-   `first_nonopt' and `last_nonopt' are relocated so that they describe
+   'first_nonopt' and 'last_nonopt' are relocated so that they describe
    the new indices of the non-options in ARGV after they are moved.  */
 
 static void
@@ -154,7 +154,7 @@ exchange (char **argv, struct _getopt_data *d)
      but it consists of two parts that need to be swapped next.  */
 
 #if defined _LIBC && defined USE_NONOPTION_FLAGS
-  /* First make sure the handling of the `__getopt_nonoption_flags'
+  /* First make sure the handling of the '__getopt_nonoption_flags'
      string can work normally.  Our top argument must be in the range
      of the string.  */
   if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
@@ -291,48 +291,48 @@ _getopt_initialize (int argc _GL_UNUSED,
 
    If an element of ARGV starts with '-', and is not exactly "-" or "--",
    then it is an option element.  The characters of this element
-   (aside from the initial '-') are option characters.  If `getopt'
+   (aside from the initial '-') are option characters.  If 'getopt'
    is called repeatedly, it returns successively each of the option characters
    from each of the option elements.
 
-   If `getopt' finds another option character, it returns that character,
-   updating `optind' and `nextchar' so that the next call to `getopt' can
+   If 'getopt' finds another option character, it returns that character,
+   updating 'optind' and 'nextchar' so that the next call to 'getopt' can
    resume the scan with the following option character or ARGV-element.
 
-   If there are no more option characters, `getopt' returns -1.
-   Then `optind' is the index in ARGV of the first ARGV-element
+   If there are no more option characters, 'getopt' returns -1.
+   Then 'optind' is the index in ARGV of the first ARGV-element
    that is not an option.  (The ARGV-elements have been permuted
    so that those that are not options now come last.)
 
    OPTSTRING is a string containing the legitimate option characters.
    If an option character is seen that is not listed in OPTSTRING,
-   return '?' after printing an error message.  If you set `opterr' to
+   return '?' after printing an error message.  If you set 'opterr' to
    zero, the error message is suppressed but we still return '?'.
 
    If a char in OPTSTRING is followed by a colon, that means it wants an arg,
    so the following text in the same ARGV-element, or the text of the following
-   ARGV-element, is returned in `optarg'.  Two colons mean an option that
+   ARGV-element, is returned in 'optarg'.  Two colons mean an option that
    wants an optional arg; if there is text in the current ARGV-element,
-   it is returned in `optarg', otherwise `optarg' is set to zero.
+   it is returned in 'optarg', otherwise 'optarg' is set to zero.
 
-   If OPTSTRING starts with `-' or `+', it requests different methods of
+   If OPTSTRING starts with '-' or '+', it requests different methods of
    handling the non-option ARGV-elements.
    See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
 
-   Long-named options begin with `--' instead of `-'.
+   Long-named options begin with '--' instead of '-'.
    Their names may be abbreviated as long as the abbreviation is unique
    or is an exact match for some defined option.  If they have an
    argument, it follows the option name in the same ARGV-element, separated
-   from the option name by a `=', or else the in next ARGV-element.
-   When `getopt' finds a long-named option, it returns 0 if that option's
-   `flag' field is nonzero, the value of the option's `val' field
-   if the `flag' field is zero.
+   from the option name by a '=', or else the in next ARGV-element.
+   When 'getopt' finds a long-named option, it returns 0 if that option's
+   'flag' field is nonzero, the value of the option's 'val' field
+   if the 'flag' field is zero.
 
    The elements of ARGV aren't really const, because we permute them.
    But we pretend they're const in the prototype to be compatible
    with other systems.
 
-   LONGOPTS is a vector of `struct option' terminated by an
+   LONGOPTS is a vector of 'struct option' terminated by an
    element containing a name which is zero.
 
    LONGIND returns the index in LONGOPT of the long-named option found.
@@ -409,7 +409,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
           d->__last_nonopt = d->optind;
         }
 
-      /* The special ARGV-element `--' means premature end of options.
+      /* The special ARGV-element '--' means premature end of options.
          Skip it like a null option,
          then exchange with previous non-options as if it were an option,
          then skip everything else like a non-option.  */
@@ -788,7 +788,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
     char c = *d->__nextchar++;
     const char *temp = strchr (optstring, c);
 
-    /* Increment `optind' when we start to process its last character.  */
+    /* Increment 'optind' when we start to process its last character.  */
     if (*d->__nextchar == '\0')
       ++d->optind;
 
@@ -887,7 +887,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
             return c;
           }
         else
-          /* We already incremented `d->optind' once;
+          /* We already incremented 'd->optind' once;
              increment it again when taking next ARGV-elt as argument.  */
           d->optarg = argv[d->optind++];
 
@@ -1114,7 +1114,7 @@ _getopt_internal_r (int argc, char **argv, const char 
*optstring,
                   c = '?';
               }
             else
-              /* We already incremented `optind' once;
+              /* We already incremented 'optind' once;
                  increment it again when taking next ARGV-elt as argument.  */
               d->optarg = argv[d->optind++];
             d->__nextchar = NULL;
@@ -1177,7 +1177,7 @@ __posix_getopt (int argc, char *const *argv, const char 
*optstring)
 #ifdef TEST
 
 /* Compile with -DTEST to make an executable for use in testing
-   the above definition of `getopt'.  */
+   the above definition of 'getopt'.  */
 
 int
 main (int argc, char **argv)
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index 1bf2afe..06b6dfc 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -82,7 +82,7 @@
    getopt_long_only can permute argv; this is required for backward
    compatibility (e.g., for LSB 2.0.1).
 
-   This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
+   This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt',
    but it caused redefinition warnings if both unistd.h and getopt.h were
    included, since unistd.h includes getopt.h having previously defined
    __need_getopt.
@@ -128,29 +128,29 @@
 extern "C" {
 #endif
 
-/* For communication from `getopt' to the caller.
-   When `getopt' finds an option that takes an argument,
+/* For communication from 'getopt' to the caller.
+   When 'getopt' finds an option that takes an argument,
    the argument value is returned here.
-   Also, when `ordering' is RETURN_IN_ORDER,
+   Also, when 'ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
 extern char *optarg;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
-   and for communication between successive calls to `getopt'.
+   and for communication between successive calls to 'getopt'.
 
-   On entry to `getopt', zero means this is the first call; initialize.
+   On entry to 'getopt', zero means this is the first call; initialize.
 
-   When `getopt' returns -1, this is the index of the first of the
+   When 'getopt' returns -1, this is the index of the first of the
    non-option elements that the caller should itself scan.
 
-   Otherwise, `optind' communicates from one call to the next
+   Otherwise, 'optind' communicates from one call to the next
    how much of ARGV has been scanned so far.  */
 
 extern int optind;
 
-/* Callers store zero here to inhibit the error message `getopt' prints
+/* Callers store zero here to inhibit the error message 'getopt' prints
    for unrecognized options.  */
 
 extern int opterr;
@@ -162,24 +162,24 @@ extern int optopt;
 #ifndef __need_getopt
 /* Describe the long-named options requested by the application.
    The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
-   of `struct option' terminated by an element containing a name which is
+   of 'struct option' terminated by an element containing a name which is
    zero.
 
-   The field `has_arg' is:
+   The field 'has_arg' is:
    no_argument          (or 0) if the option does not take an argument,
    required_argument    (or 1) if the option requires an argument,
    optional_argument    (or 2) if the option takes an optional argument.
 
-   If the field `flag' is not NULL, it points to a variable that is set
-   to the value given in the field `val' when the option is found, but
+   If the field 'flag' is not NULL, it points to a variable that is set
+   to the value given in the field 'val' when the option is found, but
    left unchanged if the option is not found.
 
-   To have a long-named option do something other than set an `int' to
-   a compiled-in constant, such as set a value from `optarg', set the
-   option's `flag' field to zero and its `val' field to a nonzero
+   To have a long-named option do something other than set an 'int' to
+   a compiled-in constant, such as set a value from 'optarg', set the
+   option's 'flag' field to zero and its 'val' field to a nonzero
    value (the equivalent single-letter option character, if there is
-   one).  For long options that have a zero `flag' field, `getopt'
-   returns the contents of the `val' field.  */
+   one).  For long options that have a zero 'flag' field, 'getopt'
+   returns the contents of the 'val' field.  */
 
 # if !GNULIB_defined_struct_option
 struct option
@@ -194,7 +194,7 @@ struct option
 #  define GNULIB_defined_struct_option 1
 # endif
 
-/* Names for the values of the `has_arg' field of `struct option'.  */
+/* Names for the values of the 'has_arg' field of 'struct option'.  */
 
 # define no_argument            0
 # define required_argument      1
@@ -208,23 +208,23 @@ struct option
 
    Return the option character from OPTS just read.  Return -1 when
    there are no more options.  For unrecognized options, or options
-   missing arguments, `optopt' is set to the option letter, and '?' is
+   missing arguments, 'optopt' is set to the option letter, and '?' is
    returned.
 
    The OPTS string is a list of characters which are recognized option
    letters, optionally followed by colons, specifying that that letter
-   takes an argument, to be placed in `optarg'.
+   takes an argument, to be placed in 'optarg'.
 
    If a letter in OPTS is followed by two colons, its argument is
-   optional.  This behavior is specific to the GNU `getopt'.
+   optional.  This behavior is specific to the GNU 'getopt'.
 
-   The argument `--' causes premature termination of argument
-   scanning, explicitly telling `getopt' that there are no more
+   The argument '--' causes premature termination of argument
+   scanning, explicitly telling 'getopt' that there are no more
    options.
 
-   If OPTS begins with `-', then non-option arguments are treated as
+   If OPTS begins with '-', then non-option arguments are treated as
    arguments to the option '\1'.  This behavior is specific to the GNU
-   `getopt'.  If OPTS begins with `+', or POSIXLY_CORRECT is set in
+   'getopt'.  If OPTS begins with '+', or POSIXLY_CORRECT is set in
    the environment, then do not permute arguments.  */
 
 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
diff --git a/gl/getopt1.c b/gl/getopt1.c
index 7cf41c8..fb2a8f5 100644
--- a/gl/getopt1.c
+++ b/gl/getopt1.c
@@ -141,11 +141,11 @@ main (int argc, char **argv)
           break;
 
         case 'c':
-          printf ("option c with value `%s'\n", optarg);
+          printf ("option c with value '%s'\n", optarg);
           break;
 
         case 'd':
-          printf ("option d with value `%s'\n", optarg);
+          printf ("option d with value '%s'\n", optarg);
           break;
 
         case '?':
diff --git a/gl/getopt_int.h b/gl/getopt_int.h
index 3c37544..2da020c 100644
--- a/gl/getopt_int.h
+++ b/gl/getopt_int.h
@@ -40,7 +40,7 @@ extern int _getopt_internal (int ___argc, char **___argv,
    stop option processing when the first non-option is seen.
    This is what Unix does.
    This mode of operation is selected by either setting the environment
-   variable POSIXLY_CORRECT, or using `+' as the first character
+   variable POSIXLY_CORRECT, or using '+' as the first character
    of the list of option characters, or by calling getopt.
 
    PERMUTE is the default.  We permute the contents of ARGV as we
@@ -52,12 +52,12 @@ extern int _getopt_internal (int ___argc, char **___argv,
    written to expect options and other ARGV-elements in any order
    and that care about the ordering of the two.  We describe each
    non-option ARGV-element as if it were the argument of an option
-   with character code 1.  Using `-' as the first character of the
+   with character code 1.  Using '-' as the first character of the
    list of option characters selects this mode of operation.
 
-   The special argument `--' forces an end of option-scanning regardless
-   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
-   `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
+   The special argument '--' forces an end of option-scanning regardless
+   of the value of 'ordering'.  In the case of RETURN_IN_ORDER, only
+   '--' can cause 'getopt' to return -1 with 'optind' != ARGC.  */
 
 enum __ord
   {
@@ -99,8 +99,8 @@ struct _getopt_data
   /* Handle permutation of arguments.  */
 
   /* Describe the part of ARGV that contains non-options that have
-     been skipped.  `first_nonopt' is the index in ARGV of the first
-     of them; `last_nonopt' is the index after the last of them.  */
+     been skipped.  'first_nonopt' is the index in ARGV of the first
+     of them; 'last_nonopt' is the index after the last of them.  */
 
   int __first_nonopt;
   int __last_nonopt;
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index 8579bff..656924b 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,4 +1,4 @@
-# alloca.m4 serial 13
+# alloca.m4 serial 14
 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -53,8 +53,8 @@ m4_version_prereq([2.69], [] ,[
 
 # _AC_LIBOBJ_ALLOCA
 # -----------------
-# Set up the LIBOBJ replacement of `alloca'.  Well, not exactly
-# AC_LIBOBJ since we actually set the output variable `ALLOCA'.
+# Set up the LIBOBJ replacement of 'alloca'.  Well, not exactly
+# AC_LIBOBJ since we actually set the output variable 'ALLOCA'.
 # Nevertheless, for Automake, AC_LIBSOURCES it.
 m4_define([_AC_LIBOBJ_ALLOCA],
 [# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -63,9 +63,9 @@ m4_define([_AC_LIBOBJ_ALLOCA],
 # use ar to extract alloca.o from them instead of compiling alloca.c.
 AC_LIBSOURCES(alloca.c)
 AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
-AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.])
+AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
 
-AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray,
+AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
 [AC_EGREP_CPP(webecray,
 [#if defined CRAY && ! defined CRAY2
 webecray
@@ -77,10 +77,10 @@ if test $ac_cv_os_cray = yes; then
   for ac_func in _getb67 GETB67 getb67; do
     AC_CHECK_FUNC($ac_func,
                   [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
-                                      [Define to one of `_getb67', `GETB67',
-                                       `getb67' for Cray-2 and Cray-YMP
+                                      [Define to one of '_getb67', 'GETB67',
+                                       'getb67' for Cray-2 and Cray-YMP
                                        systems. This function is required for
-                                       `alloca.c' support on those systems.])
+                                       'alloca.c' support on those systems.])
     break])
   done
 fi
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 94741cd..0bfaef6 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 10  -*- Autoconf -*-
+# serial 11  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
@@ -43,7 +43,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
   AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
   if test "$MINIX" = yes; then
     AC_DEFINE([_POSIX_SOURCE], [1],
-      [Define to 1 if you need to in order for `stat' and other
+      [Define to 1 if you need to in order for 'stat' and other
        things to work.])
     AC_DEFINE([_POSIX_1_SOURCE], [2],
       [Define to 2 if the system does not provide POSIX.1 features
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 453963b..0525d68 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=build-aux --with-tests --avoid=fcntl-h-tests --avoid=stdlib-tests 
--avoid=string-tests --avoid=sys_stat-tests --avoid=time-tests 
--avoid=unistd-tests --avoid=update-copyright-tests --avoid=wchar-tests 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files 
autobuild csharpcomp-script csharpexec-script error fdl-1.3 gendocs getopt-gnu 
gnupload gpl-3.0 lgpl-2.1 maintainer-makefile manywarnings pmccabe2html 
progname update-copyright useless-if-before-free valgrind-tests vc-list-files 
version-etc warnings
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=build-aux --with-tests --avoid=fcntl-h-tests --avoid=stdlib-tests 
--avoid=string-tests --avoid=sys_stat-tests --avoid=time-tests 
--avoid=unistd-tests --avoid=update-copyright-tests --avoid=wchar-tests 
--no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files 
autobuild csharpcomp-script csharpexec-script error fdl-1.3 gendocs getopt-gnu 
gnupload maintainer-makefile manywarnings pmccabe2html progname 
update-copyright useless-if-before-free valgrind-tests vc-list-files 
version-etc warnings
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -40,8 +40,6 @@ gl_MODULES([
   gendocs
   getopt-gnu
   gnupload
-  gpl-3.0
-  lgpl-2.1
   maintainer-makefile
   manywarnings
   pmccabe2html
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index d1be9e6..ae4d254 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 31
+# gnulib-common.m4 serial 32
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,7 @@ AC_DEFUN([gl_COMMON], [
 ])
 AC_DEFUN([gl_COMMON_BODY], [
   AH_VERBATIM([_Noreturn],
-[/* The _Noreturn keyword of draft C1X.  */
+[/* The _Noreturn keyword of C11.  */
 #ifndef _Noreturn
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
       || 0x5110 <= __SUNPRO_C)
@@ -224,7 +224,7 @@ m4_ifndef([AS_VAR_IF],
 # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
 #   to CC twice
 #   <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
-# - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard.
+# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
 AC_DEFUN([gl_PROG_CC_C99],
 [
   dnl Change that version number to the minimum Autoconf version that supports
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index e2c8dee..ffdb1b1 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -78,7 +78,6 @@ AC_DEFUN([gl_EARLY],
   # Code from module gettext-h:
   # Code from module gnumakefile:
   # Code from module gnupload:
-  # Code from module gpl-3.0:
   # Code from module ignore-value:
   # Code from module ignore-value-tests:
   # Code from module include_next:
@@ -89,7 +88,6 @@ AC_DEFUN([gl_EARLY],
   # Code from module inttypes-tests:
   # Code from module largefile:
   AC_REQUIRE([AC_SYS_LARGEFILE])
-  # Code from module lgpl-2.1:
   # Code from module lstat:
   # Code from module lstat-tests:
   # Code from module maintainer-makefile:
@@ -499,8 +497,6 @@ AC_DEFUN([gl_FILE_LIST], [
   build-aux/vc-list-files
   doc/fdl-1.3.texi
   doc/gendocs_template
-  doc/gpl-3.0.texi
-  doc/lgpl-2.1.texi
   lib/errno.in.h
   lib/error.c
   lib/error.h
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index 6593e03..a60a261 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -143,7 +143,7 @@ choke me
 # even if the compiler does not support include_next.
 # The three "///" are to pacify Sun C 5.8, which otherwise would say
 # "warning: #include of /usr/include/... may be non-portable".
-# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
 # Note: This macro assumes that the header file is not empty after
 # preprocessing, i.e. it does not only define preprocessor macros but also
 # provides some type/enum definitions or function/variable declarations.
diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4
index 989c261..eec4f41 100644
--- a/gl/m4/inttypes.m4
+++ b/gl/m4/inttypes.m4
@@ -1,4 +1,4 @@
-# inttypes.m4 serial 25
+# inttypes.m4 serial 26
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -147,6 +147,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
   HAVE_DECL_IMAXDIV=1;   AC_SUBST([HAVE_DECL_IMAXDIV])
   HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
   HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+  REPLACE_STRTOIMAX=0;   AC_SUBST([REPLACE_STRTOIMAX])
   INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
   INT64_MAX_EQ_LONG_MAX='defined _LP64';  AC_SUBST([INT64_MAX_EQ_LONG_MAX])
   PRI_MACROS_BROKEN=0;   AC_SUBST([PRI_MACROS_BROKEN])
diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4
index 42a19ac..b9c65c7 100644
--- a/gl/m4/longlong.m4
+++ b/gl/m4/longlong.m4
@@ -1,4 +1,4 @@
-# longlong.m4 serial 16
+# longlong.m4 serial 17
 dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -51,7 +51,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
       fi])
   if test $ac_cv_type_long_long_int = yes; then
     AC_DEFINE([HAVE_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `long long int'.])
+      [Define to 1 if the system has the type 'long long int'.])
   fi
 ])
 
@@ -77,7 +77,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
      fi])
   if test $ac_cv_type_unsigned_long_long_int = yes; then
     AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `unsigned long long int'.])
+      [Define to 1 if the system has the type 'unsigned long long int'.])
   fi
 ])
 
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index f41a2df..b83858b 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 23
+# serial 24
 
 # Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
 #
@@ -65,6 +65,6 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
     ])
   test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
     AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
-      [Define to 1 if `lstat' dereferences a symlink specified
+      [Define to 1 if 'lstat' dereferences a symlink specified
        with a trailing slash.])
 ])
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index dd4b522..b88da76 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 ])
 
-dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
+dnl Define HAVE_STRUCT_TIMESPEC if 'struct timespec' is declared
 dnl in time.h, sys/time.h, or pthread.h.
 
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c
index 25374b7..b7a917d 100644
--- a/gl/msvc-inval.c
+++ b/gl/msvc-inval.c
@@ -40,7 +40,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
 
 # else
 
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 #  define WIN32_LEAN_AND_MEAN
 #  include <windows.h>
 
diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h
index 88aa26b..373f9bf 100644
--- a/gl/msvc-inval.h
+++ b/gl/msvc-inval.h
@@ -207,7 +207,7 @@ extern struct gl_msvc_inval_per_thread 
*gl_msvc_inval_current (void);
    or when SANE_LIBRARY_HANDLING is desired.  */
 
 /* The braces here avoid GCC warnings like
-   "warning: suggest explicit braces to avoid ambiguous `else'".  */
+   "warning: suggest explicit braces to avoid ambiguous 'else'".  */
 # define TRY_MSVC_INVAL \
     do                                                                         
\
       {                                                                        
\
diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c
index 178288f..f0fea17 100644
--- a/gl/msvc-nothrow.c
+++ b/gl/msvc-nothrow.c
@@ -21,7 +21,7 @@
 /* Specification.  */
 #include "msvc-nothrow.h"
 
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
diff --git a/gl/verify.h b/gl/verify.h
index e9d6666..cef14ad 100644
--- a/gl/verify.h
+++ b/gl/verify.h
@@ -21,13 +21,11 @@
 # define _GL_VERIFY_H
 
 
-/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the
-   C1X draft N1548 section 6.7.10.  This is supported by GCC 4.6.0 and
-   later, in C mode, and its use here generates easier-to-read diagnostics
-   when verify (R) fails.
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
+   This is supported by GCC 4.6.0 and later, in C mode, and its use
+   here generates easier-to-read diagnostics when verify (R) fails.
 
-   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per the
-   C++0X draft N3242 section 7.(4).
+   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
    This will likely be supported by future GCC versions, in C++ mode.
 
    Use this only with GCC.  If we were willing to slow 'configure'
@@ -188,7 +186,7 @@ template <int w>
    trailing ';'.  If R is false, fail at compile-time, preferably
    with a diagnostic that includes the string-literal DIAGNOSTIC.
 
-   Unfortunately, unlike C1X, this implementation must appear as an
+   Unfortunately, unlike C11, this implementation must appear as an
    ordinary declaration, and cannot appear inside struct { ... }.  */
 
 # ifdef _GL_HAVE__STATIC_ASSERT
@@ -205,7 +203,7 @@ template <int w>
 #   define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
 #  endif
 #  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
-#   define static_assert _Static_assert /* Draft C1X requires this #define.  */
+#   define static_assert _Static_assert /* C11 requires this #define.  */
 #  endif
 # endif
 
diff --git a/gl/version-etc.h b/gl/version-etc.h
index 4e47b6f..c62704c 100644
--- a/gl/version-etc.h
+++ b/gl/version-etc.h
@@ -22,7 +22,7 @@
 # include <stdarg.h>
 # include <stdio.h>
 
-/* The `sentinel' attribute was added in gcc 4.0.  */
+/* The 'sentinel' attribute was added in gcc 4.0.  */
 #ifndef _GL_ATTRIBUTE_SENTINEL
 # if 4 <= __GNUC__
 #  define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
@@ -72,7 +72,7 @@ extern void version_etc (FILE *stream,
                          /* const char *author1, ..., NULL */ ...)
   _GL_ATTRIBUTE_SENTINEL;
 
-/* Display the usual `Report bugs to' stanza */
+/* Display the usual "Report bugs to" stanza.  */
 extern void emit_bug_reporting_address (void);
 
 #endif /* VERSION_ETC_H */
diff --git a/gltests/Makefile.am b/gltests/Makefile.am
index 9fa3022..f71ecb1 100644
--- a/gltests/Makefile.am
+++ b/gltests/Makefile.am
@@ -329,7 +329,7 @@ BUILT_SOURCES += inttypes.h
 
 # We need the following in order to create <inttypes.h> when the system
 # doesn't have one that works with the given compiler.
-inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
+inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H) $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
@@ -350,10 +350,12 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status 
$(WARN_ON_USE_H) $(ARG_N
              -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
              -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
              -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+             -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
              -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' 
\
              -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
              -e 
's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
              -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' 
\
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
              < $(srcdir)/inttypes.in.h; \
diff --git a/gltests/dup2.c b/gltests/dup2.c
index 313b619..f6d0f1c 100644
--- a/gltests/dup2.c
+++ b/gltests/dup2.c
@@ -31,7 +31,7 @@
 
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 #  define WIN32_LEAN_AND_MEAN
 #  include <windows.h>
 
diff --git a/gltests/fcntl.in.h b/gltests/fcntl.in.h
index ceaa9ba..84ae3ee 100644
--- a/gltests/fcntl.in.h
+++ b/gltests/fcntl.in.h
@@ -177,12 +177,12 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
 /* Fix up the O_* macros.  */
 
 #if !defined O_DIRECT && defined O_DIRECTIO
-/* Tru64 spells it `O_DIRECTIO'.  */
+/* Tru64 spells it 'O_DIRECTIO'.  */
 # define O_DIRECT O_DIRECTIO
 #endif
 
 #if !defined O_CLOEXEC && defined O_NOINHERIT
-/* Mingw spells it `O_NOINHERIT'.  */
+/* Mingw spells it 'O_NOINHERIT'.  */
 # define O_CLOEXEC O_NOINHERIT
 #endif
 
diff --git a/gltests/getcwd-lgpl.c b/gltests/getcwd-lgpl.c
index 57f908a..f1e821b 100644
--- a/gltests/getcwd-lgpl.c
+++ b/gltests/getcwd-lgpl.c
@@ -32,7 +32,7 @@ typedef int dummy;
    (perhaps because the absolute name was longer than PATH_MAX, or
    because of missing read/search permissions on parent directories)
    or SIZE was too small.  If successful, returns BUF.  If BUF is
-   NULL, an array is allocated with `malloc'; the array is SIZE bytes
+   NULL, an array is allocated with 'malloc'; the array is SIZE bytes
    long, unless SIZE == 0, in which case it is as big as
    necessary.  */
 
diff --git a/gltests/init.sh b/gltests/init.sh
index 9485492..5985552 100644
--- a/gltests/init.sh
+++ b/gltests/init.sh
@@ -61,7 +61,7 @@ ME_=`expr "./$0" : '.*/\(.*\)$'`
 
 # We use a trap below for cleanup.  This requires us to go through
 # hoops to get the right exit status transported through the handler.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
 # Turn off errexit here so that we don't trip the bug with OSF1/Tru64
 # sh inside this function.
 Exit () { set +e; (exit $1); exit $1; }
@@ -172,7 +172,7 @@ else
     if test "$re_shell_" = __current__; then
       # 'eval'ing this code makes Solaris 10's /bin/sh exit with
       # $? set to 2.  It does not evaluate any of the code after the
-      # "unexpected" first `('.  Thus, we must run it in a subshell.
+      # "unexpected" first '('.  Thus, we must run it in a subshell.
       ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
     else
       "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
@@ -255,7 +255,7 @@ compare_dev_null_ ()
   return 2
 }
 
-if diff_out_=`( diff -u "$0" "$0" < /dev/null ) 2>/dev/null`; then
+if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then
   if test -z "$diff_out_"; then
     compare_ () { diff -u "$@"; }
   else
@@ -273,7 +273,7 @@ if diff_out_=`( diff -u "$0" "$0" < /dev/null ) 
2>/dev/null`; then
       fi
     }
   fi
-elif diff_out_=`( diff -c "$0" "$0" < /dev/null ) 2>/dev/null`; then
+elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
   if test -z "$diff_out_"; then
     compare_ () { diff -c "$@"; }
   else
diff --git a/gltests/inttypes.in.h b/gltests/inttypes.in.h
index e08a660..b9da2b5 100644
--- a/gltests/inttypes.in.h
+++ b/gltests/inttypes.in.h
@@ -56,6 +56,8 @@
 # error "This file assumes that 'int' has exactly 32 bits. Please report your 
platform and compiler to <address@hidden>."
 #endif
 
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
 /* The definition of _GL_ARG_NONNULL is copied here.  */
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
@@ -1077,10 +1079,23 @@ _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
 #endif
 
 #if @GNULIB_STRTOIMAX@
-# if address@hidden@
-#  undef strtoimax
-extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# if @REPLACE_STRTOIMAX@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strtoimax
+#   define strtoimax rpl_strtoimax
+#  endif
+_GL_FUNCDECL_RPL (strtoimax, intmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
+# else
+#  if address@hidden@
+#   undef strtoimax
+_GL_FUNCDECL_SYS (strtoimax, intmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
 # endif
+_GL_CXXALIASWARN (strtoimax);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoimax
 # if HAVE_RAW_DECL_STRTOIMAX
@@ -1092,8 +1107,11 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
 #if @GNULIB_STRTOUMAX@
 # if address@hidden@
 #  undef strtoumax
-extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+_GL_FUNCDECL_SYS (strtoumax, uintmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
 # endif
+_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
+_GL_CXXALIASWARN (strtoumax);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoumax
 # if HAVE_RAW_DECL_STRTOUMAX
diff --git a/gltests/lstat.c b/gltests/lstat.c
index 146e5dc..db119a1 100644
--- a/gltests/lstat.c
+++ b/gltests/lstat.c
@@ -51,11 +51,11 @@ orig_lstat (const char *filename, struct stat *buf)
 # include <errno.h>
 
 /* lstat works differently on Linux and Solaris systems.  POSIX (see
-   `pathname resolution' in the glossary) requires that programs like
-   `ls' take into consideration the fact that FILE has a trailing slash
+   "pathname resolution" in the glossary) requires that programs like
+   'ls' take into consideration the fact that FILE has a trailing slash
    when FILE is a symbolic link.  On Linux and Solaris 10 systems, the
    lstat function already has the desired semantics (in treating
-   `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
+   'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)',
    but on Solaris 9 and earlier it does not.
 
    If FILE has a trailing slash and specifies a symbolic link,
diff --git a/gltests/putenv.c b/gltests/putenv.c
index 5f26b66..3c0f7ea 100644
--- a/gltests/putenv.c
+++ b/gltests/putenv.c
@@ -43,7 +43,7 @@ extern char **environ;
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
@@ -91,7 +91,7 @@ _unsetenv (const char *name)
 
 
 /* Put STRING, which is of the form "NAME=VALUE", in the environment.
-   If STRING contains no `=', then remove STRING from the environment.  */
+   If STRING contains no '=', then remove STRING from the environment.  */
 int
 putenv (char *string)
 {
diff --git a/gltests/setenv.c b/gltests/setenv.c
index 3854a99..8201be2 100644
--- a/gltests/setenv.c
+++ b/gltests/setenv.c
@@ -49,7 +49,7 @@
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
@@ -103,11 +103,11 @@ static void *known_values;
 static char **last_environ;
 
 
-/* This function is used by `setenv' and `putenv'.  The difference between
+/* This function is used by 'setenv' and 'putenv'.  The difference between
    the two functions is that for the former must create a new string which
-   is then placed in the environment, while the argument of `putenv'
+   is then placed in the environment, while the argument of 'putenv'
    must be used directly.  This is all complicated by the fact that we try
-   to reuse values once generated for a `setenv' call since we can never
+   to reuse values once generated for a 'setenv' call since we can never
    free the strings.  */
 int
 __add_to_environ (const char *name, const char *value, const char *combined,
@@ -299,7 +299,7 @@ setenv (const char *name, const char *value, int replace)
   return __add_to_environ (name, value, NULL, replace);
 }
 
-/* The `clearenv' was planned to be added to POSIX.1 but probably
+/* The 'clearenv' was planned to be added to POSIX.1 but probably
    never made it.  Nevertheless the POSIX.9 standard (POSIX bindings
    for Fortran 77) requires this function.  */
 int
diff --git a/gltests/stdio.in.h b/gltests/stdio.in.h
index 07fcef7..0481930 100644
--- a/gltests/stdio.in.h
+++ b/gltests/stdio.in.h
@@ -186,7 +186,7 @@ _GL_CXXALIASWARN (fdopen);
 #elif defined GNULIB_POSIXCHECK
 # undef fdopen
 /* Assume fdopen is always declared.  */
-_GL_WARN_ON_USE (fdopen, "fdopen on Win32 platforms is not POSIX compatible - "
+_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX 
compliant - "
                  "use gnulib module fdopen for portability");
 #endif
 
@@ -259,7 +259,7 @@ _GL_CXXALIASWARN (fopen);
 #elif defined GNULIB_POSIXCHECK
 # undef fopen
 /* Assume fopen is always declared.  */
-_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
+_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX 
compliant - "
                  "use gnulib module fopen for portability");
 #endif
 
@@ -387,7 +387,7 @@ _GL_CXXALIASWARN (freopen);
 # undef freopen
 /* Assume freopen is always declared.  */
 _GL_WARN_ON_USE (freopen,
-                 "freopen on Win32 platforms is not POSIX compatible - "
+                 "freopen on native Windows platforms is not POSIX compliant - 
"
                  "use gnulib module freopen for portability");
 #endif
 
diff --git a/gltests/test-dup2.c b/gltests/test-dup2.c
index bf8e5a2..5043c0c 100644
--- a/gltests/test-dup2.c
+++ b/gltests/test-dup2.c
@@ -33,7 +33,7 @@ SIGNATURE_CHECK (dup2, int, (int, int));
 #endif
 
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions.  */
+/* Get declarations of the native Windows API functions.  */
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 /* Get _get_osfhandle.  */
@@ -47,7 +47,7 @@ static int
 is_open (int fd)
 {
 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-  /* On Win32, the initial state of unassigned standard file
+  /* On native Windows, the initial state of unassigned standard file
      descriptors is that they are open but point to an
      INVALID_HANDLE_VALUE, and there is no fcntl.  */
   return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
@@ -65,7 +65,7 @@ static int
 is_inheritable (int fd)
 {
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-  /* On Win32, the initial state of unassigned standard file
+  /* On native Windows, the initial state of unassigned standard file
      descriptors is that they are open but point to an
      INVALID_HANDLE_VALUE, and there is no fcntl.  */
   HANDLE h = (HANDLE) _get_osfhandle (fd);
diff --git a/gltests/test-init.sh b/gltests/test-init.sh
index 123da8e..3368a99 100755
--- a/gltests/test-init.sh
+++ b/gltests/test-init.sh
@@ -52,14 +52,20 @@ EOF
   compare empty in >out 2>err && fail=1
   # Remove the TAB-date suffix on each --- and +++ line,
   # for both the expected and the actual output files.
+  # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ:
+  # -@@ -0,0 +1 @@
+  # +@@ -1,0 +1,1 @@
   cat <<\EOF > exp
 --- empty
 +++ in
-@@ -0,0 +1 @@
 +xyz
 EOF
-  sed 's/      .*//' out > k && mv k out
-  compare exp out || fail=1
+  sed 's/      .*//;/^@@/d' out > k && mv k out
+
+  # Compare against expected output only if compare is using diff -u.
+  if (diff -u out out < /dev/null) > /dev/null 2>&1; then
+    compare exp out || fail=1
+  fi
   case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
 }
 
diff --git a/gltests/test-vc-list-files-cvs.sh 
b/gltests/test-vc-list-files-cvs.sh
index 8b17b85..68b0a0f 100755
--- a/gltests/test-vc-list-files-cvs.sh
+++ b/gltests/test-vc-list-files-cvs.sh
@@ -36,7 +36,6 @@ for i in with-cvsu without; do
   ok=0
   mkdir $tmpdir && cd $tmpdir &&
     # without cvs, skip the test
-    # The double use of 'exit' is needed for the reference to $? inside the 
trap.
     { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \
       || skip_ "cvs not found in PATH"; } &&
     mkdir w && cd w &&
diff --git a/gltests/unsetenv.c b/gltests/unsetenv.c
index b1e659b..ddbe9a4 100644
--- a/gltests/unsetenv.c
+++ b/gltests/unsetenv.c
@@ -36,7 +36,7 @@
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
diff --git a/java/Makefile.am b/java/Makefile.am
index bdda356..5f9739e 100644
--- a/java/Makefile.am
+++ b/java/Makefile.am
@@ -3,19 +3,18 @@
 #
 # This file is part of GNU Libidn.
 #
-# GNU Libidn 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.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-# GNU Libidn is distributed in the hope that it will be useful,
+# This program 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.
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with GNU Libidn; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 SUBDIRS = gnu . misc
 
diff --git a/java/gnu/Makefile.am b/java/gnu/Makefile.am
index 021f2b8..e40dc86 100644
--- a/java/gnu/Makefile.am
+++ b/java/gnu/Makefile.am
@@ -1 +1,19 @@
+## Process this file with automake to produce Makefile.in
+# Copyright (C) 2004-2012 Simon Josefsson
+#
+# This file is part of GNU Libidn.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 SUBDIRS = inet
diff --git a/java/gnu/inet/Makefile.am b/java/gnu/inet/Makefile.am
index 9807577..bdad4fc 100644
--- a/java/gnu/inet/Makefile.am
+++ b/java/gnu/inet/Makefile.am
@@ -1 +1,19 @@
+## Process this file with automake to produce Makefile.in
+# Copyright (C) 2004-2012 Simon Josefsson
+#
+# This file is part of GNU Libidn.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 SUBDIRS = encoding
diff --git a/java/gnu/inet/encoding/IDNA.java b/java/gnu/inet/encoding/IDNA.java
index 59a55d2..c366525 100644
--- a/java/gnu/inet/encoding/IDNA.java
+++ b/java/gnu/inet/encoding/IDNA.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 package gnu.inet.encoding;
 
diff --git a/java/gnu/inet/encoding/IDNAException.java 
b/java/gnu/inet/encoding/IDNAException.java
index 8a4aff9..09e11ea 100644
--- a/java/gnu/inet/encoding/IDNAException.java
+++ b/java/gnu/inet/encoding/IDNAException.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 package gnu.inet.encoding;
 
diff --git a/java/gnu/inet/encoding/Makefile.am 
b/java/gnu/inet/encoding/Makefile.am
index e294212..f526e5a 100644
--- a/java/gnu/inet/encoding/Makefile.am
+++ b/java/gnu/inet/encoding/Makefile.am
@@ -1,27 +1,26 @@
 ## Process this file with automake to produce Makefile.in
-# Copyright (C) 2004-2012 Simon Josefsson.
+# Copyright (C) 2004-2012 Simon Josefsson
 #
 # This file is part of GNU Libidn.
 #
-# GNU Libidn 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.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-# GNU Libidn is distributed in the hope that it will be useful,
+# This program 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.
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with GNU Libidn; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 JAVAROOT = $(top_builddir)/java
 
 if JAVA
-dist_noinst_JAVA = CombiningClass.java \
+dist_noinst_JAVA = \
+       CombiningClass.java             \
        Composition.java                \
        DecompositionKeys.java          \
        DecompositionMappings.java      \
@@ -33,4 +32,4 @@ dist_noinst_JAVA = CombiningClass.java        \
        RFC3454.java                    \
        Stringprep.java                 \
        StringprepException.java
-endif # JAVA
+endif
diff --git a/java/gnu/inet/encoding/NFKC.java b/java/gnu/inet/encoding/NFKC.java
index 99c6e4d..19c1cb8 100644
--- a/java/gnu/inet/encoding/NFKC.java
+++ b/java/gnu/inet/encoding/NFKC.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 package gnu.inet.encoding;
 
diff --git a/java/gnu/inet/encoding/Punycode.java 
b/java/gnu/inet/encoding/Punycode.java
index 4e04296..024a9eb 100644
--- a/java/gnu/inet/encoding/Punycode.java
+++ b/java/gnu/inet/encoding/Punycode.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 package gnu.inet.encoding;
 
diff --git a/java/gnu/inet/encoding/PunycodeException.java 
b/java/gnu/inet/encoding/PunycodeException.java
index dbfab6c..999bf60 100644
--- a/java/gnu/inet/encoding/PunycodeException.java
+++ b/java/gnu/inet/encoding/PunycodeException.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 package gnu.inet.encoding;
 
diff --git a/java/gnu/inet/encoding/Stringprep.java 
b/java/gnu/inet/encoding/Stringprep.java
index e3c6261..8f12729 100644
--- a/java/gnu/inet/encoding/Stringprep.java
+++ b/java/gnu/inet/encoding/Stringprep.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 package gnu.inet.encoding;
 
diff --git a/java/gnu/inet/encoding/StringprepException.java 
b/java/gnu/inet/encoding/StringprepException.java
index f84e420..5880ebc 100644
--- a/java/gnu/inet/encoding/StringprepException.java
+++ b/java/gnu/inet/encoding/StringprepException.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 package gnu.inet.encoding;
 
diff --git a/java/misc/GenerateNFKC.java b/java/misc/GenerateNFKC.java
index 8dc73be..efe3899 100644
--- a/java/misc/GenerateNFKC.java
+++ b/java/misc/GenerateNFKC.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 import java.io.BufferedReader;
 import java.io.File;
diff --git a/java/misc/GenerateRFC3454.java b/java/misc/GenerateRFC3454.java
index 6337b4c..3743c46 100644
--- a/java/misc/GenerateRFC3454.java
+++ b/java/misc/GenerateRFC3454.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 import java.io.BufferedReader;
 import java.io.File;
diff --git a/java/misc/Makefile.am b/java/misc/Makefile.am
index d82ea05..3ce0c3e 100644
--- a/java/misc/Makefile.am
+++ b/java/misc/Makefile.am
@@ -1,26 +1,28 @@
 ## Process this file with automake to produce Makefile.in
-# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation
+# Copyright (C) 2004-2012  Free Software Foundation
 #
 # This file is part of GNU Libidn.
 #
-# GNU Libidn 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.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-# GNU Libidn is distributed in the hope that it will be useful,
+# This program 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.
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with GNU Libidn; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 JAVAROOT = $(top_builddir)/java/misc
 AM_JAVACFLAGS = -classpath 
$(top_builddir)/java/libidn-$(VERSION).jar:$(top_srcdir)/java/libidn-$(VERSION).jar
 
 if JAVA
-dist_noinst_JAVA = GenerateRFC3454.java GenerateNFKC.java      \
-                       TestIDNA.java TestNFKC.java
-endif # JAVA
+dist_noinst_JAVA = \
+       GenerateRFC3454.java \
+       GenerateNFKC.java \
+       TestIDNA.java \
+       TestNFKC.java
+endif
diff --git a/java/misc/TestIDNA.java b/java/misc/TestIDNA.java
index 262238b..11a3bac 100644
--- a/java/misc/TestIDNA.java
+++ b/java/misc/TestIDNA.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 import gnu.inet.encoding.IDNA;
 import gnu.inet.encoding.IDNAException;
diff --git a/java/misc/TestNFKC.java b/java/misc/TestNFKC.java
index 7d71dd8..3a08c2d 100644
--- a/java/misc/TestNFKC.java
+++ b/java/misc/TestNFKC.java
@@ -1,25 +1,31 @@
-/**
- * Copyright (C) 2004-2012 Free Software Foundation, Inc.
- *
- * Author: Oliver Hitz
- *
- * This file is part of GNU Libidn.
- *
- * This 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+   Author: Oliver Hitz
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 import gnu.inet.encoding.NFKC;
 
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 0ea6a2d..69d0989 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -4,19 +4,18 @@
 #
 # This file is part of GNU Libidn.
 #
-# GNU Libidn 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.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-# GNU Libidn is distributed in the hope that it will be useful,
+# This program 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.
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with GNU Libidn; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 EXTRA_DIST = gen-stringprep-tables.pl gen-unicode-tables.pl gen-tld-tables.pl
 
diff --git a/lib/gl/m4/alloca.m4 b/lib/gl/m4/alloca.m4
index 8579bff..656924b 100644
--- a/lib/gl/m4/alloca.m4
+++ b/lib/gl/m4/alloca.m4
@@ -1,4 +1,4 @@
-# alloca.m4 serial 13
+# alloca.m4 serial 14
 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -53,8 +53,8 @@ m4_version_prereq([2.69], [] ,[
 
 # _AC_LIBOBJ_ALLOCA
 # -----------------
-# Set up the LIBOBJ replacement of `alloca'.  Well, not exactly
-# AC_LIBOBJ since we actually set the output variable `ALLOCA'.
+# Set up the LIBOBJ replacement of 'alloca'.  Well, not exactly
+# AC_LIBOBJ since we actually set the output variable 'ALLOCA'.
 # Nevertheless, for Automake, AC_LIBSOURCES it.
 m4_define([_AC_LIBOBJ_ALLOCA],
 [# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -63,9 +63,9 @@ m4_define([_AC_LIBOBJ_ALLOCA],
 # use ar to extract alloca.o from them instead of compiling alloca.c.
 AC_LIBSOURCES(alloca.c)
 AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
-AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.])
+AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
 
-AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray,
+AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
 [AC_EGREP_CPP(webecray,
 [#if defined CRAY && ! defined CRAY2
 webecray
@@ -77,10 +77,10 @@ if test $ac_cv_os_cray = yes; then
   for ac_func in _getb67 GETB67 getb67; do
     AC_CHECK_FUNC($ac_func,
                   [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
-                                      [Define to one of `_getb67', `GETB67',
-                                       `getb67' for Cray-2 and Cray-YMP
+                                      [Define to one of '_getb67', 'GETB67',
+                                       'getb67' for Cray-2 and Cray-YMP
                                        systems. This function is required for
-                                       `alloca.c' support on those systems.])
+                                       'alloca.c' support on those systems.])
     break])
   done
 fi
diff --git a/lib/gl/m4/extensions.m4 b/lib/gl/m4/extensions.m4
index 94741cd..0bfaef6 100644
--- a/lib/gl/m4/extensions.m4
+++ b/lib/gl/m4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 10  -*- Autoconf -*-
+# serial 11  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
@@ -43,7 +43,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
   AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
   if test "$MINIX" = yes; then
     AC_DEFINE([_POSIX_SOURCE], [1],
-      [Define to 1 if you need to in order for `stat' and other
+      [Define to 1 if you need to in order for 'stat' and other
        things to work.])
     AC_DEFINE([_POSIX_1_SOURCE], [2],
       [Define to 2 if the system does not provide POSIX.1 features
diff --git a/lib/gl/m4/gnulib-common.m4 b/lib/gl/m4/gnulib-common.m4
index d1be9e6..ae4d254 100644
--- a/lib/gl/m4/gnulib-common.m4
+++ b/lib/gl/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 31
+# gnulib-common.m4 serial 32
 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,7 @@ AC_DEFUN([gl_COMMON], [
 ])
 AC_DEFUN([gl_COMMON_BODY], [
   AH_VERBATIM([_Noreturn],
-[/* The _Noreturn keyword of draft C1X.  */
+[/* The _Noreturn keyword of C11.  */
 #ifndef _Noreturn
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
       || 0x5110 <= __SUNPRO_C)
@@ -224,7 +224,7 @@ m4_ifndef([AS_VAR_IF],
 # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
 #   to CC twice
 #   <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
-# - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard.
+# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
 AC_DEFUN([gl_PROG_CC_C99],
 [
   dnl Change that version number to the minimum Autoconf version that supports
diff --git a/lib/gl/m4/include_next.m4 b/lib/gl/m4/include_next.m4
index 6593e03..a60a261 100644
--- a/lib/gl/m4/include_next.m4
+++ b/lib/gl/m4/include_next.m4
@@ -143,7 +143,7 @@ choke me
 # even if the compiler does not support include_next.
 # The three "///" are to pacify Sun C 5.8, which otherwise would say
 # "warning: #include of /usr/include/... may be non-portable".
-# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
 # Note: This macro assumes that the header file is not empty after
 # preprocessing, i.e. it does not only define preprocessor macros but also
 # provides some type/enum definitions or function/variable declarations.
diff --git a/lib/gl/m4/inttypes.m4 b/lib/gl/m4/inttypes.m4
index 989c261..eec4f41 100644
--- a/lib/gl/m4/inttypes.m4
+++ b/lib/gl/m4/inttypes.m4
@@ -1,4 +1,4 @@
-# inttypes.m4 serial 25
+# inttypes.m4 serial 26
 dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -147,6 +147,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
   HAVE_DECL_IMAXDIV=1;   AC_SUBST([HAVE_DECL_IMAXDIV])
   HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
   HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+  REPLACE_STRTOIMAX=0;   AC_SUBST([REPLACE_STRTOIMAX])
   INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
   INT64_MAX_EQ_LONG_MAX='defined _LP64';  AC_SUBST([INT64_MAX_EQ_LONG_MAX])
   PRI_MACROS_BROKEN=0;   AC_SUBST([PRI_MACROS_BROKEN])
diff --git a/lib/gl/m4/ld-version-script.m4 b/lib/gl/m4/ld-version-script.m4
index fd8c043..5ed93ef 100644
--- a/lib/gl/m4/ld-version-script.m4
+++ b/lib/gl/m4/ld-version-script.m4
@@ -1,4 +1,4 @@
-# ld-version-script.m4 serial 2
+# ld-version-script.m4 serial 3
 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -26,6 +26,12 @@ AC_DEFUN([gl_LD_VERSION_SCRIPT],
     save_LDFLAGS="$LDFLAGS"
     LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
     cat > conftest.map <<EOF
+foo
+EOF
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+                   [accepts_syntax_errors=yes], [accepts_syntax_errors=no])
+    if test "$accepts_syntax_errors" = no; then
+      cat > conftest.map <<EOF
 VERS_1 {
         global: sym;
 };
@@ -34,8 +40,11 @@ VERS_2 {
         global: sym;
 } VERS_1;
 EOF
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
-                   [have_ld_version_script=yes], [have_ld_version_script=no])
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+                     [have_ld_version_script=yes], [have_ld_version_script=no])
+    else
+      have_ld_version_script=no
+    fi
     rm -f conftest.map
     LDFLAGS="$save_LDFLAGS"
     AC_MSG_RESULT($have_ld_version_script)
diff --git a/lib/gl/m4/locale-fr.m4 b/lib/gl/m4/locale-fr.m4
index 8450ad4..4cb14b5 100644
--- a/lib/gl/m4/locale-fr.m4
+++ b/lib/gl/m4/locale-fr.m4
@@ -1,4 +1,4 @@
-# locale-fr.m4 serial 13
+# locale-fr.m4 serial 14
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -26,7 +26,7 @@ char buf[16];
 int main () {
   /* Check whether the given locale name is recognized by the system.  */
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-  /* On native Win32, setlocale(category, "") looks at the system settings,
+  /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
@@ -80,7 +80,7 @@ changequote([,])dnl
         # "ja" as "Japanese" or "Japanese_Japan.932",
         # and similar.
         mingw*)
-          # Test for the native Win32 locale name.
+          # Test for the native Windows locale name.
           if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 
2>/dev/null; then
             gt_cv_locale_fr=French_France.1252
           else
@@ -152,7 +152,7 @@ int main () {
 #if !(defined __BEOS__ || defined __HAIKU__)
   /* Check whether the given locale name is recognized by the system.  */
 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-  /* On native Win32, setlocale(category, "") looks at the system settings,
+  /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
@@ -206,7 +206,7 @@ changequote([,])dnl
         # "ja" as "Japanese" or "Japanese_Japan.932",
         # and similar.
         mingw*)
-          # Test for the hypothetical native Win32 locale name.
+          # Test for the hypothetical native Windows locale name.
           if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 
2>/dev/null; then
             gt_cv_locale_fr_utf8=French_France.65001
           else
diff --git a/lib/gl/m4/locale-ja.m4 b/lib/gl/m4/locale-ja.m4
index b4c88ab..b427f09 100644
--- a/lib/gl/m4/locale-ja.m4
+++ b/lib/gl/m4/locale-ja.m4
@@ -1,4 +1,4 @@
-# locale-ja.m4 serial 9
+# locale-ja.m4 serial 10
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -28,7 +28,7 @@ int main ()
   const char *p;
   /* Check whether the given locale name is recognized by the system.  */
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-  /* On native Win32, setlocale(category, "") looks at the system settings,
+  /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
@@ -84,8 +84,9 @@ changequote([,])dnl
         # "ja" as "Japanese" or "Japanese_Japan.932",
         # and similar.
         mingw*)
-          # Note that on native Win32, the Japanese locale is 
Japanese_Japan.932,
-          # and CP932 is very different from EUC-JP, so we cannot use it here.
+          # Note that on native Windows, the Japanese locale is
+          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+          # cannot use it here.
           gt_cv_locale_ja=none
           ;;
         *)
diff --git a/lib/gl/m4/locale-tr.m4 b/lib/gl/m4/locale-tr.m4
index f849808..4bae6a5 100644
--- a/lib/gl/m4/locale-tr.m4
+++ b/lib/gl/m4/locale-tr.m4
@@ -1,4 +1,4 @@
-# locale-tr.m4 serial 7
+# locale-tr.m4 serial 8
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -31,7 +31,7 @@ int main () {
      program return 1 on BeOS.  */
   /* Check whether the given locale name is recognized by the system.  */
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-  /* On native Win32, setlocale(category, "") looks at the system settings,
+  /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
@@ -85,7 +85,7 @@ changequote([,])dnl
         # "ja" as "Japanese" or "Japanese_Japan.932",
         # and similar.
         mingw*)
-          # Test for the hypothetical native Win32 locale name.
+          # Test for the hypothetical native Windows locale name.
           if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 
2>/dev/null; then
             gt_cv_locale_tr_utf8=Turkish_Turkey.65001
           else
diff --git a/lib/gl/m4/locale-zh.m4 b/lib/gl/m4/locale-zh.m4
index 92b78a4..de1a43b 100644
--- a/lib/gl/m4/locale-zh.m4
+++ b/lib/gl/m4/locale-zh.m4
@@ -1,4 +1,4 @@
-# locale-zh.m4 serial 9
+# locale-zh.m4 serial 10
 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -29,7 +29,7 @@ int main ()
   const char *p;
   /* Check whether the given locale name is recognized by the system.  */
 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-  /* On native Win32, setlocale(category, "") looks at the system settings,
+  /* On native Windows, setlocale(category, "") looks at the system settings,
      not at the environment variables.  Also, when an encoding suffix such
      as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
      category of the locale to "C".  */
@@ -85,7 +85,7 @@ changequote([,])dnl
         # "ja" as "Japanese" or "Japanese_Japan.932",
         # and similar.
         mingw*)
-          # Test for the hypothetical native Win32 locale name.
+          # Test for the hypothetical native Windows locale name.
           if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 
2>/dev/null; then
             gt_cv_locale_zh_CN=Chinese_China.54936
           else
diff --git a/lib/gl/m4/longlong.m4 b/lib/gl/m4/longlong.m4
index 42a19ac..b9c65c7 100644
--- a/lib/gl/m4/longlong.m4
+++ b/lib/gl/m4/longlong.m4
@@ -1,4 +1,4 @@
-# longlong.m4 serial 16
+# longlong.m4 serial 17
 dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -51,7 +51,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
       fi])
   if test $ac_cv_type_long_long_int = yes; then
     AC_DEFINE([HAVE_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `long long int'.])
+      [Define to 1 if the system has the type 'long long int'.])
   fi
 ])
 
@@ -77,7 +77,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
      fi])
   if test $ac_cv_type_unsigned_long_long_int = yes; then
     AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type `unsigned long long int'.])
+      [Define to 1 if the system has the type 'unsigned long long int'.])
   fi
 ])
 
diff --git a/lib/gl/m4/threadlib.m4 b/lib/gl/m4/threadlib.m4
index ed9188a..9cedb67 100644
--- a/lib/gl/m4/threadlib.m4
+++ b/lib/gl/m4/threadlib.m4
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 8 (gettext-0.18.2)
+# threadlib.m4 serial 9 (gettext-0.18.2)
 dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@ dnl default is 'no', otherwise it is system dependent. In 
both cases, the user
 dnl can change the choice through the options --enable-threads=choice or
 dnl --disable-threads.
 dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
-dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl USE_PTH_THREADS, USE_WINDOWS_THREADS
 dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
 dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
 dnl libtool).
@@ -53,7 +53,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
     [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
     [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
   AC_ARG_ENABLE([threads],
-AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify 
multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify 
multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
 AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
     [gl_use_threads=$enableval],
     [if test -n "$gl_use_threads_default"; then
@@ -276,17 +276,19 @@ int main ()
       fi
     fi
     if test -z "$gl_have_pthread"; then
-      if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
-        if { case "$host_os" in
-               mingw*) true;;
-               *) false;;
-             esac
-           }; then
-          gl_threads_api=win32
-          AC_DEFINE([USE_WIN32_THREADS], [1],
-            [Define if the Win32 multithreading API can be used.])
-        fi
-      fi
+      case "$gl_use_threads" in
+        yes | windows | win32) # The 'win32' is for backward compatibility.
+          if { case "$host_os" in
+                 mingw*) true;;
+                 *) false;;
+               esac
+             }; then
+            gl_threads_api=windows
+            AC_DEFINE([USE_WINDOWS_THREADS], [1],
+              [Define if the native Windows multithreading API can be used.])
+          fi
+          ;;
+      esac
     fi
   fi
   AC_MSG_CHECKING([for multithread API to use])
@@ -358,7 +360,7 @@ dnl Cygwin            posix       -lpthread       Y      OK
 dnl
 dnl Any of the above  pth         -lpth                  0.0
 dnl
-dnl Mingw             win32                       N      OK
+dnl Mingw             windows                     N      OK
 dnl
 dnl BeOS 5            --
 dnl
diff --git a/lib/gl/strverscmp.c b/lib/gl/strverscmp.c
index e1093fb..5456519 100644
--- a/lib/gl/strverscmp.c
+++ b/lib/gl/strverscmp.c
@@ -43,7 +43,7 @@
    - It's typically faster.
    POSIX says that only '0' through '9' are digits.  Prefer ISDIGIT to
    isdigit unless it's important to use the locale's definition
-   of `digit' even when the host does not conform to POSIX.  */
+   of "digit" even when the host does not conform to POSIX.  */
 #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
 
 #undef __strverscmp
diff --git a/lib/gltests/Makefile.am b/lib/gltests/Makefile.am
index df6a4a0..0107ffa 100644
--- a/lib/gltests/Makefile.am
+++ b/lib/gltests/Makefile.am
@@ -148,7 +148,7 @@ BUILT_SOURCES += inttypes.h
 
 # We need the following in order to create <inttypes.h> when the system
 # doesn't have one that works with the given compiler.
-inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
+inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H) $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f address@hidden $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
@@ -169,10 +169,12 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status 
$(WARN_ON_USE_H) $(ARG_N
              -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
              -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
              -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+             -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
              -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' 
\
              -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
              -e 
's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
              -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' 
\
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
              < $(srcdir)/inttypes.in.h; \
diff --git a/lib/gltests/glthread/lock.c b/lib/gltests/glthread/lock.c
index 90cb59d..3ab4fad 100644
--- a/lib/gltests/glthread/lock.c
+++ b/lib/gltests/glthread/lock.c
@@ -630,7 +630,7 @@ glthread_once_singlethreaded (gl_once_t *once_control)
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 /* -------------------------- gl_lock_t datatype -------------------------- */
 
diff --git a/lib/gltests/glthread/lock.h b/lib/gltests/glthread/lock.h
index ab93f20..02377cd 100644
--- a/lib/gltests/glthread/lock.h
+++ b/lib/gltests/glthread/lock.h
@@ -614,7 +614,7 @@ extern int glthread_once_singlethreaded (gl_once_t 
*once_control);
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 # include <windows.h>
@@ -623,8 +623,8 @@ extern int glthread_once_singlethreaded (gl_once_t 
*once_control);
 extern "C" {
 # endif
 
-/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex,
-   Semaphore types, because
+/* We can use CRITICAL_SECTION directly, rather than the native Windows Event,
+   Mutex, Semaphore types, because
      - we need only to synchronize inside a single process (address space),
        not inter-process locking,
      - we don't need to support trylock operations.  (TryEnterCriticalSection
@@ -710,9 +710,9 @@ extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock);
 
 /* --------------------- gl_recursive_lock_t datatype --------------------- */
 
-/* The Win32 documentation says that CRITICAL_SECTION already implements a
-   recursive lock.  But we need not rely on it: It's easy to implement a
-   recursive lock without this assumption.  */
+/* The native Windows documentation says that CRITICAL_SECTION already
+   implements a recursive lock.  But we need not rely on it: It's easy to
+   implement a recursive lock without this assumption.  */
 
 typedef struct
         {
@@ -764,7 +764,7 @@ extern void glthread_once_func (gl_once_t *once_control, 
void (*initfunction) (v
 
 /* ========================================================================= */
 
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WIN32_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WINDOWS_THREADS)
 
 /* Provide dummy implementation if threads are not supported.  */
 
diff --git a/lib/gltests/glthread/thread.c b/lib/gltests/glthread/thread.c
index 4f13a05..be0a871 100644
--- a/lib/gltests/glthread/thread.c
+++ b/lib/gltests/glthread/thread.c
@@ -43,7 +43,7 @@ const gl_thread_t gl_null_thread /* = { .p = NULL } */;
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 #include <process.h>
 
diff --git a/lib/gltests/glthread/thread.h b/lib/gltests/glthread/thread.h
index 5055c77..b95d6a2 100644
--- a/lib/gltests/glthread/thread.h
+++ b/lib/gltests/glthread/thread.h
@@ -290,7 +290,7 @@ typedef thread_t gl_thread_t;
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 # include <windows.h>
@@ -337,7 +337,7 @@ extern int gl_thread_exit_func (void *retval);
 
 /* ========================================================================= */
 
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WIN32_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WINDOWS_THREADS)
 
 /* Provide dummy implementation if threads are not supported.  */
 
diff --git a/lib/gltests/glthread/yield.h b/lib/gltests/glthread/yield.h
index f030b98..040afe3 100644
--- a/lib/gltests/glthread/yield.h
+++ b/lib/gltests/glthread/yield.h
@@ -89,7 +89,7 @@ extern "C" {
 
 /* ========================================================================= */
 
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
 
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 # include <windows.h>
@@ -109,7 +109,7 @@ extern "C" {
 
 /* ========================================================================= */
 
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WIN32_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || 
USE_WINDOWS_THREADS)
 
 /* Provide dummy implementation if threads are not supported.  */
 
diff --git a/lib/gltests/init.sh b/lib/gltests/init.sh
index 9485492..5985552 100644
--- a/lib/gltests/init.sh
+++ b/lib/gltests/init.sh
@@ -61,7 +61,7 @@ ME_=`expr "./$0" : '.*/\(.*\)$'`
 
 # We use a trap below for cleanup.  This requires us to go through
 # hoops to get the right exit status transported through the handler.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
 # Turn off errexit here so that we don't trip the bug with OSF1/Tru64
 # sh inside this function.
 Exit () { set +e; (exit $1); exit $1; }
@@ -172,7 +172,7 @@ else
     if test "$re_shell_" = __current__; then
       # 'eval'ing this code makes Solaris 10's /bin/sh exit with
       # $? set to 2.  It does not evaluate any of the code after the
-      # "unexpected" first `('.  Thus, we must run it in a subshell.
+      # "unexpected" first '('.  Thus, we must run it in a subshell.
       ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
     else
       "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
@@ -255,7 +255,7 @@ compare_dev_null_ ()
   return 2
 }
 
-if diff_out_=`( diff -u "$0" "$0" < /dev/null ) 2>/dev/null`; then
+if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null`; then
   if test -z "$diff_out_"; then
     compare_ () { diff -u "$@"; }
   else
@@ -273,7 +273,7 @@ if diff_out_=`( diff -u "$0" "$0" < /dev/null ) 
2>/dev/null`; then
       fi
     }
   fi
-elif diff_out_=`( diff -c "$0" "$0" < /dev/null ) 2>/dev/null`; then
+elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
   if test -z "$diff_out_"; then
     compare_ () { diff -c "$@"; }
   else
diff --git a/lib/gltests/inttypes.in.h b/lib/gltests/inttypes.in.h
index e08a660..b9da2b5 100644
--- a/lib/gltests/inttypes.in.h
+++ b/lib/gltests/inttypes.in.h
@@ -56,6 +56,8 @@
 # error "This file assumes that 'int' has exactly 32 bits. Please report your 
platform and compiler to <address@hidden>."
 #endif
 
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
 /* The definition of _GL_ARG_NONNULL is copied here.  */
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
@@ -1077,10 +1079,23 @@ _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
 #endif
 
 #if @GNULIB_STRTOIMAX@
-# if address@hidden@
-#  undef strtoimax
-extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# if @REPLACE_STRTOIMAX@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strtoimax
+#   define strtoimax rpl_strtoimax
+#  endif
+_GL_FUNCDECL_RPL (strtoimax, intmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
+# else
+#  if address@hidden@
+#   undef strtoimax
+_GL_FUNCDECL_SYS (strtoimax, intmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
 # endif
+_GL_CXXALIASWARN (strtoimax);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoimax
 # if HAVE_RAW_DECL_STRTOIMAX
@@ -1092,8 +1107,11 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
 #if @GNULIB_STRTOUMAX@
 # if address@hidden@
 #  undef strtoumax
-extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+_GL_FUNCDECL_SYS (strtoumax, uintmax_t,
+                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
 # endif
+_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
+_GL_CXXALIASWARN (strtoumax);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoumax
 # if HAVE_RAW_DECL_STRTOUMAX
diff --git a/lib/gltests/localename.c b/lib/gltests/localename.c
index 7c39bcd..869dbf2 100644
--- a/lib/gltests/localename.c
+++ b/lib/gltests/localename.c
@@ -15,7 +15,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Written by Ulrich Drepper <address@hidden>, 1995.  */
-/* Win32 code written by Tor Lillqvist <address@hidden>.  */
+/* Native Windows code written by Tor Lillqvist <address@hidden>.  */
 /* MacOS X code written by Bruno Haible <address@hidden>.  */
 
 #include <config.h>
@@ -54,10 +54,10 @@
 #endif
 
 #if defined _WIN32 || defined __WIN32__
-# define WIN32_NATIVE
+# define WINDOWS_NATIVE
 #endif
 
-#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 /* List of language codes, sorted by value:
@@ -1405,11 +1405,11 @@ gl_locale_name_canonicalize (char *name)
 #endif
 
 
-#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
 
-/* Canonicalize a Win32 native locale name to a Unix locale name.
+/* Canonicalize a Windows native locale name to a Unix locale name.
    NAME is a sufficiently large buffer.
-   On input, it contains the Win32 locale name.
+   On input, it contains the Windows locale name.
    On output, it contains the Unix locale name.  */
 # if !defined IN_LIBINTL
 static
@@ -1465,9 +1465,9 @@ gl_locale_name_from_win32_LANGID (LANGID langid)
     }
   /* Internet Explorer has an LCID to RFC3066 name mapping stored in
      HKEY_CLASSES_ROOT\Mime\Database\Rfc1766.  But we better don't use that
-     since IE's i18n subsystem is known to be inconsistent with the Win32 base
-     (e.g. they have different character conversion facilities that produce
-     different results).  */
+     since IE's i18n subsystem is known to be inconsistent with the native
+     Windows base (e.g. they have different character conversion facilities
+     that produce different results).  */
   /* Use our own table.  */
   {
     int primary, sub;
@@ -2866,7 +2866,7 @@ gl_locale_name_default (void)
          "C.UTF-8" locale, which operates in the same way as the "C" locale.
   */
 
-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined 
WIN32_NATIVE || defined __CYGWIN__)
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined 
WINDOWS_NATIVE || defined __CYGWIN__)
 
   /* The system does not have a way of setting the locale, other than the
      POSIX specified environment variables.  We use C as default locale.  */
@@ -2921,11 +2921,11 @@ gl_locale_name_default (void)
 
 # endif
 
-# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin 
*/
   {
     LCID lcid;
 
-    /* Use native Win32 API locale ID.  */
+    /* Use native Windows API locale ID.  */
     lcid = GetThreadLocale ();
 
     return gl_locale_name_from_win32_LCID (lcid);
diff --git a/lib/gltests/putenv.c b/lib/gltests/putenv.c
index 5f26b66..3c0f7ea 100644
--- a/lib/gltests/putenv.c
+++ b/lib/gltests/putenv.c
@@ -43,7 +43,7 @@ extern char **environ;
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
@@ -91,7 +91,7 @@ _unsetenv (const char *name)
 
 
 /* Put STRING, which is of the form "NAME=VALUE", in the environment.
-   If STRING contains no `=', then remove STRING from the environment.  */
+   If STRING contains no '=', then remove STRING from the environment.  */
 int
 putenv (char *string)
 {
diff --git a/lib/gltests/setenv.c b/lib/gltests/setenv.c
index 3854a99..8201be2 100644
--- a/lib/gltests/setenv.c
+++ b/lib/gltests/setenv.c
@@ -49,7 +49,7 @@
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
@@ -103,11 +103,11 @@ static void *known_values;
 static char **last_environ;
 
 
-/* This function is used by `setenv' and `putenv'.  The difference between
+/* This function is used by 'setenv' and 'putenv'.  The difference between
    the two functions is that for the former must create a new string which
-   is then placed in the environment, while the argument of `putenv'
+   is then placed in the environment, while the argument of 'putenv'
    must be used directly.  This is all complicated by the fact that we try
-   to reuse values once generated for a `setenv' call since we can never
+   to reuse values once generated for a 'setenv' call since we can never
    free the strings.  */
 int
 __add_to_environ (const char *name, const char *value, const char *combined,
@@ -299,7 +299,7 @@ setenv (const char *name, const char *value, int replace)
   return __add_to_environ (name, value, NULL, replace);
 }
 
-/* The `clearenv' was planned to be added to POSIX.1 but probably
+/* The 'clearenv' was planned to be added to POSIX.1 but probably
    never made it.  Nevertheless the POSIX.9 standard (POSIX bindings
    for Fortran 77) requires this function.  */
 int
diff --git a/lib/gltests/setlocale.c b/lib/gltests/setlocale.c
index caa1b87..8a47cde 100644
--- a/lib/gltests/setlocale.c
+++ b/lib/gltests/setlocale.c
@@ -74,7 +74,7 @@ category_to_name (int category)
 
 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
-/* The native Win32 setlocale() function expects locale names of the form
+/* The native Windows setlocale() function expects locale names of the form
    "German" or "German_Germany" or "DEU", but not "de" or "de_DE".  We need
    to convert the names from the form with ISO 639 language code and ISO 3166
    country code to the form with English names or with three-letter identifier.
diff --git a/lib/gltests/test-init.sh b/lib/gltests/test-init.sh
index 123da8e..3368a99 100755
--- a/lib/gltests/test-init.sh
+++ b/lib/gltests/test-init.sh
@@ -52,14 +52,20 @@ EOF
   compare empty in >out 2>err && fail=1
   # Remove the TAB-date suffix on each --- and +++ line,
   # for both the expected and the actual output files.
+  # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ:
+  # -@@ -0,0 +1 @@
+  # +@@ -1,0 +1,1 @@
   cat <<\EOF > exp
 --- empty
 +++ in
-@@ -0,0 +1 @@
 +xyz
 EOF
-  sed 's/      .*//' out > k && mv k out
-  compare exp out || fail=1
+  sed 's/      .*//;/^@@/d' out > k && mv k out
+
+  # Compare against expected output only if compare is using diff -u.
+  if (diff -u out out < /dev/null) > /dev/null 2>&1; then
+    compare exp out || fail=1
+  fi
   case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
 }
 
diff --git a/lib/gltests/test-lock.c b/lib/gltests/test-lock.c
index 15851da..06bb3df 100644
--- a/lib/gltests/test-lock.c
+++ b/lib/gltests/test-lock.c
@@ -18,7 +18,7 @@
 
 #include <config.h>
 
-#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || 
USE_WIN32_THREADS
+#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || 
USE_WINDOWS_THREADS
 
 #if USE_POSIX_THREADS
 # define TEST_POSIX_THREADS 1
@@ -29,8 +29,8 @@
 #if USE_PTH_THREADS
 # define TEST_PTH_THREADS 1
 #endif
-#if USE_WIN32_THREADS
-# define TEST_WIN32_THREADS 1
+#if USE_WINDOWS_THREADS
+# define TEST_WINDOWS_THREADS 1
 #endif
 
 /* Whether to enable locking.
@@ -69,7 +69,7 @@
 # undef USE_POSIX_THREADS
 # undef USE_SOLARIS_THREADS
 # undef USE_PTH_THREADS
-# undef USE_WIN32_THREADS
+# undef USE_WINDOWS_THREADS
 #endif
 #include "glthread/lock.h"
 
@@ -83,8 +83,8 @@
 # if TEST_PTH_THREADS
 #  define USE_PTH_THREADS 1
 # endif
-# if TEST_WIN32_THREADS
-#  define USE_WIN32_THREADS 1
+# if TEST_WINDOWS_THREADS
+#  define USE_WINDOWS_THREADS 1
 # endif
 #endif
 
diff --git a/lib/gltests/test-setlocale2.sh b/lib/gltests/test-setlocale2.sh
index 723e74e..904e147 100755
--- a/lib/gltests/test-setlocale2.sh
+++ b/lib/gltests/test-setlocale2.sh
@@ -2,14 +2,16 @@
 
 # Test locale names with likely unsupported encoding in Unix syntax.
 for name in ar_SA.ISO-8859-1 fr_FR.CP1251 zh_TW.GB18030 zh_CN.BIG5; do
-  LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
+  env LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
 done
 
 # Test locale names with likely unsupported encoding in native Windows syntax.
 for name in "Arabic_Saudi Arabia.1252" "Arabic_Saudi Arabia.65001" \
             French_France.65001 Japanese_Japan.65001 Turkish_Turkey.65001 \
             Chinese_Taiwan.65001 Chinese_China.54936 Chinese_China.65001; do
-  LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
+  # Here we use 'env' to set the LC_ALL environment variable, because on
+  # Solaris 11 2011-11, the /bin/sh refuses to do it for Turkish_Turkey.65001.
+  env LC_ALL="$name" ./test-setlocale2${EXEEXT} 1 || exit 1
 done
 
 exit 0
diff --git a/lib/gltests/test-thread_create.c b/lib/gltests/test-thread_create.c
index 8de098b..0f86771 100644
--- a/lib/gltests/test-thread_create.c
+++ b/lib/gltests/test-thread_create.c
@@ -67,7 +67,7 @@ main ()
     }
   else
     {
-#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || 
USE_WIN32_THREADS
+#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || 
USE_WINDOWS_THREADS
       fputs ("glthread_create failed\n", stderr);
       return 1;
 #else
diff --git a/lib/gltests/unsetenv.c b/lib/gltests/unsetenv.c
index b1e659b..ddbe9a4 100644
--- a/lib/gltests/unsetenv.c
+++ b/lib/gltests/unsetenv.c
@@ -36,7 +36,7 @@
 #endif
 
 #if _LIBC
-/* This lock protects against simultaneous modifications of `environ'.  */
+/* This lock protects against simultaneous modifications of 'environ'.  */
 # include <bits/libc-lock.h>
 __libc_lock_define_initialized (static, envlock)
 # define LOCK   __libc_lock_lock (envlock)
diff --git a/lib/gltests/verify.h b/lib/gltests/verify.h
index e9d6666..cef14ad 100644
--- a/lib/gltests/verify.h
+++ b/lib/gltests/verify.h
@@ -21,13 +21,11 @@
 # define _GL_VERIFY_H
 
 
-/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the
-   C1X draft N1548 section 6.7.10.  This is supported by GCC 4.6.0 and
-   later, in C mode, and its use here generates easier-to-read diagnostics
-   when verify (R) fails.
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
+   This is supported by GCC 4.6.0 and later, in C mode, and its use
+   here generates easier-to-read diagnostics when verify (R) fails.
 
-   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per the
-   C++0X draft N3242 section 7.(4).
+   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
    This will likely be supported by future GCC versions, in C++ mode.
 
    Use this only with GCC.  If we were willing to slow 'configure'
@@ -188,7 +186,7 @@ template <int w>
    trailing ';'.  If R is false, fail at compile-time, preferably
    with a diagnostic that includes the string-literal DIAGNOSTIC.
 
-   Unfortunately, unlike C1X, this implementation must appear as an
+   Unfortunately, unlike C11, this implementation must appear as an
    ordinary declaration, and cannot appear inside struct { ... }.  */
 
 # ifdef _GL_HAVE__STATIC_ASSERT
@@ -205,7 +203,7 @@ template <int w>
 #   define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
 #  endif
 #  if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
-#   define static_assert _Static_assert /* Draft C1X requires this #define.  */
+#   define static_assert _Static_assert /* C11 requires this #define.  */
 #  endif
 # endif
 
diff --git a/lib/idn-free.c b/lib/idn-free.c
index 862e0ea..651212b 100644
--- a/lib/idn-free.c
+++ b/lib/idn-free.c
@@ -1,24 +1,31 @@
-/* idn-free.c --- Invoke the `free' function releasing memory
- *                allocated by libidn functions.
- * Copyright (C) 2004-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+/* idn-free.h --- Invoke the free function to release memory
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 
diff --git a/lib/idn-free.h b/lib/idn-free.h
index 2abe494..58f3a2a 100644
--- a/lib/idn-free.h
+++ b/lib/idn-free.h
@@ -1,24 +1,31 @@
-/* idn-free.h --- Invoke the `free' function releasing memory
- *                allocated by libidn functions.
- * Copyright (C) 2004-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+/* idn-free.h --- Invoke the free function to release memory
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifndef IDN_FREE_H
 # define IDN_FREE_H
diff --git a/lib/idna.c b/lib/idna.c
index 3d76630..9ab413c 100644
--- a/lib/idna.c
+++ b/lib/idna.c
@@ -1,23 +1,31 @@
-/* idna.c --- Convert to or from IDN strings.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+/* idna.c --- Prototypes for Internationalized Domain Name library.
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -515,7 +523,8 @@ idna_to_ascii_4z (const uint32_t * input, char **output, 
int flags)
 
       if (out)
        {
-         char *newp = realloc (out, strlen (out) + 1 + strlen (buf) + 1);
+         size_t l = strlen (out) + 1 + strlen (buf) + 1;
+         char *newp = realloc (out, l);
          if (!newp)
            {
              free (out);
@@ -527,7 +536,8 @@ idna_to_ascii_4z (const uint32_t * input, char **output, 
int flags)
        }
       else
        {
-         out = (char *) malloc (strlen (buf) + 1);
+         size_t l = strlen (buf) + 1;
+         out = (char *) malloc (l);
          if (!out)
            return IDNA_MALLOC_ERROR;
          strcpy (out, buf);
diff --git a/lib/idna.h b/lib/idna.h
index 98c43bb..2b58f8a 100644
--- a/lib/idna.h
+++ b/lib/idna.h
@@ -1,23 +1,31 @@
-/* idna.h --- Declarations for Internationalized Domain Name in Applications.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+/* idna.h --- Prototypes for Internationalized Domain Name library.
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifndef IDNA_H
 # define IDNA_H
diff --git a/lib/libidn.map b/lib/libidn.map
index 34efd2f..07a4e80 100644
--- a/lib/libidn.map
+++ b/lib/libidn.map
@@ -2,19 +2,18 @@
 #
 # This file is part of GNU Libidn.
 #
-# GNU Libidn 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.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-# GNU Libidn is distributed in the hope that it will be useful,
+# This program 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.
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with GNU Libidn; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 LIBIDN_1.0
 {
diff --git a/lib/nfkc.c b/lib/nfkc.c
index 45ce569..a52d74b 100644
--- a/lib/nfkc.c
+++ b/lib/nfkc.c
@@ -1,23 +1,31 @@
 /* nfkc.c --- Unicode normalization utilities.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1073,14 +1081,14 @@ stringprep_utf8_nfkc_normalize (const char *str, 
ssize_t len)
  * @str: a Unicode string.
  * @len: length of @str array, or -1 if @str is nul-terminated.
  *
- * Converts UCS4 string into UTF-8 and runs
- * stringprep_utf8_nfkc_normalize().
+ * Converts a UCS4 string into canonical form, see
+ * stringprep_utf8_nfkc_normalize() for more information.
  *
  * Return value: a newly allocated Unicode string, that is the NFKC
  *   normalized form of @str.
  **/
 uint32_t *
-stringprep_ucs4_nfkc_normalize (uint32_t * str, ssize_t len)
+stringprep_ucs4_nfkc_normalize (const uint32_t * str, ssize_t len)
 {
   char *p;
   uint32_t *result_wc;
diff --git a/lib/pr29.c b/lib/pr29.c
index 98087c3..fcf798d 100644
--- a/lib/pr29.c
+++ b/lib/pr29.c
@@ -1,23 +1,31 @@
 /* pr29.h --- Detect strings that are non-idempotent under NFKC in Unicode 3.2.
- * Copyright (C) 2004-2012 Simon Josefsson.
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 
@@ -1256,7 +1264,7 @@ pr29_4 (const uint32_t * in, size_t len)
     if ((row = first_column (in[i])) > 0)
       for (j = i + 1; j < len; j++)
        if (combinationclass (in[j]))
-         for (k = j + 1; k < len; j++)
+         for (k = j + 1; k < len; k++)
            if (in_last_column_row (in[k], row))
              return PR29_PROBLEM;
 
diff --git a/lib/pr29.h b/lib/pr29.h
index 69f129d..bf1bba1 100644
--- a/lib/pr29.h
+++ b/lib/pr29.h
@@ -1,23 +1,31 @@
 /* pr29.h --- Detect strings which are non-idempotent under NFKC.
- * Copyright (C) 2004-2012 Simon Josefsson.
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifndef PR29_H
 # define PR29_H
diff --git a/lib/profiles.c b/lib/profiles.c
index a4290d7..912ee43 100644
--- a/lib/profiles.c
+++ b/lib/profiles.c
@@ -1,23 +1,31 @@
 /* profiles.c --- Definitions of stringprep profiles.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 #include "stringprep.h"
diff --git a/lib/punycode.c b/lib/punycode.c
index 6e58b2a..9037f51 100644
--- a/lib/punycode.c
+++ b/lib/punycode.c
@@ -1,23 +1,31 @@
 /* punycode.c --- Implementation of punycode used to ASCII encode IDN's.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 /*
  * This file is derived from RFC 3492bis written by Adam M. Costello.
diff --git a/lib/punycode.h b/lib/punycode.h
index c350d7e..0fea6c9 100644
--- a/lib/punycode.h
+++ b/lib/punycode.h
@@ -1,26 +1,35 @@
 /* punycode.h --- Declarations for punycode functions.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 /*
- * This file is derived from RFC 3492bis written by Adam M. Costello.
+ * This file contains content derived from RFC 3492bis written by Adam
+ * M. Costello.
  *
  * Disclaimer and license: Regarding this entire document or any
  * portion of it (including the pseudocode and C code), the author
diff --git a/lib/strerror-idna.c b/lib/strerror-idna.c
index 9660886..2ef181d 100644
--- a/lib/strerror-idna.c
+++ b/lib/strerror-idna.c
@@ -1,23 +1,31 @@
 /* strerror-idna.c --- Convert IDNA errors into text.
- * Copyright (C) 2004-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
diff --git a/lib/strerror-pr29.c b/lib/strerror-pr29.c
index 4c03c72..003ed59 100644
--- a/lib/strerror-pr29.c
+++ b/lib/strerror-pr29.c
@@ -1,23 +1,31 @@
 /* strerror-pr29.c --- Convert PR29 errors into text.
- * Copyright (C) 2004-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
diff --git a/lib/strerror-punycode.c b/lib/strerror-punycode.c
index a3b56c1..856b808 100644
--- a/lib/strerror-punycode.c
+++ b/lib/strerror-punycode.c
@@ -1,23 +1,31 @@
 /* strerror-punycode.c --- Convert punycode errors into text.
- * Copyright (C) 2004-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
diff --git a/lib/strerror-stringprep.c b/lib/strerror-stringprep.c
index db4df94..cb6f636 100644
--- a/lib/strerror-stringprep.c
+++ b/lib/strerror-stringprep.c
@@ -1,23 +1,31 @@
 /* strerror-stringprep.c --- Convert stringprep errors into text.
- * Copyright (C) 2004-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
diff --git a/lib/strerror-tld.c b/lib/strerror-tld.c
index 1b7133e..7c87fb7 100644
--- a/lib/strerror-tld.c
+++ b/lib/strerror-tld.c
@@ -1,23 +1,31 @@
 /* strerror-tld.c --- Convert TLD errors into text.
- * Copyright (C) 2004-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2004-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
diff --git a/lib/stringprep.c b/lib/stringprep.c
index 6199c9b..4c85970 100644
--- a/lib/stringprep.c
+++ b/lib/stringprep.c
@@ -1,23 +1,31 @@
 /* stringprep.c --- Core stringprep implementation.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
diff --git a/lib/stringprep.h b/lib/stringprep.h
index dddd262..80ae2ed 100644
--- a/lib/stringprep.h
+++ b/lib/stringprep.h
@@ -1,23 +1,31 @@
 /* stringprep.h --- Header file for stringprep functions.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifndef STRINGPREP_H
 # define STRINGPREP_H
@@ -216,7 +224,7 @@ extern "C"
 
   extern IDNAPI char *stringprep_utf8_nfkc_normalize (const char *str,
                                                      ssize_t len);
-  extern IDNAPI uint32_t *stringprep_ucs4_nfkc_normalize (uint32_t * str,
+  extern IDNAPI uint32_t *stringprep_ucs4_nfkc_normalize (const uint32_t * str,
                                                          ssize_t len);
 
   extern IDNAPI const char *stringprep_locale_charset (void);
diff --git a/lib/tld.c b/lib/tld.c
index 69817ac..17a1ed9 100644
--- a/lib/tld.c
+++ b/lib/tld.c
@@ -1,26 +1,34 @@
-/* tld.c --- Handle TLD restriction checking.
- * Copyright (C) 2004-2012 Simon Josefsson.
- * Copyright (C) 2003-2012 Free Software Foundation, Inc.
- *
- * Author: Thomas Jacob, Internet24.de
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+/* tld.c --- Declarations for TLD restriction checking.
+   Copyright (C) 2004-2012 Simon Josefsson.
+   Copyright (C) 2003-2012 Free Software Foundation, Inc.
+
+   Author: Thomas Jacob, Internet24.de
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 
diff --git a/lib/tld.h b/lib/tld.h
index 9d00602..4d23e6c 100644
--- a/lib/tld.h
+++ b/lib/tld.h
@@ -1,26 +1,34 @@
 /* tld.h --- Declarations for TLD restriction checking.
- * Copyright (C) 2004-2012 Simon Josefsson.
- * Copyright (C) 2003-2012 Free Software Foundation, Inc.
- *
- * Author: Thomas Jacob, Internet24.de
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2004-2012 Simon Josefsson.
+   Copyright (C) 2003-2012 Free Software Foundation, Inc.
+
+   Author: Thomas Jacob, Internet24.de
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifndef TLD_H
 # define TLD_H
diff --git a/lib/toutf8.c b/lib/toutf8.c
index aabaaf2..c31a826 100644
--- a/lib/toutf8.c
+++ b/lib/toutf8.c
@@ -1,23 +1,31 @@
 /* toutf8.c --- Convert strings from system locale into UTF-8.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file is part of GNU Libidn.
- *
- * GNU Libidn 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.
- *
- * GNU Libidn 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 GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
diff --git a/lib/version.c b/lib/version.c
index bb823ff..843f4b2 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -1,21 +1,31 @@
 /* version.c --- Version handling.
- * Copyright (C) 2002-2012 Simon Josefsson
- *
- * This file 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.
- *
- * This file 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 this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
- *
- */
+   Copyright (C) 2002-2012 Simon Josefsson
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
diff --git a/libc/example.c b/libc/example.c
index 3c0a255..062efd2 100644
--- a/libc/example.c
+++ b/libc/example.c
@@ -3,19 +3,18 @@
  *
  * This file is part of GNU Libidn.
  *
- * GNU Libidn 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.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  *
- * GNU Libidn is distributed in the hope that it will be useful,
+ * This program 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GNU Libidn; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
 
diff --git a/maint.mk b/maint.mk
index 8a1e635..3e16b50 100644
--- a/maint.mk
+++ b/maint.mk
@@ -126,7 +126,7 @@ export LC_ALL = C
 
 _cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
 
-# Collect the names of rules starting with `sc_'.
+# Collect the names of rules starting with 'sc_'.
 syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' 
\
                        $(srcdir)/$(ME) $(_cfg_mk)))
 .PHONY: $(syntax-check-rules)
@@ -294,7 +294,7 @@ sc_space_tab:
        halt='found SPACE-TAB sequence; remove the SPACE'               \
          $(_sc_search_regexp)
 
-# Don't use *scanf or the old ato* functions in `real' code.
+# Don't use *scanf or the old ato* functions in "real" code.
 # They provide no error checking mechanism.
 # Instead, use strto* functions.
 sc_prohibit_atoi_atof:
@@ -326,15 +326,15 @@ sc_prohibit_magic_number_exit:
          $(_sc_search_regexp)
 
 # Using EXIT_SUCCESS as the first argument to error is misleading,
-# since when that parameter is 0, error does not exit.  Use `0' instead.
+# since when that parameter is 0, error does not exit.  Use '0' instead.
 sc_error_exit_success:
        @prohibit='error *\(EXIT_SUCCESS,'                              \
        in_vc_files='\.[chly]$$'                                        \
        halt='found error (EXIT_SUCCESS'                                \
         $(_sc_search_regexp)
 
-# `FATAL:' should be fully upper-cased in error messages
-# `WARNING:' should be fully upper-cased, or fully lower-cased
+# "FATAL:" should be fully upper-cased in error messages
+# "WARNING:" should be fully upper-cased, or fully lower-cased
 sc_error_message_warn_fatal:
        @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT))              \
            | grep -E '"Warning|"Fatal|"fatal' &&                       \
@@ -1078,15 +1078,15 @@ sc_po_check:
 
 # Sometimes it is useful to change the PATH environment variable
 # in Makefiles.  When doing so, it's better not to use the Unix-centric
-# path separator of `:', but rather the automake-provided `$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use `:'\'' above; use $$(PATH_SEPARATOR) instead'
+# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
+msg = '$(ME): Do not use '\'':'\'' above; use $$(PATH_SEPARATOR) instead'
 sc_makefile_path_separator_check:
        @prohibit='PATH[=].*:'                                          \
        in_vc_files='akefile|\.mk$$'                                    \
        halt=$(msg)                                                     \
          $(_sc_search_regexp)
 
-# Check that `make alpha' will not fail at the end of the process,
+# Check that 'make alpha' will not fail at the end of the process,
 # i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
 # and is read-only.
 writable-files:
@@ -1446,9 +1446,9 @@ ifeq (a,b)
 # TS-start
 
 # Most functions should have static scope.
-# Any that don't must be marked with `extern', but `main'
-# and `usage' are exceptions: they're always extern, but
-# do not need to be marked.  Symbols matching `__.*' are
+# Any that don't must be marked with 'extern', but 'main'
+# and 'usage' are exceptions: they're always extern, but
+# do not need to be marked.  Symbols matching '__.*' are
 # reserved by the compiler, so are automatically excluded below.
 _gl_TS_unmarked_extern_functions ?= main usage
 _gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) *\(/
@@ -1458,9 +1458,9 @@ _gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) 
*\(/
 # export _gl_TS_extern = extern|XTERN
 _gl_TS_extern ?= extern
 
-# The second nm|grep checks for file-scope variables with `extern' scope.
+# The second nm|grep checks for file-scope variables with 'extern' scope.
 # Without gnulib's progname module, you might put program_name here.
-# Symbols matching `__.*' are reserved by the compiler,
+# Symbols matching '__.*' are reserved by the compiler,
 # so are automatically excluded below.
 _gl_TS_unmarked_extern_vars ?=
 
diff --git a/pom.xml.in b/pom.xml.in
index 3080f88..26d53ac 100644
--- a/pom.xml.in
+++ b/pom.xml.in
@@ -13,7 +13,7 @@
   <inceptionYear>2002</inceptionYear>
   <licenses>
     <license>
-      <name>GNU Lesser General Public License version 2.1 or later</name>
+      <name>GNU Lesser General Public License version 3.0 or later</name>
       <url>http://www.gnu.org/licenses/licenses.html</url>
       <distribution>repo</distribution>
     </license>
diff --git a/src/idn.c b/src/idn.c
index 6f60d91..b09762e 100644
--- a/src/idn.c
+++ b/src/idn.c
@@ -48,11 +48,9 @@
 #include "idn_cmd.h"
 
 #define GREETING \
-  "Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon 
Josefsson.\n" \
-  "GNU Libidn comes with NO WARRANTY, to the extent permitted by law.\n" \
-  "You may redistribute copies of GNU Libidn under the terms of\n"     \
-  "the GNU Lesser General Public License.  For more information\n"     \
-  "about these matters, see the file named COPYING.LIB.\n"
+  "Copyright 2002-2012 Simon Josefsson.\n"                              \
+  "GNU Libidn is free software with ABSOLUTELY NO WARRANTY.  For more\n" \
+  "information about these matters, see <http://www.gnu.org/licenses/>.\n"
 
 const char version_etc_copyright[] =
   /* Do *not* mark this string for translation.  %s is a copyright
diff --git a/tests/tst_pr29.c b/tests/tst_pr29.c
index 7d26ce7..4668c02 100644
--- a/tests/tst_pr29.c
+++ b/tests/tst_pr29.c
@@ -52,7 +52,7 @@ static const struct tv tv[] = {
    PR29_PROBLEM},
   {
    "Instability Example",
-   3,
+   4,
    {0x1100, 0x0300, 0x1161, 0x0323, 0},
    PR29_PROBLEM},
   {
@@ -79,7 +79,13 @@ static const struct tv tv[] = {
    "Not a problem sequence 5",
    3,
    {0x1100, 0x00AA, 0x1161, 0},
-   PR29_SUCCESS}
+   PR29_SUCCESS},
+  {
+    /* http://lists.gnu.org/archive/html/help-libidn/2012-01/msg00008.html */
+    "Infloop",
+    3,
+    {0x1100, 0x0300, 0x4711, 0},
+    PR29_SUCCESS}
 };
 
 void
@@ -91,12 +97,24 @@ doit (void)
   for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++)
     {
       if (debug)
-       printf ("PR29 entry %ld: %s\n", i, tv[i].name);
-
-      if (debug)
        {
+         uint32_t *p, *q;
+
+         printf ("PR29 entry %ld: %s\n", i, tv[i].name);
+
          printf ("in:\n");
          ucs4print (tv[i].in, tv[i].inlen);
+
+         printf ("nfkc:\n");
+         p = stringprep_ucs4_nfkc_normalize (tv[i].in, tv[i].inlen);
+         ucs4print (p, -1);
+
+         printf ("second nfkc:\n");
+         q = stringprep_ucs4_nfkc_normalize (p, -1);
+         ucs4print (q, -1);
+
+         free (p);
+         free (q);
        }
 
       rc = pr29_4 (tv[i].in, tv[i].inlen);
@@ -141,6 +159,11 @@ doit (void)
       }
 
       if (debug)
-       printf ("OK\n");
+       {
+         if (tv[i].rc != PR29_SUCCESS)
+           printf ("EXPECTED FAIL\n");
+         else
+           printf ("OK\n");
+       }
     }
 }
diff --git a/tests/utils.c b/tests/utils.c
index 2999778..15e4049 100644
--- a/tests/utils.c
+++ b/tests/utils.c
@@ -112,7 +112,7 @@ ucs4print (const uint32_t * str, size_t len)
   size_t i;
 
   printf ("\t;; ");
-  for (i = 0; i < len; i++)
+  for (i = 0; (len == (size_t) -1) ? str[i] : i < len; i++)
     {
       printf ("U+%04x ", str[i]);
       if ((i + 1) % 4 == 0)
diff --git a/win32/include/ac-stdint.h b/win32/include/ac-stdint.h
index ee58092..e5be451 100644
--- a/win32/include/ac-stdint.h
+++ b/win32/include/ac-stdint.h
@@ -1,20 +1,31 @@
 /* Copyright (C) 2008-2012 Free Software Foundation, Inc.
    Written by Adam Strzelecki <address@hidden>
 
-   This program 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,
-   or (at your option) any later version.
+   This file is part of GNU Libidn.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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.
+   General Public License for more details.
 
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.  */
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifndef _AC_STDINT_H
 #define _AC_STDINT_H 1
diff --git a/win32/include/config.h b/win32/include/config.h
index f341833..4cc8274 100644
--- a/win32/include/config.h
+++ b/win32/include/config.h
@@ -1,3 +1,32 @@
+/* config.h --- System definitions for Windows
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+
+   This file is part of GNU Libidn.
+
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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
+   General Public License for more details.
+
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
+
 #ifndef _CONFIG_H
 #define _CONFIG_H
 
diff --git a/win32/include/idn-int.h b/win32/include/idn-int.h
index 7478f43..ca86658 100644
--- a/win32/include/idn-int.h
+++ b/win32/include/idn-int.h
@@ -1,19 +1,30 @@
 /* Copyright (C) 2008-2012 Free Software Foundation, Inc.
    Written by Adam Strzelecki <address@hidden>
 
-   This program 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,
-   or (at your option) any later version.
+   This file is part of GNU Libidn.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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.
+   General Public License for more details.
 
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.  */
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #include "ac-stdint.h"
diff --git a/win32/include/stdbool.h b/win32/include/stdbool.h
index d10a6da..2a1eb8f 100644
--- a/win32/include/stdbool.h
+++ b/win32/include/stdbool.h
@@ -1,20 +1,31 @@
 /* Copyright (C) 2008-2012 Free Software Foundation, Inc.
    Written by Adam Strzelecki <address@hidden>
 
-   This program 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,
-   or (at your option) any later version.
+   This file is part of GNU Libidn.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   GNU Libidn is free software: you can redistribute it and/or
+   modify it under the terms of either:
+
+     * the GNU Lesser General Public License as published by the Free
+       Software Foundation; either version 3 of the License, or (at
+       your option) any later version.
+
+   or
+
+     * the GNU General Public License as published by the Free
+       Software Foundation; either version 2 of the License, or (at
+       your option) any later version.
+
+   or both in parallel, as here.
+
+   GNU Libidn 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.
+   General Public License for more details.
 
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.  */
+   You should have received copies of the GNU General Public License and
+   the GNU Lesser General Public License along with this program.  If
+   not, see <http://www.gnu.org/licenses/>. */
 
 #ifndef _STDBOOL_H
 #define _STDBOOL_H


hooks/post-receive
-- 
GNU libidn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]