bug-gnu-utils
[Top][All Lists]
Advanced

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

gettext patches for cygwin #5: misc


From: Charles Wilson
Subject: gettext patches for cygwin #5: misc
Date: Sun, 20 Nov 2005 00:14:54 -0500
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

No changelog for these, because I'm only including them for completeness. There are two patches:

1) dcigettext: I've been carrying this patch around for years, and I don't even remember why I needed it. It's entirely possible that it is no longer necessary. I *think* I ran into a problem where stpcpy was not detected during configure, but actually existed in the cygwin dll, and I got symbol clash.

2) autogen.sh: I needed to upgrade to libtool-1.5.20 for full cygwin DLL support, so I added libtoolize. However, because it must be invoked at the toplevel, yet toplevel configure.ac doesn't invoke libtool, m4/libtool.m4 never gets updated. Hence this hack.

--
Chuck
diff -urN gettext-0.14.5-orig/gettext-runtime/intl/dcigettext.c 
gettext-0.14.5/gettext-runtime/intl/dcigettext.c
--- gettext-0.14.5-orig/gettext-runtime/intl/dcigettext.c       2005-05-20 
16:06:17.000000000 -0400
+++ gettext-0.14.5/gettext-runtime/intl/dcigettext.c    2005-11-11 
00:05:14.390625000 -0500
@@ -133,6 +133,8 @@
 #endif
 
 /* @@ end of prolog @@ */
+#define STPCPY  stpcpy
+#define MEMPCPY mempcpy
 
 #ifdef _LIBC
 /* Rename the non ANSI C functions.  This is required by the standard
@@ -155,10 +157,14 @@
 #  endif
 # endif
 # ifndef HAVE_STPCPY
-static char *stpcpy (char *dest, const char *src);
+#  undef  STPCPY
+#  define STPCPY dcigettext_stpcpy
+static char *dcigettext_stpcpy (char *dest, const char *src);
 # endif
 # ifndef HAVE_MEMPCPY
-static void *mempcpy (void *dest, const void *src, size_t n);
+#  undef MEMPCPY
+#  define MEMPCPY dcigettext_mempcpy
+static void *dcigettext_mempcpy (void *dest, const void *src, size_t n);
 # endif
 #endif
 
@@ -554,7 +560,7 @@
           error but simply return the default string.  */
        goto return_untranslated;
 
-      stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
+      STPCPY (STPCPY (strchr (dirname, '\0'), "/"), binding->dirname);
     }
 
   /* Now determine the symbolic name of CATEGORY and its value.  */
@@ -566,7 +572,7 @@
                                 + domainname_len + 5);
   ADD_BLOCK (block_list, xdomainname);
 
-  stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+  STPCPY (MEMPCPY (STPCPY (STPCPY (xdomainname, categoryname), "/"),
                  domainname, domainname_len),
          ".mo");
 
@@ -653,7 +659,7 @@
                  if (newp != NULL)
                    {
                      newp->domainname =
-                       mempcpy (newp->msgid, msgid1, msgid_len);
+                       MEMPCPY (newp->msgid, msgid1, msgid_len);
                      memcpy (newp->domainname, domainname, domainname_len + 1);
                      newp->category = category;
                      newp->counter = _nl_msg_cat_cntr;
@@ -1205,7 +1211,7 @@
    to be defined.  */
 #if !_LIBC && !HAVE_STPCPY
 static char *
-stpcpy (char *dest, const char *src)
+dcigettext_stpcpy (char *dest, const char *src)
 {
   while ((*dest++ = *src++) != '\0')
     /* Do nothing. */ ;
@@ -1215,7 +1221,7 @@
 
 #if !_LIBC && !HAVE_MEMPCPY
 static void *
-mempcpy (void *dest, const void *src, size_t n)
+dcigettext_mempcpy (void *dest, const void *src, size_t n)
 {
   return (void *) ((char *) memcpy (dest, src, n) + n);
 }
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-0.14.5-orig/autogen.sh 
gettext-0.14.5/autogen.sh
--- gettext-0.14.5-orig/autogen.sh      2005-05-20 15:58:44.000000000 -0400
+++ gettext-0.14.5/autogen.sh   2005-11-11 13:31:56.359375000 -0500
@@ -20,6 +20,21 @@
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 aclocal
+libtoolize --automake --copy --force
+
+## HACK: because we don't actually USE libtool in top-level configure.ac,
+##       but libtoolize must be invoked at the toplevel, m4/libtool.m4 
+##       does not get updated.  So, manually copy...
+aclocaldir=/usr/share/aclocal/
+libtool_m4=libtool.m4
+cd m4
+if { ( cd $aclocaldir 2>/dev/null && tar chf - $libtool_m4 2>/dev/null; ) \
+   | (umask 0 && tar xf - > /dev/null 2>&1; ); } ; then :
+elif cp $aclocaldir/$libtool_m4 $libtool_m4 ; then :
+else echo "could not copy \`$aclocaldir/$libtool_m4' to m4/$libtool_m4" 1>&2
+fi
+cd ..
+
 autoconf
 automake
 

reply via email to

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