RE: Build Trouble

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

RE: Build Trouble

While trying to rebuild the current CVS state of libwww with MSVC6SP6, I
saw the DIR problems referenced in this thread, but wanted to clarify the
solution that worked for me
(and report other problems coming up afterwards).

First, the file to change is wwwsys.h, not wwwysy.h . Second, there is more
than one #ifdef WWW_MSWINDOWS in the file; the change should go under the
first one.

Original message:

There was another problem right after resolving this one - "buffer size for
readdir_r cannot be determined" in the implementation of
HTFile_irent_buf_size in
 library\src\HTFile.c.  I tried to resolve that by simply setting name_max
to 256 as a practical maximum path length (as the code just above it does),
instead of
raising the error  (following the suggestion  here: ) .  But
then the final line of this function
also caused two problems on Windows: 1)  offsetof was not defined (cured by
adding #include stddef.h just above the function); 2) offsetof doesn't know
about 'struct dirent' which is not implemented under MSVC. It appears this
code has never been working on Windows.

Web mailing list posting suggested that this function does not seem
currently to be used by code anwhere else in the library, so you could move
past the problem by ignoring it,  commenting the whole function out.
That did not work. The wwwfile project requires the function at link time.

My ultimate ambition here is to be able to rebuild the library with
Microsoft Visual Studio.NET 2008, but I'm just following the original
install instructions carefully for now. Has anyone had success
with the newer  version of the Microsoft compiler?

Glenn Picher
DeskNet Inc.


From: Sinha, Raj (Raj) <[hidden email]>
Date: Sat, 14 Mar 2009 05:51:50 -0400
<[hidden email]>
To: "DootDog" <[hidden email]>, <[hidden email]>
This seems to have resolved the build error

In wwwysy.h

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf
Of DootDog
Sent: Thursday, March 12, 2009 6:43 PM
To: [hidden email]
Subject: Re: Build Trouble

I've run into this same problem.  Was anybody able to solve it?  I've
searched through the files and can't find DIR defined anywhere.

Will Amrull wrote:
> Hi, I am trying to build libw3 using the latest CVS and MSVC files,
but I
> am
> encountering a problem which causes about 85% of the project builds to
> fail.
> The problem seems to center around HTFile.h Line 102 :
> extern size_t HTFile_dirent_buf_size(DIR * dirp);
> These are the errors I receieve:
> \libwww\Library\src\HTFile.h(102) : error C2143: syntax error :
> ')'
> before '*'
> \libwww\Library\src\HTFile.h(102) : error C2143: syntax error :

> '{'
> before '*'
> \libwww\Library\src\HTFile.h(102) : error C2059: syntax error : ')'
> This error happens over and over and over as I try a bach build and I
> can't
> figure out what the problem is..
> Any help would be greatly appreciated.