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

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

Re: GNU grep-2.5e does not compile on Solaris 2.6


From: Paul Eggert
Subject: Re: GNU grep-2.5e does not compile on Solaris 2.6
Date: Sun, 25 Mar 2001 17:32:41 -0800 (PST)

> From: address@hidden
> Date: 24 Mar 2001

> I am trying to compile grep-2.5e on Solaris 2.6 using gcc-2.95.3
> There seems to be a problem in  quotearg.c:
> quotearg.c:420: `mbstate_t' undeclared (first use in this function)
> HAVE_MBRTOWC is not defined.

Please try the following.  I haven't checked this on Solaris 2.6 but the
patch is needed for other reasons on BeOS and, from what you write, it
should also do the trick on Solaris 2.6, at least for quotearg.c.

2001-02-17  Paul Eggert  <address@hidden>

        Stop trying to support hosts that have nonstandard declarations for
        mbrtowc and/or mbstate_t.  It's not worth the portability hassle.

        * lib/quotearg.c (mbrtowc, mbsinit): Remove workaround macros
        for hosts that have mbrtowc but not mbstate_t, as we now
        insist on proper declarations for both before using mbrtowc.


--- grep-2.5e/lib/quotearg.c    Sat Mar  3 14:56:26 2001
+++ tar/lib/quotearg.c  Fri Feb 16 16:42:54 2001
@@ -66,13 +66,7 @@
 # include <wchar.h>
 #endif
 
-#if HAVE_MBRTOWC
-size_t mbrtowc ();
-# ifdef mbstate_t
-#  define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
-#  define mbsinit(ps) 1
-# endif
-#else
+#if !HAVE_MBRTOWC
 /* Disable multibyte processing entirely.  Since MB_CUR_MAX is 1, the
    other macros are defined only for documentation and to satisfy C
    syntax.  */



reply via email to

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