Update for Cygwin 1.7.
diff --git a/libcharset/ChangeLog b/libcharset/ChangeLog
index bb4273f..459b733 100644
--- a/libcharset/ChangeLog
+++ b/libcharset/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-08  Bruno Haible  <bruno@clisp.org>
+
+	* tools/cygwin-1.7.2: New file.
+	* lib/config.charset: Update comments for Cygwin 1.7.
+	* lib/localcharset.c: Likewise.
+
 2010-03-30  Bruno Haible  <bruno@clisp.org>
 
 	* README.woe32: Mention Cygwin.
diff --git a/libcharset/lib/config.charset b/libcharset/lib/config.charset
index 82d2e8d..b9dccbb 100644
--- a/libcharset/lib/config.charset
+++ b/libcharset/lib/config.charset
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Output a system dependent table of character encoding aliases.
 #
-#   Copyright (C) 2000-2004, 2006-2009 Free Software Foundation, Inc.
+#   Copyright (C) 2000-2004, 2006-2010 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or modify it
 #   under the terms of the GNU Library General Public License as published
@@ -31,21 +31,21 @@
 # The current list of GNU canonical charset names is as follows.
 #
 #       name              MIME?             used by which systems
-#   ASCII, ANSI_X3.4-1968       glibc solaris freebsd netbsd darwin
-#   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
-#   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
-#   ISO-8859-3              Y   glibc solaris
+#   ASCII, ANSI_X3.4-1968       glibc solaris freebsd netbsd darwin cygwin
+#   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+#   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+#   ISO-8859-3              Y   glibc solaris cygwin
 #   ISO-8859-4              Y   osf solaris freebsd netbsd openbsd darwin
-#   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
-#   ISO-8859-6              Y   glibc aix hpux solaris
-#   ISO-8859-7              Y   glibc aix hpux irix osf solaris netbsd openbsd darwin
-#   ISO-8859-8              Y   glibc aix hpux osf solaris
-#   ISO-8859-9              Y   glibc aix hpux irix osf solaris darwin
-#   ISO-8859-13                 glibc netbsd openbsd darwin
-#   ISO-8859-14                 glibc
-#   ISO-8859-15                 glibc aix osf solaris freebsd netbsd openbsd darwin
+#   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+#   ISO-8859-6              Y   glibc aix hpux solaris cygwin
+#   ISO-8859-7              Y   glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin
+#   ISO-8859-8              Y   glibc aix hpux osf solaris cygwin
+#   ISO-8859-9              Y   glibc aix hpux irix osf solaris darwin cygwin
+#   ISO-8859-13                 glibc netbsd openbsd darwin cygwin
+#   ISO-8859-14                 glibc cygwin
+#   ISO-8859-15                 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin
 #   KOI8-R                  Y   glibc solaris freebsd netbsd openbsd darwin
-#   KOI8-U                  Y   glibc freebsd netbsd openbsd darwin
+#   KOI8-U                  Y   glibc freebsd netbsd openbsd darwin cygwin
 #   KOI8-T                      glibc
 #   CP437                       dos
 #   CP775                       dos
@@ -62,7 +62,7 @@
 #   CP869                       dos
 #   CP874                       woe32 dos
 #   CP922                       aix
-#   CP932                       aix woe32 dos
+#   CP932                       aix cygwin woe32 dos
 #   CP943                       aix
 #   CP949                       osf darwin woe32 dos
 #   CP950                       woe32 dos
@@ -72,7 +72,7 @@
 #   CP1129                      aix
 #   CP1131                      darwin
 #   CP1250                      woe32
-#   CP1251                      glibc solaris netbsd openbsd darwin woe32
+#   CP1251                      glibc solaris netbsd openbsd darwin cygwin woe32
 #   CP1252                      aix woe32
 #   CP1253                      woe32
 #   CP1254                      woe32
@@ -81,19 +81,19 @@
 #   CP1257                      woe32
 #   GB2312                  Y   glibc aix hpux irix solaris freebsd netbsd darwin
 #   EUC-JP                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin
-#   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin
+#   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
 #   EUC-TW                      glibc aix hpux irix osf solaris netbsd
-#   BIG5                    Y   glibc aix hpux osf solaris freebsd netbsd darwin
+#   BIG5                    Y   glibc aix hpux osf solaris freebsd netbsd darwin cygwin
 #   BIG5-HKSCS                  glibc solaris darwin
-#   GBK                         glibc aix osf solaris darwin woe32 dos
+#   GBK                         glibc aix osf solaris darwin cygwin woe32 dos
 #   GB18030                     glibc solaris netbsd darwin
 #   SHIFT_JIS               Y   hpux osf solaris freebsd netbsd darwin
 #   JOHAB                       glibc solaris woe32
-#   TIS-620                     glibc aix hpux osf solaris
+#   TIS-620                     glibc aix hpux osf solaris cygwin
 #   VISCII                  Y   glibc
 #   TCVN5712-1                  glibc
 #   ARMSCII-8                   glibc darwin
-#   GEORGIAN-PS                 glibc
+#   GEORGIAN-PS                 glibc cygwin
 #   PT154                       glibc
 #   HP-ROMAN8                   hpux
 #   HP-ARABIC8                  hpux
@@ -103,7 +103,7 @@
 #   HP-KANA8                    hpux
 #   DEC-KANJI                   osf
 #   DEC-HANYU                   osf
-#   UTF-8                   Y   glibc aix hpux osf solaris netbsd darwin
+#   UTF-8                   Y   glibc aix hpux osf solaris netbsd darwin cygwin
 #
 # Note: Names which are not marked as being a MIME name should not be used in
 # Internet protocols for information interchange (mail, news, etc.).
diff --git a/libcharset/lib/localcharset.c b/libcharset/lib/localcharset.c
index 2b6e2d6..cbcdace 100644
--- a/libcharset/lib/localcharset.c
+++ b/libcharset/lib/localcharset.c
@@ -1,6 +1,6 @@
 /* Determine a canonical name for the current locale's character encoding.
 
-   Copyright (C) 2000-2006, 2008-2009 Free Software Foundation, Inc.
+   Copyright (C) 2000-2006, 2008-2010 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
@@ -370,10 +370,9 @@
   codeset = nl_langinfo (CODESET);
 
 #  ifdef __CYGWIN__
-  /* Cygwin 1.5.x does not have locales.  nl_langinfo (CODESET) always
-     returns "US-ASCII".  As long as this is not fixed, return the suffix
-     of the locale name from the environment variables (if present) or
-     the codepage as a number.  */
+  /* Cygwin < 1.7 does not have locales.  nl_langinfo (CODESET) always
+     returns "US-ASCII".  Return the suffix of the locale name from the
+     environment variables (if present) or the codepage as a number.  */
   if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
     {
       const char *locale;