summaryrefslogtreecommitdiffstats
path: root/libiconv-1.14-wchar.patch
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2022-01-10 02:43:15 -0500
committerYaakov Selkowitz <yselkowi@redhat.com>2022-01-10 02:43:15 -0500
commit154488fd1b3c9388b0d0ce4039a5a4fd2ee0f539 (patch)
treeb2f312cf4a688bf1bbd6081fccde0213316c1a44 /libiconv-1.14-wchar.patch
parente18c0fee829c06e09992d7588f77e717c3b2f37e (diff)
downloadcygwin-libiconv-main.tar.gz
cygwin-libiconv-main.tar.xz
cygwin-libiconv-main.zip
cygwin-libiconv 1.16HEADmain
Diffstat (limited to 'libiconv-1.14-wchar.patch')
-rw-r--r--libiconv-1.14-wchar.patch103
1 files changed, 0 insertions, 103 deletions
diff --git a/libiconv-1.14-wchar.patch b/libiconv-1.14-wchar.patch
deleted file mode 100644
index 77df371..0000000
--- a/libiconv-1.14-wchar.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-diff -urN origsrc//libiconv-1.14/libcharset/lib/localcharset.c src//libiconv-1.14/libcharset/lib/localcharset.c
---- origsrc//libiconv-1.14/libcharset/lib/localcharset.c 2011-02-28 17:43:35.000000000 -0500
-+++ src//libiconv-1.14/libcharset/lib/localcharset.c 2011-08-28 00:16:57.238000000 -0400
-@@ -54,10 +54,6 @@
- # include <locale.h>
- # endif
- # endif
--# ifdef __CYGWIN__
--# define WIN32_LEAN_AND_MEAN
--# include <windows.h>
--# endif
- #elif defined WIN32_NATIVE
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
-@@ -124,7 +120,7 @@
- cp = charset_aliases;
- if (cp == NULL)
- {
--#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
-+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE)
- const char *dir;
- const char *base = "charset.alias";
- char *file_name;
-@@ -309,7 +305,7 @@
- "DECKOREAN" "\0" "EUC-KR" "\0";
- # endif
-
--# if defined WIN32_NATIVE || defined __CYGWIN__
-+# if defined WIN32_NATIVE
- /* To avoid the troubles of installing a separate file in the same
- directory as the DLL and of retrieving the DLL's directory at
- runtime, simply inline the aliases here. */
-@@ -365,64 +361,12 @@
-
- # if HAVE_LANGINFO_CODESET
-
-- /* Most systems support nl_langinfo (CODESET) nowadays. */
-- codeset = nl_langinfo (CODESET);
--
--# ifdef __CYGWIN__
-- /* 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;
-- static char buf[2 + 10 + 1];
--
-- locale = getenv ("LC_ALL");
-- if (locale == NULL || locale[0] == '\0')
-- {
-- locale = getenv ("LC_CTYPE");
-- if (locale == NULL || locale[0] == '\0')
-- locale = getenv ("LANG");
-- }
-- if (locale != NULL && locale[0] != '\0')
-- {
-- /* If the locale name contains an encoding after the dot, return
-- it. */
-- const char *dot = strchr (locale, '.');
--
-- if (dot != NULL)
-- {
-- const char *modifier;
--
-- dot++;
-- /* Look for the possible @... trailer and remove it, if any. */
-- modifier = strchr (dot, '@');
-- if (modifier == NULL)
-- return dot;
-- if (modifier - dot < sizeof (buf))
-- {
-- memcpy (buf, dot, modifier - dot);
-- buf [modifier - dot] = '\0';
-- return buf;
-- }
-- }
-- }
--
-- /* Woe32 has a function returning the locale's codepage as a number:
-- GetACP(). This encoding is used by Cygwin, unless the user has set
-- the environment variable CYGWIN=codepage:oem (which very few people
-- do).
-- Output directed to console windows needs to be converted (to
-- GetOEMCP() if the console is using a raster font, or to
-- GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
-- this conversion transparently (see winsup/cygwin/fhandler_console.cc),
-- converting to GetConsoleOutputCP(). This leads to correct results,
-- except when SetConsoleOutputCP has been called and a raster font is
-- in use. */
-- sprintf (buf, "CP%u", GetACP ());
-- codeset = buf;
-- }
--# endif
-+ /* Most systems support nl_langinfo (CODESET) nowadays.
-+ POSIX allows that the returned pointer may point to a static area that
-+ may be overwritten by subsequent calls to setlocale or nl_langinfo. */
-+ static char codeset_buf[64];
-+ codeset_buf[0] = '\0';
-+ codeset = strncat (codeset_buf, nl_langinfo (CODESET), sizeof (codeset_buf));
-
- # else
-