Fedora Core 4 sys_errlist

The samples on http://www.w3.org/Library/ aren't working on Fedora Core 4,
using Fedora's own packages, w3c-libwww-5.4.0-13.0.FC4.1 and
w3c-libwww-devel-5.4.0-13.0.FC4.1.

The example is

> #include "WWWLib.h"
>
> int main()
> {
>     HTLibInit("TestApp", "1.0");
>     HTLibTerminate();
>     return 0;
> }
>

I changed it to

> #include <w3c-libwww/WWWLib.h>
>
> int main()
> {
>     HTLibInit("TestApp", "1.0");
>     HTLibTerminate();
>     return 0;
> }
>

But upon compiling with gcc I get a ton of errors about size_t and FILE and
other types. So I figured stdlib.h and stdio.h might be also required. I
added these and then was left with two errors:

In file included from /usr/include/w3c-libwww/WWWLib.h:50,
>                  from www.c:4:
> /usr/include/w3c-libwww/wwwsys.h:1324: error: conflicting types for
> 'sys_errlist'
> /usr/include/bits/sys_errlist.h:28: error: previous declaration of
> 'sys_errlist' was here
> In file included from /usr/include/w3c-libwww/HTInet.h:30,
>                  from /usr/include/w3c-libwww/WWWCore.h:339,
>                  from /usr/include/w3c-libwww/WWWLib.h:75,
>                  from www.c:4:
> /usr/include/w3c-libwww/HTHstMan.h:94: error: field 'sock_addr' has
> incomplete type
>

It looks like /usr/include/bits/sys_errlist.h's sys_errlist conflicts with
wwwsys.h's version. Are they supposed to be the same thing? wwwsys.h's is
defined as

> extern char *sys_errlist[];


After reading this
post<http://lists.w3.org/Archives/Public/www-lib/2005JulSep/0019>,
I found that putting #include <w3c-libwww/wwwconf.h> before WWWLib.h will
allow the code to compile.

So where does the problem lie? In the official documentation? In Fedora's
distribution? In the Fedora's w3c-libwww-devel rpm?

Received on Tuesday, 29 November 2005 22:07:32 UTC