Re: [xml] libxml 2.2.8 encoding.c compilation problem

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Thu Nov 23 2000 - 08:02:47 EST


On Thu, Nov 23, 2000 at 12:41:58PM +0000, Mark Buckley wrote:
>
> Hi,
>
> I've just copied across the libxml2 2.2.8 release, and I'm having trouble with
> making the distribution. I'm using RedHat and compiling under gcc version
> egcs-2.91.66. I've checked the archives but I haven't found any reference to
> the problem that I've discovered:
>
> When I run make, the compiler gives me the following error:
>
> encoding.c: In function `xmlIconvWrapper':
> encoding.c:1691: parse error before `else'
> encoding.c: At top level:
> encoding.c:1695: parse error before `return'
> make[2]: *** [encoding.lo] Error 1
>
> The relevant piece of code is copied below, it appears that gcc doesn't like the
> last 'else' being outside the #ifdef EINVAL...#endif pair. Moving it inside to
> match the others stops the parse error.
>
> #ifdef EILSEQ
> if (errno == EILSEQ) {
> return -2;
> } else
> #endif
> #ifdef E2BIG
> if (errno == E2BIG) {
> return -1;
> } else
> #endif
> #ifdef EINVAL
> if (errno == EINVAL) {
> return -3;
> }
> #endif
> else {
> return -3;
> }
> }
> return 0;

  Hum, good catch ...
  I assume the enclosed patch will fix the problem,

    thanks for the report,

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | libxml Gnome XML toolkit
Tel : +33 476 615 257  | 655, avenue de l'Europe | http://xmlsoft.org/
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Rpmfind search site
 http://www.w3.org/People/all#veillard%40w3.org  | http://rpmfind.net/


----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Nov 23 2000 - 09:43:47 EST