From: Paul Eggert Date: Fri, 28 Feb 2003 09:00:22 +0000 (+0000) Subject: Include before "mbswidth.h", to work around a UnixWare 7.1.1 X-Git-Tag: BISON-2_0~377 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/02d5ffac8bc3ca44c02ec414219f3b024224a4a9?hp=c3d25e01e82dcaa0dab586d3ab13b67440e55d78 Include before "mbswidth.h", to work around a UnixWare 7.1.1 porting bug reported by John Hughes in . --- diff --git a/lib/mbswidth.c b/lib/mbswidth.c index a2ef5b3f..21d96a23 100644 --- a/lib/mbswidth.c +++ b/lib/mbswidth.c @@ -1,5 +1,5 @@ /* Determine the number of screen columns needed for a string. - Copyright (C) 2000-2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003 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 @@ -21,6 +21,15 @@ # include #endif +/* Get mbstate_t, mbrtowc(), mbsinit(), wcwidth(). This must be + included before "mbswidth.h", because UnixWare 7.1.1 + declares its own mbswidth and we want mbswidth.h's "#define + mbswidth gnu_mbswidth" to take effect after is + included. */ +#if HAVE_WCHAR_H +# include +#endif + /* Specification. */ #include "mbswidth.h" @@ -32,11 +41,6 @@ /* Get isprint(). */ #include -/* Get mbstate_t, mbrtowc(), mbsinit(), wcwidth(). */ -#if HAVE_WCHAR_H -# include -#endif - /* Get iswprint(), iswcntrl(). */ #if HAVE_WCTYPE_H # include