summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cygwin-gettext.spec22
-rw-r--r--gettext-0.18.1.1-cygwin-error_h.patch34
-rw-r--r--gettext-0.18.1.1-locale.patch152
-rw-r--r--gettext-0.18.1.1-reloc.patch1002
-rw-r--r--gettext-0.19.3-localename.patch168
-rw-r--r--sources5
6 files changed, 182 insertions, 1201 deletions
diff --git a/cygwin-gettext.spec b/cygwin-gettext.spec
index 574e727..fa90a76 100644
--- a/cygwin-gettext.spec
+++ b/cygwin-gettext.spec
@@ -1,8 +1,8 @@
%{?cygwin_package_header}
Name: cygwin-gettext
-Version: 0.18.1.1
-Release: 3
+Version: 0.19.4
+Release: 1%{?dist}
Summary: GNU libraries and utilities for producing multi-lingual messages
License: GPLv2+ and LGPLv2+
@@ -10,13 +10,12 @@ Group: Development/Libraries
URL: http://www.gnu.org/software/gettext/
BuildArch: noarch
-Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-%{version}.tar.gz
+Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-%{version}.tar.xz
Patch0: gettext-0.18.1.1-autopoint-V.patch
-Patch1: gettext-0.18.1.1-locale.patch
-Patch2: gettext-0.18.1.1-reloc.patch
-Patch3: gettext-0.18.1.1-cygwin-error_h.patch
+Patch1: gettext-0.19.3-localename.patch
Patch4: gettext-0.18.1.1-no-woe32dll.patch
+BuildRequires: autoconf automake libtool
BuildRequires: cygwin32-filesystem >= 10
BuildRequires: cygwin32-gcc
BuildRequires: cygwin32-gcc-c++
@@ -77,14 +76,12 @@ Static version of the Gettext library for the Cygwin x86_64 toolchain.
%setup -q -n gettext-%{version}
%patch0 -p2
%patch1 -p2
-%patch2 -p2
-%patch3 -p2
%patch4 -p2
rm -f m4/libtool.m4 gettext-tools/gnulib-m4/openmp.m4
touch m4/libtool.m4 gettext-tools/gnulib-m4/openmp.m4
libtoolize --copy --force
-./autogen.sh --quick --skip-gnulib
+GNULIB_TOOL=: ./autogen.sh --skip-gnulib
%build
@@ -103,6 +100,7 @@ libtoolize --copy --force
--with-included-libcroco \
--with-included-libunistring \
--with-included-libxml \
+ --without-libiconv-prefix \
ac_cv_func_lstat_dereferences_slashed_symlink=yes \
am_cv_func_iconv_works=yes \
gl_cv_cc_visibility=no \
@@ -230,6 +228,12 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%changelog
+* Wed Mar 04 2015 Yaakov Selkowitz <yselkowi@redhat.com> - 0.19.4-1
+- new version
+
+* Mon Jun 16 2014 Yaakov Selkowitz <yselkowitz@cygwin.com> - 0.18.3.2-1
+- Version bump.
+
* Sun Jun 30 2013 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 0.18.1.1-3
- Rebuild for new Cygwin packaging scheme.
- Add cygwin64 support.
diff --git a/gettext-0.18.1.1-cygwin-error_h.patch b/gettext-0.18.1.1-cygwin-error_h.patch
deleted file mode 100644
index 5fef32b..0000000
--- a/gettext-0.18.1.1-cygwin-error_h.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Cygwin has exported error.h since 1.7.10.
-
---- origsrc/gettext-0.18.1.1/gettext-tools/libgettextpo/error.h 2010-02-16 15:33:13.000000000 -0600
-+++ src/gettext-0.18.1.1/gettext-tools/libgettextpo/error.h 2013-01-24 22:19:12.749318500 -0600
-@@ -49,14 +49,14 @@ extern void error_at_line (int __status,
- /* If NULL, error will flush stdout, then print on stderr the program
- name, a colon and a space. Otherwise, error will call this
- function without parameters instead. */
--extern DLL_VARIABLE void (*error_print_progname) (void);
-+extern __declspec(dllimport) void (*error_print_progname) (void);
-
- /* This variable is incremented each time `error' is called. */
--extern DLL_VARIABLE unsigned int error_message_count;
-+extern __declspec(dllimport) unsigned int error_message_count;
-
- /* Sometimes we want to have at most one error per line. This
- variable controls whether this mode is selected or not. */
--extern DLL_VARIABLE int error_one_per_line;
-+extern __declspec(dllimport) int error_one_per_line;
-
- #ifdef __cplusplus
- }
---- origsrc/gettext-0.18.1.1/gettext-tools/woe32dll/gettextlib-exports.c 2010-06-06 07:49:58.000000000 -0500
-+++ src/gettext-0.18.1.1/gettext-tools/woe32dll/gettextlib-exports.c 2013-01-24 21:17:39.584846100 -0600
-@@ -18,9 +18,6 @@
- #include "woe32dll/export.h"
-
- VARIABLE(argmatch_die)
--VARIABLE(error_message_count)
--VARIABLE(error_one_per_line)
--VARIABLE(error_print_progname)
- VARIABLE(error_with_progname)
- VARIABLE(exit_failure)
- VARIABLE(gl_array_list_implementation)
diff --git a/gettext-0.18.1.1-locale.patch b/gettext-0.18.1.1-locale.patch
deleted file mode 100644
index 6d80e36..0000000
--- a/gettext-0.18.1.1-locale.patch
+++ /dev/null
@@ -1,152 +0,0 @@
---- old/gettext-0.18.1.1/gettext-runtime/intl/localename.c 2011-10-15 00:21:37.853133600 -0400
-+++ new/gettext-0.18.1.1/gettext-runtime/intl/localename.c 2011-10-15 00:29:27.601133600 -0400
-@@ -59,7 +59,7 @@
- # define WIN32_NATIVE
- #endif
-
--#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
-+#if defined WIN32_NATIVE /* WIN32 */
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- /* List of language codes, sorted by value:
-@@ -1407,7 +1407,7 @@
- #endif
-
-
--#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
-+#if defined WIN32_NATIVE /* WIN32 */
-
- /* Canonicalize a Win32 native locale name to a Unix locale name.
- NAME is a sufficiently large buffer.
-@@ -2770,8 +2770,8 @@
- setting of 'local'."
- However it does not specify the exact format. Neither do SUSV2 and
- ISO C 99. So we can use this feature only on selected systems (e.g.
-- those using GNU C Library). */
--#if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2)
-+ those using GNU C Library, or cygwin [1.5 and 1.7+]). */
-+#if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2) || defined __CYGWIN__
- # define HAVE_LOCALE_NULL
- #endif
-
-@@ -2826,11 +2826,6 @@
- Ignore invalid LANG value set by the Terminal application. */
- if (strcmp (retval, "UTF-8") != 0)
- #endif
--#if defined __CYGWIN__
-- /* Cygwin.
-- Ignore dummy LANG value set by ~/.profile. */
-- if (strcmp (retval, "C.UTF-8") != 0)
--#endif
- return retval;
- }
-
-@@ -2923,7 +2918,7 @@
-
- # endif
-
--# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
-+# if defined WIN32_NATIVE /* WIN32 */
- {
- LCID lcid;
-
-@@ -2933,6 +2928,23 @@
- return gl_locale_name_from_win32_LCID (lcid);
- }
- # endif
-+# if defined __CYGWIN__
-+ {
-+ /* Rarely arrive here. This function is called only when an earlier
-+ * call to gl_locale_name_posix() or gl_locale_name_environ()
-+ * returned NULL. That first function now simply delegates to
-+ * setlocale (LC_*, NULL), which never fails on cygwin. But...for
-+ * completeness, or when called after gl_locale_name_environ() and
-+ * none are set, go ahead and specify the cygwin default. Cheat a bit
-+ * to distinguish old cygwin (1.5 and below) from new cygwin (1.7+).
-+ */
-+# if PATH_MAX < 261 /* cygwin 1.5 or below */
-+ return "C";
-+# else /* PATH_MAX = 4096, cygwin 1.7 or above */
-+ return "C.UTF-8";
-+# endif
-+ }
-+# endif
- #endif
- }
-
---- old/gettext-0.18.1.1/gettext-tools/gnulib-lib/localename.c 2011-10-15 00:21:37.853133600 -0400
-+++ new/gettext-0.18.1.1/gettext-tools/gnulib-lib/localename.c 2011-10-15 00:29:27.601133600 -0400
-@@ -59,7 +59,7 @@
- # define WIN32_NATIVE
- #endif
-
--#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
-+#if defined WIN32_NATIVE /* WIN32 */
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- /* List of language codes, sorted by value:
-@@ -1407,7 +1407,7 @@
- #endif
-
-
--#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
-+#if defined WIN32_NATIVE /* WIN32 */
-
- /* Canonicalize a Win32 native locale name to a Unix locale name.
- NAME is a sufficiently large buffer.
-@@ -2770,8 +2770,8 @@
- setting of 'local'."
- However it does not specify the exact format. Neither do SUSV2 and
- ISO C 99. So we can use this feature only on selected systems (e.g.
-- those using GNU C Library). */
--#if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2)
-+ those using GNU C Library, or cygwin [1.5 and 1.7+]). */
-+#if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2) || defined __CYGWIN__
- # define HAVE_LOCALE_NULL
- #endif
-
-@@ -2826,11 +2826,6 @@
- Ignore invalid LANG value set by the Terminal application. */
- if (strcmp (retval, "UTF-8") != 0)
- #endif
--#if defined __CYGWIN__
-- /* Cygwin.
-- Ignore dummy LANG value set by ~/.profile. */
-- if (strcmp (retval, "C.UTF-8") != 0)
--#endif
- return retval;
- }
-
-@@ -2923,7 +2918,7 @@
-
- # endif
-
--# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
-+# if defined WIN32_NATIVE /* WIN32 */
- {
- LCID lcid;
-
-@@ -2933,6 +2928,23 @@
- return gl_locale_name_from_win32_LCID (lcid);
- }
- # endif
-+# if defined __CYGWIN__
-+ {
-+ /* Rarely arrive here. This function is called only when an earlier
-+ * call to gl_locale_name_posix() or gl_locale_name_environ()
-+ * returned NULL. That first function now simply delegates to
-+ * setlocale (LC_*, NULL), which never fails on cygwin. But...for
-+ * completeness, or when called after gl_locale_name_environ() and
-+ * none are set, go ahead and specify the cygwin default. Cheat a bit
-+ * to distinguish old cygwin (1.5 and below) from new cygwin (1.7+).
-+ */
-+# if PATH_MAX < 261 /* cygwin 1.5 or below */
-+ return "C";
-+# else /* PATH_MAX = 4096, cygwin 1.7 or above */
-+ return "C.UTF-8";
-+# endif
-+ }
-+# endif
- #endif
- }
-
diff --git a/gettext-0.18.1.1-reloc.patch b/gettext-0.18.1.1-reloc.patch
deleted file mode 100644
index 86dea96..0000000
--- a/gettext-0.18.1.1-reloc.patch
+++ /dev/null
@@ -1,1002 +0,0 @@
---- origsrc/gettext-0.18.1.1/gettext-runtime/gnulib-lib/progreloc.c 2010-02-16 15:31:28.000000000 -0600
-+++ src/gettext-0.18.1.1/gettext-runtime/gnulib-lib/progreloc.c 2011-10-31 18:40:26.619853680 -0500
-@@ -16,6 +16,7 @@
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-
-+#define _GL_USE_STDLIB_ALLOC 1
- #include <config.h>
-
- /* Specification. */
-@@ -34,11 +35,11 @@
- # include <mach-o/dyld.h>
- #endif
-
--#if defined _WIN32 || defined __WIN32__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- # define WIN32_NATIVE
- #endif
-
--#if defined WIN32_NATIVE || defined __CYGWIN__
-+#ifdef WIN32_NATIVE
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -59,6 +60,10 @@
- # include "xalloc.h"
- #endif
-
-+#ifndef O_EXEC
-+# define O_EXEC O_RDONLY /* This is often close enough in older systems. */
-+#endif
-+
- /* Declare canonicalize_file_name.
- The <stdlib.h> included above may be the system's one, not the gnulib
- one. */
-@@ -68,8 +73,8 @@ extern char * canonicalize_file_name (co
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -89,12 +94,15 @@ extern char * canonicalize_file_name (co
- #undef open
- #undef close
-
-+/* Use the system functions, not the gnulib overrides in this file. */
-+#undef sprintf
-+
- #undef set_program_name
-
-
- #if ENABLE_RELOCATABLE
-
--#ifdef __linux__
-+#if defined __linux__ || defined __CYGWIN__
- /* File descriptor of the executable.
- (Only used to verify that we find the correct executable.) */
- static int executable_fd = -1;
-@@ -104,12 +112,13 @@ static int executable_fd = -1;
- static bool
- maybe_executable (const char *filename)
- {
-- /* Woe32 lacks the access() function, but Cygwin doesn't. */
--#if !(defined WIN32_NATIVE && !defined __CYGWIN__)
-+ /* Woe32 lacks the access() function. */
-+#if !defined WIN32_NATIVE
- if (access (filename, X_OK) < 0)
- return false;
-+#endif
-
--#ifdef __linux__
-+#if defined __linux__ || defined __CYGWIN__
- if (executable_fd >= 0)
- {
- /* If we already have an executable_fd, check that filename points to
-@@ -128,7 +137,6 @@ maybe_executable (const char *filename)
- }
- }
- #endif
--#endif
-
- return true;
- }
-@@ -140,7 +148,12 @@ maybe_executable (const char *filename)
- static char *
- find_executable (const char *argv0)
- {
--#if defined WIN32_NATIVE || defined __CYGWIN__
-+#if defined WIN32_NATIVE
-+ /* Native Win32 only.
-+ On Cygwin, it is better to use the Cygwin provided /proc interface, than
-+ to use native Win32 API and cygwin_conv_to_posix_path, because it supports
-+ longer file names
-+ (see <http://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */
- char location[MAX_PATH];
- int length = GetModuleFileName (NULL, location, sizeof (location));
- if (length < 0)
-@@ -148,32 +161,9 @@ find_executable (const char *argv0)
- if (!IS_PATH_WITH_DIR (location))
- /* Shouldn't happen. */
- return NULL;
-- {
--#if defined __CYGWIN__
-- /* cygwin-1.5.13 (2005-03-01) or newer would also allow a Linux-like
-- implementation: readlink of "/proc/self/exe". But using the
-- result of the Win32 system call is simpler and is consistent with the
-- code in relocatable.c. */
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return NULL;
-- /* Call canonicalize_file_name, because Cygwin supports symbolic links. */
-- return canonicalize_file_name (location_as_posix_path);
--#else
-- return xstrdup (location);
--#endif
-- }
--#else /* Unix && !Cygwin */
--#ifdef __linux__
-+ return xstrdup (location);
-+#else /* Unix */
-+# ifdef __linux__
- /* The executable is accessible as /proc/<pid>/exe. In newer Linux
- versions, also as /proc/self/exe. Linux >= 2.1 provides a symlink
- to the true pathname; older Linux versions give only device and ino,
-@@ -185,7 +175,7 @@ find_executable (const char *argv0)
- if (link != NULL && link[0] != '[')
- return link;
- if (executable_fd < 0)
-- executable_fd = open ("/proc/self/exe", O_RDONLY, 0);
-+ executable_fd = open ("/proc/self/exe", O_EXEC, 0);
-
- {
- char buf[6+10+5];
-@@ -194,11 +184,24 @@ find_executable (const char *argv0)
- if (link != NULL && link[0] != '[')
- return link;
- if (executable_fd < 0)
-- executable_fd = open (buf, O_RDONLY, 0);
-+ executable_fd = open (buf, O_EXEC, 0);
- }
- }
--#endif
--#if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH
-+# endif
-+# ifdef __CYGWIN__
-+ /* The executable is accessible as /proc/<pid>/exe, at least in
-+ Cygwin >= 1.5. */
-+ {
-+ char *link;
-+
-+ link = xreadlink ("/proc/self/exe");
-+ if (link != NULL)
-+ return link;
-+ if (executable_fd < 0)
-+ executable_fd = open ("/proc/self/exe", O_EXEC, 0);
-+ }
-+# endif
-+# if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH
- /* On MacOS X 10.2 or newer, the function
- int _NSGetExecutablePath (char *buf, uint32_t *bufsize);
- can be used to retrieve the executable's full path. */
-@@ -207,7 +210,7 @@ find_executable (const char *argv0)
- if (_NSGetExecutablePath (location, &length) == 0
- && location[0] == '/')
- return canonicalize_file_name (location);
--#endif
-+# endif
- /* Guess the executable's full path. We assume the executable has been
- called via execlp() or execvp() with properly set up argv[0]. The
- login(1) convention to add a '-' prefix to argv[0] is not supported. */
-@@ -248,10 +251,10 @@ find_executable (const char *argv0)
- /* We have a path item at p, of length p_len.
- Now concatenate the path item and argv0. */
- concat_name = (char *) xmalloc (p_len + strlen (argv0) + 2);
--#ifdef NO_XMALLOC
-+# ifdef NO_XMALLOC
- if (concat_name == NULL)
- return NULL;
--#endif
-+# endif
- if (p_len == 0)
- /* An empty PATH element designates the current directory. */
- strcpy (concat_name, argv0);
---- origsrc/gettext-0.18.1.1/gettext-runtime/gnulib-lib/relocatable.c 2010-02-16 15:31:28.000000000 -0600
-+++ src/gettext-0.18.1.1/gettext-runtime/gnulib-lib/relocatable.c 2011-10-31 18:40:29.867853399 -0500
-@@ -25,6 +23,7 @@
- # define _GNU_SOURCE 1
- #endif
-
-+#define _GL_USE_STDLIB_ALLOC 1
- #include <config.h>
-
- /* Specification. */
-@@ -43,7 +42,7 @@
- # include "xalloc.h"
- #endif
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -70,8 +69,8 @@
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -86,6 +85,19 @@
- # define FILE_SYSTEM_PREFIX_LEN(P) 0
- #endif
-
-+/* Whether to enable the more costly support for relocatable libraries.
-+ It allows libraries to be have been installed with a different original
-+ prefix than the program. But it is quite costly, especially on Cygwin
-+ platforms, see below. Therefore we enable it by default only on native
-+ Win32 platforms. */
-+#ifndef ENABLE_COSTLY_RELOCATABLE
-+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+# define ENABLE_COSTLY_RELOCATABLE 1
-+# else
-+# define ENABLE_COSTLY_RELOCATABLE 0
-+# endif
-+#endif
-+
- /* Original installation prefix. */
- static char *orig_prefix;
- static size_t orig_prefix_len;
-@@ -155,7 +167,7 @@ set_relocation_prefix (const char *orig_
- #endif
- }
-
--#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
-+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
-
- /* Convenience function:
- Computes the current installation prefix, based on the original
-@@ -285,12 +297,17 @@ compute_curr_prefix (const char *orig_in
-
- #endif /* !IN_LIBRARY || PIC */
-
--#if defined PIC && defined INSTALLDIR
-+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
-
- /* Full pathname of shared library, or NULL. */
- static char *shared_library_fullname;
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+/* Native Win32 only.
-+ On Cygwin, it is better to use the Cygwin provided /proc interface, than
-+ to use native Win32 API and cygwin_conv_to_posix_path, because it supports
-+ longer file names
-+ (see <http://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */
-
- /* Determine the full pathname of the shared library when it is loaded. */
-
-@@ -312,37 +329,23 @@ DllMain (HINSTANCE module_handle, DWORD
- /* Shouldn't happen. */
- return FALSE;
-
-- {
--#if defined __CYGWIN__
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return FALSE;
-- shared_library_fullname = strdup (location_as_posix_path);
--#else
-- shared_library_fullname = strdup (location);
--#endif
-- }
-+ shared_library_fullname = strdup (location);
- }
-
- return TRUE;
- }
-
--#else /* Unix except Cygwin */
-+#else /* Unix */
-
- static void
- find_shared_library_fullname ()
- {
--#if defined __linux__ && __GLIBC__ >= 2
-- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
-+#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
-+ /* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
-+ function.
-+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
-+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
-+ Cygwin 1.7. */
- FILE *fp;
-
- /* Open the current process' maps file. It describes one VMA per line. */
-@@ -387,7 +390,7 @@ find_shared_library_fullname ()
- #endif
- }
-
--#endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */
-+#endif /* WIN32 / Unix */
-
- /* Return the full pathname of the current shared library.
- Return NULL if unknown.
-@@ -395,7 +398,7 @@ find_shared_library_fullname ()
- static char *
- get_shared_library_fullname ()
- {
--#if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
-+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
- static bool tried_find_shared_library_fullname;
- if (!tried_find_shared_library_fullname)
- {
-@@ -415,7 +418,7 @@ get_shared_library_fullname ()
- const char *
- relocate (const char *pathname)
- {
--#if defined PIC && defined INSTALLDIR
-+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
- static int initialized;
-
- /* Initialization code for a shared library. */
---- origsrc/gettext-0.18.1.1/gettext-runtime/intl/relocatable.c 2010-06-06 07:49:57.000000000 -0500
-+++ src/gettext-0.18.1.1/gettext-runtime/intl/relocatable.c 2011-10-31 18:40:29.867853399 -0500
-@@ -25,6 +23,7 @@
- # define _GNU_SOURCE 1
- #endif
-
-+#define _GL_USE_STDLIB_ALLOC 1
- #include <config.h>
-
- /* Specification. */
-@@ -43,7 +42,7 @@
- # include "xalloc.h"
- #endif
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -70,8 +69,8 @@
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -86,6 +85,19 @@
- # define FILE_SYSTEM_PREFIX_LEN(P) 0
- #endif
-
-+/* Whether to enable the more costly support for relocatable libraries.
-+ It allows libraries to be have been installed with a different original
-+ prefix than the program. But it is quite costly, especially on Cygwin
-+ platforms, see below. Therefore we enable it by default only on native
-+ Win32 platforms. */
-+#ifndef ENABLE_COSTLY_RELOCATABLE
-+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+# define ENABLE_COSTLY_RELOCATABLE 1
-+# else
-+# define ENABLE_COSTLY_RELOCATABLE 0
-+# endif
-+#endif
-+
- /* Original installation prefix. */
- static char *orig_prefix;
- static size_t orig_prefix_len;
-@@ -155,7 +167,7 @@ set_relocation_prefix (const char *orig_
- #endif
- }
-
--#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
-+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
-
- /* Convenience function:
- Computes the current installation prefix, based on the original
-@@ -285,12 +297,17 @@ compute_curr_prefix (const char *orig_in
-
- #endif /* !IN_LIBRARY || PIC */
-
--#if defined PIC && defined INSTALLDIR
-+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
-
- /* Full pathname of shared library, or NULL. */
- static char *shared_library_fullname;
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+/* Native Win32 only.
-+ On Cygwin, it is better to use the Cygwin provided /proc interface, than
-+ to use native Win32 API and cygwin_conv_to_posix_path, because it supports
-+ longer file names
-+ (see <http://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */
-
- /* Determine the full pathname of the shared library when it is loaded. */
-
-@@ -312,37 +329,23 @@ DllMain (HINSTANCE module_handle, DWORD
- /* Shouldn't happen. */
- return FALSE;
-
-- {
--#if defined __CYGWIN__
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return FALSE;
-- shared_library_fullname = strdup (location_as_posix_path);
--#else
-- shared_library_fullname = strdup (location);
--#endif
-- }
-+ shared_library_fullname = strdup (location);
- }
-
- return TRUE;
- }
-
--#else /* Unix except Cygwin */
-+#else /* Unix */
-
- static void
- find_shared_library_fullname ()
- {
--#if defined __linux__ && __GLIBC__ >= 2
-- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
-+#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
-+ /* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
-+ function.
-+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
-+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
-+ Cygwin 1.7. */
- FILE *fp;
-
- /* Open the current process' maps file. It describes one VMA per line. */
-@@ -387,7 +390,7 @@ find_shared_library_fullname ()
- #endif
- }
-
--#endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */
-+#endif /* WIN32 / Unix */
-
- /* Return the full pathname of the current shared library.
- Return NULL if unknown.
-@@ -395,7 +398,7 @@ find_shared_library_fullname ()
- static char *
- get_shared_library_fullname ()
- {
--#if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
-+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
- static bool tried_find_shared_library_fullname;
- if (!tried_find_shared_library_fullname)
- {
-@@ -415,7 +418,7 @@ get_shared_library_fullname ()
- const char *
- relocate (const char *pathname)
- {
--#if defined PIC && defined INSTALLDIR
-+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
- static int initialized;
-
- /* Initialization code for a shared library. */
---- origsrc/gettext-0.18.1.1/gettext-tools/gnulib-lib/progreloc.c 2010-05-24 04:42:46.000000000 -0500
-+++ src/gettext-0.18.1.1/gettext-tools/gnulib-lib/progreloc.c 2011-10-31 18:40:26.620853680 -0500
-@@ -16,6 +16,7 @@
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-
-+#define _GL_USE_STDLIB_ALLOC 1
- #include <config.h>
-
- /* Specification. */
-@@ -34,11 +35,11 @@
- # include <mach-o/dyld.h>
- #endif
-
--#if defined _WIN32 || defined __WIN32__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- # define WIN32_NATIVE
- #endif
-
--#if defined WIN32_NATIVE || defined __CYGWIN__
-+#ifdef WIN32_NATIVE
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -59,6 +60,10 @@
- # include "xalloc.h"
- #endif
-
-+#ifndef O_EXEC
-+# define O_EXEC O_RDONLY /* This is often close enough in older systems. */
-+#endif
-+
- /* Declare canonicalize_file_name.
- The <stdlib.h> included above may be the system's one, not the gnulib
- one. */
-@@ -68,8 +73,8 @@ extern char * canonicalize_file_name (co
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -89,12 +94,15 @@ extern char * canonicalize_file_name (co
- #undef open
- #undef close
-
-+/* Use the system functions, not the gnulib overrides in this file. */
-+#undef sprintf
-+
- #undef set_program_name
-
-
- #if ENABLE_RELOCATABLE
-
--#ifdef __linux__
-+#if defined __linux__ || defined __CYGWIN__
- /* File descriptor of the executable.
- (Only used to verify that we find the correct executable.) */
- static int executable_fd = -1;
-@@ -104,12 +112,13 @@ static int executable_fd = -1;
- static bool
- maybe_executable (const char *filename)
- {
-- /* Woe32 lacks the access() function, but Cygwin doesn't. */
--#if !(defined WIN32_NATIVE && !defined __CYGWIN__)
-+ /* Woe32 lacks the access() function. */
-+#if !defined WIN32_NATIVE
- if (access (filename, X_OK) < 0)
- return false;
-+#endif
-
--#ifdef __linux__
-+#if defined __linux__ || defined __CYGWIN__
- if (executable_fd >= 0)
- {
- /* If we already have an executable_fd, check that filename points to
-@@ -128,7 +137,6 @@ maybe_executable (const char *filename)
- }
- }
- #endif
--#endif
-
- return true;
- }
-@@ -140,7 +148,12 @@ maybe_executable (const char *filename)
- static char *
- find_executable (const char *argv0)
- {
--#if defined WIN32_NATIVE || defined __CYGWIN__
-+#if defined WIN32_NATIVE
-+ /* Native Win32 only.
-+ On Cygwin, it is better to use the Cygwin provided /proc interface, than
-+ to use native Win32 API and cygwin_conv_to_posix_path, because it supports
-+ longer file names
-+ (see <http://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */
- char location[MAX_PATH];
- int length = GetModuleFileName (NULL, location, sizeof (location));
- if (length < 0)
-@@ -148,32 +161,9 @@ find_executable (const char *argv0)
- if (!IS_PATH_WITH_DIR (location))
- /* Shouldn't happen. */
- return NULL;
-- {
--#if defined __CYGWIN__
-- /* cygwin-1.5.13 (2005-03-01) or newer would also allow a Linux-like
-- implementation: readlink of "/proc/self/exe". But using the
-- result of the Win32 system call is simpler and is consistent with the
-- code in relocatable.c. */
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return NULL;
-- /* Call canonicalize_file_name, because Cygwin supports symbolic links. */
-- return canonicalize_file_name (location_as_posix_path);
--#else
-- return xstrdup (location);
--#endif
-- }
--#else /* Unix && !Cygwin */
--#ifdef __linux__
-+ return xstrdup (location);
-+#else /* Unix */
-+# ifdef __linux__
- /* The executable is accessible as /proc/<pid>/exe. In newer Linux
- versions, also as /proc/self/exe. Linux >= 2.1 provides a symlink
- to the true pathname; older Linux versions give only device and ino,
-@@ -185,7 +175,7 @@ find_executable (const char *argv0)
- if (link != NULL && link[0] != '[')
- return link;
- if (executable_fd < 0)
-- executable_fd = open ("/proc/self/exe", O_RDONLY, 0);
-+ executable_fd = open ("/proc/self/exe", O_EXEC, 0);
-
- {
- char buf[6+10+5];
-@@ -194,11 +184,24 @@ find_executable (const char *argv0)
- if (link != NULL && link[0] != '[')
- return link;
- if (executable_fd < 0)
-- executable_fd = open (buf, O_RDONLY, 0);
-+ executable_fd = open (buf, O_EXEC, 0);
- }
- }
--#endif
--#if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH
-+# endif
-+# ifdef __CYGWIN__
-+ /* The executable is accessible as /proc/<pid>/exe, at least in
-+ Cygwin >= 1.5. */
-+ {
-+ char *link;
-+
-+ link = xreadlink ("/proc/self/exe");
-+ if (link != NULL)
-+ return link;
-+ if (executable_fd < 0)
-+ executable_fd = open ("/proc/self/exe", O_EXEC, 0);
-+ }
-+# endif
-+# if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH
- /* On MacOS X 10.2 or newer, the function
- int _NSGetExecutablePath (char *buf, uint32_t *bufsize);
- can be used to retrieve the executable's full path. */
-@@ -207,7 +210,7 @@ find_executable (const char *argv0)
- if (_NSGetExecutablePath (location, &length) == 0
- && location[0] == '/')
- return canonicalize_file_name (location);
--#endif
-+# endif
- /* Guess the executable's full path. We assume the executable has been
- called via execlp() or execvp() with properly set up argv[0]. The
- login(1) convention to add a '-' prefix to argv[0] is not supported. */
-@@ -248,10 +251,10 @@ find_executable (const char *argv0)
- /* We have a path item at p, of length p_len.
- Now concatenate the path item and argv0. */
- concat_name = (char *) xmalloc (p_len + strlen (argv0) + 2);
--#ifdef NO_XMALLOC
-+# ifdef NO_XMALLOC
- if (concat_name == NULL)
- return NULL;
--#endif
-+# endif
- if (p_len == 0)
- /* An empty PATH element designates the current directory. */
- strcpy (concat_name, argv0);
---- origsrc/gettext-0.18.1.1/gettext-tools/gnulib-lib/relocatable.c 2010-05-24 04:42:46.000000000 -0500
-+++ src/gettext-0.18.1.1/gettext-tools/gnulib-lib/relocatable.c 2011-10-31 18:40:29.868853403 -0500
-@@ -25,6 +23,7 @@
- # define _GNU_SOURCE 1
- #endif
-
-+#define _GL_USE_STDLIB_ALLOC 1
- #include <config.h>
-
- /* Specification. */
-@@ -43,7 +42,7 @@
- # include "xalloc.h"
- #endif
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -70,8 +69,8 @@
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -86,6 +85,19 @@
- # define FILE_SYSTEM_PREFIX_LEN(P) 0
- #endif
-
-+/* Whether to enable the more costly support for relocatable libraries.
-+ It allows libraries to be have been installed with a different original
-+ prefix than the program. But it is quite costly, especially on Cygwin
-+ platforms, see below. Therefore we enable it by default only on native
-+ Win32 platforms. */
-+#ifndef ENABLE_COSTLY_RELOCATABLE
-+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+# define ENABLE_COSTLY_RELOCATABLE 1
-+# else
-+# define ENABLE_COSTLY_RELOCATABLE 0
-+# endif
-+#endif
-+
- /* Original installation prefix. */
- static char *orig_prefix;
- static size_t orig_prefix_len;
-@@ -155,7 +167,7 @@ set_relocation_prefix (const char *orig_
- #endif
- }
-
--#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
-+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
-
- /* Convenience function:
- Computes the current installation prefix, based on the original
-@@ -285,12 +297,17 @@ compute_curr_prefix (const char *orig_in
-
- #endif /* !IN_LIBRARY || PIC */
-
--#if defined PIC && defined INSTALLDIR
-+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
-
- /* Full pathname of shared library, or NULL. */
- static char *shared_library_fullname;
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+/* Native Win32 only.
-+ On Cygwin, it is better to use the Cygwin provided /proc interface, than
-+ to use native Win32 API and cygwin_conv_to_posix_path, because it supports
-+ longer file names
-+ (see <http://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */
-
- /* Determine the full pathname of the shared library when it is loaded. */
-
-@@ -312,37 +329,23 @@ DllMain (HINSTANCE module_handle, DWORD
- /* Shouldn't happen. */
- return FALSE;
-
-- {
--#if defined __CYGWIN__
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return FALSE;
-- shared_library_fullname = strdup (location_as_posix_path);
--#else
-- shared_library_fullname = strdup (location);
--#endif
-- }
-+ shared_library_fullname = strdup (location);
- }
-
- return TRUE;
- }
-
--#else /* Unix except Cygwin */
-+#else /* Unix */
-
- static void
- find_shared_library_fullname ()
- {
--#if defined __linux__ && __GLIBC__ >= 2
-- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
-+#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
-+ /* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
-+ function.
-+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
-+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
-+ Cygwin 1.7. */
- FILE *fp;
-
- /* Open the current process' maps file. It describes one VMA per line. */
-@@ -387,7 +390,7 @@ find_shared_library_fullname ()
- #endif
- }
-
--#endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */
-+#endif /* WIN32 / Unix */
-
- /* Return the full pathname of the current shared library.
- Return NULL if unknown.
-@@ -395,7 +398,7 @@ find_shared_library_fullname ()
- static char *
- get_shared_library_fullname ()
- {
--#if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
-+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
- static bool tried_find_shared_library_fullname;
- if (!tried_find_shared_library_fullname)
- {
-@@ -415,7 +418,7 @@ get_shared_library_fullname ()
- const char *
- relocate (const char *pathname)
- {
--#if defined PIC && defined INSTALLDIR
-+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
- static int initialized;
-
- /* Initialization code for a shared library. */
---- origsrc/gettext-0.18.1.1/gettext-tools/libgettextpo/relocatable.c 2010-02-16 15:33:15.000000000 -0600
-+++ src/gettext-0.18.1.1/gettext-tools/libgettextpo/relocatable.c 2011-10-31 18:40:29.868853403 -0500
-@@ -25,6 +23,7 @@
- # define _GNU_SOURCE 1
- #endif
-
-+#define _GL_USE_STDLIB_ALLOC 1
- #include <config.h>
-
- /* Specification. */
-@@ -43,7 +42,7 @@
- # include "xalloc.h"
- #endif
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- #endif
-@@ -70,8 +69,8 @@
- ISSLASH(C) tests whether C is a directory separator character.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
-- /* Win32, Cygwin, OS/2, DOS */
-+#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__
-+ /* Win32, OS/2, DOS */
- # define ISSLASH(C) ((C) == '/' || (C) == '\\')
- # define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-@@ -86,6 +85,19 @@
- # define FILE_SYSTEM_PREFIX_LEN(P) 0
- #endif
-
-+/* Whether to enable the more costly support for relocatable libraries.
-+ It allows libraries to be have been installed with a different original
-+ prefix than the program. But it is quite costly, especially on Cygwin
-+ platforms, see below. Therefore we enable it by default only on native
-+ Win32 platforms. */
-+#ifndef ENABLE_COSTLY_RELOCATABLE
-+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+# define ENABLE_COSTLY_RELOCATABLE 1
-+# else
-+# define ENABLE_COSTLY_RELOCATABLE 0
-+# endif
-+#endif
-+
- /* Original installation prefix. */
- static char *orig_prefix;
- static size_t orig_prefix_len;
-@@ -155,7 +167,7 @@ set_relocation_prefix (const char *orig_
- #endif
- }
-
--#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
-+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE)
-
- /* Convenience function:
- Computes the current installation prefix, based on the original
-@@ -285,12 +297,17 @@ compute_curr_prefix (const char *orig_in
-
- #endif /* !IN_LIBRARY || PIC */
-
--#if defined PIC && defined INSTALLDIR
-+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
-
- /* Full pathname of shared library, or NULL. */
- static char *shared_library_fullname;
-
--#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
-+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
-+/* Native Win32 only.
-+ On Cygwin, it is better to use the Cygwin provided /proc interface, than
-+ to use native Win32 API and cygwin_conv_to_posix_path, because it supports
-+ longer file names
-+ (see <http://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */
-
- /* Determine the full pathname of the shared library when it is loaded. */
-
-@@ -312,37 +329,23 @@ DllMain (HINSTANCE module_handle, DWORD
- /* Shouldn't happen. */
- return FALSE;
-
-- {
--#if defined __CYGWIN__
-- /* On Cygwin, we need to convert paths coming from Win32 system calls
-- to the Unix-like slashified notation. */
-- static char location_as_posix_path[2 * MAX_PATH];
-- /* There's no error return defined for cygwin_conv_to_posix_path.
-- See cygwin-api/func-cygwin-conv-to-posix-path.html.
-- Does it overflow the buffer of expected size MAX_PATH or does it
-- truncate the path? I don't know. Let's catch both. */
-- cygwin_conv_to_posix_path (location, location_as_posix_path);
-- location_as_posix_path[MAX_PATH - 1] = '\0';
-- if (strlen (location_as_posix_path) >= MAX_PATH - 1)
-- /* A sign of buffer overflow or path truncation. */
-- return FALSE;
-- shared_library_fullname = strdup (location_as_posix_path);
--#else
-- shared_library_fullname = strdup (location);
--#endif
-- }
-+ shared_library_fullname = strdup (location);
- }
-
- return TRUE;
- }
-
--#else /* Unix except Cygwin */
-+#else /* Unix */
-
- static void
- find_shared_library_fullname ()
- {
--#if defined __linux__ && __GLIBC__ >= 2
-- /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
-+#if (defined __linux__ && (__GLIBC__ >= 2 || defined __UCLIBC__)) || defined __CYGWIN__
-+ /* Linux has /proc/self/maps. glibc 2 and uClibc have the getline()
-+ function.
-+ Cygwin >= 1.5 has /proc/self/maps and the getline() function too.
-+ But it is costly: ca. 0.3 ms on Linux, 3 ms on Cygwin 1.5, and 5 ms on
-+ Cygwin 1.7. */
- FILE *fp;
-
- /* Open the current process' maps file. It describes one VMA per line. */
-@@ -387,7 +390,7 @@ find_shared_library_fullname ()
- #endif
- }
-
--#endif /* (WIN32 or Cygwin) / (Unix except Cygwin) */
-+#endif /* WIN32 / Unix */
-
- /* Return the full pathname of the current shared library.
- Return NULL if unknown.
-@@ -395,7 +398,7 @@ find_shared_library_fullname ()
- static char *
- get_shared_library_fullname ()
- {
--#if !(defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
-+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
- static bool tried_find_shared_library_fullname;
- if (!tried_find_shared_library_fullname)
- {
-@@ -415,7 +418,7 @@ get_shared_library_fullname ()
- const char *
- relocate (const char *pathname)
- {
--#if defined PIC && defined INSTALLDIR
-+#if defined PIC && defined INSTALLDIR && ENABLE_COSTLY_RELOCATABLE
- static int initialized;
-
- /* Initialization code for a shared library. */
diff --git a/gettext-0.19.3-localename.patch b/gettext-0.19.3-localename.patch
new file mode 100644
index 0000000..0630292
--- /dev/null
+++ b/gettext-0.19.3-localename.patch
@@ -0,0 +1,168 @@
+--- origsrc/gettext-0.19.3/gettext-runtime/gnulib-lib/localename.c 2014-10-16 01:00:08.000000000 -0500
++++ src/gettext-0.19.3/gettext-runtime/gnulib-lib/localename.c 2014-11-17 23:22:47.747353600 -0600
+@@ -60,7 +60,7 @@
+ # endif
+ #endif
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++#if defined WINDOWS_NATIVE /* Native Windows */
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include <winnls.h>
+@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
+ #endif
+
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++#if defined WINDOWS_NATIVE /* Native Windows */
+
+ /* Canonicalize a Windows native locale name to a Unix locale name.
+ NAME is a sufficiently large buffer.
+@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
+ Ignore invalid LANG value set by the Terminal application. */
+ if (strcmp (retval, "UTF-8") != 0)
+ #endif
+-#if defined __CYGWIN__
+- /* Cygwin.
+- Ignore dummy LANG value set by ~/.profile. */
+- if (strcmp (retval, "C.UTF-8") != 0)
+-#endif
+ return retval;
+ }
+
+@@ -2867,7 +2862,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 WINDOWS_NATIVE || defined __CYGWIN__)
++#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE)
+
+ /* The system does not have a way of setting the locale, other than the
+ POSIX specified environment variables. We use C as default locale. */
+@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
+
+ # endif
+
+-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++# if defined WINDOWS_NATIVE /* Native Windows */
+ {
+ LCID lcid;
+
+--- origsrc/gettext-0.19.3/gettext-runtime/intl/localename.c 2014-09-30 21:35:20.000000000 -0500
++++ src/gettext-0.19.3/gettext-runtime/intl/localename.c 2014-11-17 23:22:47.755854700 -0600
+@@ -60,7 +60,7 @@
+ # endif
+ #endif
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++#if defined WINDOWS_NATIVE_ /* Native Windows */
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include <winnls.h>
+@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
+ #endif
+
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++#if defined WINDOWS_NATIVE /* Native Windows */
+
+ /* Canonicalize a Windows native locale name to a Unix locale name.
+ NAME is a sufficiently large buffer.
+@@ -2770,7 +2770,7 @@ gl_locale_name_thread (int category, con
+ However it does not specify the exact format. Neither do SUSV2 and
+ ISO C 99. So we can use this feature only on selected systems (e.g.
+ those using GNU C Library). */
+-#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
++#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) || defined(__CYGWIN__)
+ # define HAVE_LOCALE_NULL
+ #endif
+
+@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
+ Ignore invalid LANG value set by the Terminal application. */
+ if (strcmp (retval, "UTF-8") != 0)
+ #endif
+-#if defined __CYGWIN__
+- /* Cygwin.
+- Ignore dummy LANG value set by ~/.profile. */
+- if (strcmp (retval, "C.UTF-8") != 0)
+-#endif
+ return retval;
+ }
+
+@@ -2867,7 +2862,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 WINDOWS_NATIVE || defined __CYGWIN__)
++#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE)
+
+ /* The system does not have a way of setting the locale, other than the
+ POSIX specified environment variables. We use C as default locale. */
+@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
+
+ # endif
+
+-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++# if defined WINDOWS_NATIVE /* Native Windows */
+ {
+ LCID lcid;
+
+--- origsrc/gettext-0.19.3/gettext-tools/gnulib-lib/localename.c 2014-10-16 01:00:35.000000000 -0500
++++ src/gettext-0.19.3/gettext-tools/gnulib-lib/localename.c 2014-11-17 23:22:47.763355600 -0600
+@@ -60,7 +60,7 @@
+ # endif
+ #endif
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++#if defined WINDOWS_NATIVE_ /* Native Windows */
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ # include <winnls.h>
+@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
+ #endif
+
+
+-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++#if defined WINDOWS_NATIVE /* Native Windows */
+
+ /* Canonicalize a Windows native locale name to a Unix locale name.
+ NAME is a sufficiently large buffer.
+@@ -2770,7 +2770,7 @@ gl_locale_name_thread (int category, con
+ However it does not specify the exact format. Neither do SUSV2 and
+ ISO C 99. So we can use this feature only on selected systems (e.g.
+ those using GNU C Library). */
+-#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
++#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) || defined(__CYGWIN__)
+ # define HAVE_LOCALE_NULL
+ #endif
+
+@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
+ Ignore invalid LANG value set by the Terminal application. */
+ if (strcmp (retval, "UTF-8") != 0)
+ #endif
+-#if defined __CYGWIN__
+- /* Cygwin.
+- Ignore dummy LANG value set by ~/.profile. */
+- if (strcmp (retval, "C.UTF-8") != 0)
+-#endif
+ return retval;
+ }
+
+@@ -2867,7 +2862,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 WINDOWS_NATIVE || defined __CYGWIN__)
++#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE)
+
+ /* The system does not have a way of setting the locale, other than the
+ POSIX specified environment variables. We use C as default locale. */
+@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
+
+ # endif
+
+-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
++# if defined WINDOWS_NATIVE /* Native Windows */
+ {
+ LCID lcid;
+
diff --git a/sources b/sources
index 07b9e44..686e4d0 100644
--- a/sources
+++ b/sources
@@ -1,4 +1 @@
-3dd55b952826d2b32f51308f2f91aa89 gettext-0.18.1.1.tar.gz
-3dd55b952826d2b32f51308f2f91aa89 gettext-0.18.1.1.tar.gz
-3133cb765a0e2c9e7908028b86bdbb55 gettext-0.18.1.1-2-src.tar.bz2
-3dd55b952826d2b32f51308f2f91aa89 gettext-0.18.1.1.tar.gz
+997c9070354eff5517115feaea6038f0 gettext-0.19.4.tar.xz