[csw-devel] SF.net SVN: gar:[2962] csw/mgar/pkg/gettext/trunk

harpchad at users.sourceforge.net harpchad at users.sourceforge.net
Sun Feb 1 05:20:51 CET 2009


Revision: 2962
          http://gar.svn.sourceforge.net/gar/?rev=2962&view=rev
Author:   harpchad
Date:     2009-02-01 04:20:51 +0000 (Sun, 01 Feb 2009)

Log Message:
-----------
bugfix in one of the tests

Modified Paths:
--------------
    csw/mgar/pkg/gettext/trunk/Makefile
    csw/mgar/pkg/gettext/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/gettext/trunk/files/test-wcwidth.patch

Modified: csw/mgar/pkg/gettext/trunk/Makefile
===================================================================
--- csw/mgar/pkg/gettext/trunk/Makefile	2009-02-01 00:13:13 UTC (rev 2961)
+++ csw/mgar/pkg/gettext/trunk/Makefile	2009-02-01 04:20:51 UTC (rev 2962)
@@ -20,6 +20,11 @@
 DISTFILES += libintl.so.3.i
 DISTFILES += libintl.so.3.s
 
+#Apply two bug fixes from gnulib, retrieved from:
+#http://git.savannah.gnu.org/cgit/gnulib.git/tree/tests/test-wcwidth.c
+#blob: 582a8aa2e87a8235186aa3b1e402bbf03e6646a7
+PATCHFILES = test-wcwidth.patch
+
 CONFIGURE_ARGS  = $(DIRPATHS)
 CONFIGURE_ARGS += --program-prefix=g
 #Dont' depend on packages that depend on me

Modified: csw/mgar/pkg/gettext/trunk/checksums
===================================================================
--- csw/mgar/pkg/gettext/trunk/checksums	2009-02-01 00:13:13 UTC (rev 2961)
+++ csw/mgar/pkg/gettext/trunk/checksums	2009-02-01 04:20:51 UTC (rev 2962)
@@ -7,3 +7,4 @@
 3ab768083f6ecc5cada151e49be21aa0  download/libintl.so.2.s
 ceb5de2326a4726d3710fe1512b84592  download/libintl.so.3.i
 88db7322e263a00f24269a7f364fdc2d  download/libintl.so.3.s
+710effbaef82fd7db1d807e5aa46154a  download/test-wcwidth.patch

Added: csw/mgar/pkg/gettext/trunk/files/test-wcwidth.patch
===================================================================
--- csw/mgar/pkg/gettext/trunk/files/test-wcwidth.patch	                        (rev 0)
+++ csw/mgar/pkg/gettext/trunk/files/test-wcwidth.patch	2009-02-01 04:20:51 UTC (rev 2962)
@@ -0,0 +1,51 @@
+--- gettext-0.17/gettext-tools/gnulib-tests/test-wcwidth.c	2007-10-22 19:42:40.000000000 -0500
++++ ../../../test-wcwidth.c	2009-01-31 21:29:03.000000000 -0600
+@@ -1,5 +1,5 @@
+ /* Test of wcwidth() function.
+-   Copyright (C) 2007 Free Software Foundation, Inc.
++   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ 
+    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
+@@ -23,6 +23,9 @@
+ #include <locale.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
++
++#include "localcharset.h"
+ 
+ #define ASSERT(expr) \
+   do									     \
+@@ -30,6 +33,7 @@
+       if (!(expr))							     \
+         {								     \
+           fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
++          fflush (stderr);						     \
+           abort ();							     \
+         }								     \
+     }									     \
+@@ -45,7 +49,13 @@
+     ASSERT (wcwidth (wc) == 1);
+ 
+   /* Switch to an UTF-8 locale.  */
+-  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
++  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL
++      /* Check whether it's really an UTF-8 locale.
++	 On OpenBSD 4.0, the setlocale call succeeds only for the LC_CTYPE
++	 category and therefore returns "C/fr_FR.UTF-8/C/C/C/C", but the
++	 LC_CTYPE category is effectively set to an ASCII LC_CTYPE category;
++	 in particular, locale_charset() returns "ASCII".  */
++      && strcmp (locale_charset (), "UTF-8") == 0)
+     {
+       /* Test width of ASCII characters.  */
+       for (wc = 0x20; wc < 0x7F; wc++)
+@@ -57,7 +67,7 @@
+ 
+       /* Test width of some format control characters.  */
+       ASSERT (wcwidth (0x200E) <= 0);
+-      ASSERT (wcwidth (0x2060) == 0);
++      ASSERT (wcwidth (0x2060) <= 0);
+ #if 0  /* wchar_t may be only 16 bits.  */
+       ASSERT (wcwidth (0xE0001) <= 0);
+       ASSERT (wcwidth (0xE0044) <= 0);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list