[redland-dev] Building Redland 0.9.17 on WinXP w/full Cygwin install

Dave Beckett dave.beckett at bristol.ac.uk
Tue May 25 00:13:34 BST 2004


On Mon, 24 May 2004, Jasper van de Gronde wrote:
> I managed to compile Raptor with MSVC, so if you own MSVC (6) or are 
> just interested in some binaries (I link to Raptor statically, but it's 
> not very difficult to create a dll from it) I can at least be of some 
> assistance with Raptor. I haven't tried compiling Redland (yet) and I 
> don't have Cygwin (or Mingw32) installed.
> 
> I had to make a few changes to the Raptor sources btw:
>     * raptor.h: Added #ifdef RAPTOR_STATIC so I can compile a static 
> library on Win32 (if RAPTOR_STATIC is defined I let it define RAPTOR_API 
> as nothing).

Yould you send me more details on this so I can merge this change?

>     * raptor_general.c: Added a const to the first parameter of 
> raptor_print_statement.

Hmm?  It already has that:
raptor_print_statement(const raptor_statement * statement, FILE *stream)


>     * raptor_general.c: Removed the return inside raptor_free_memory.

Oops.  fixed.

>     * raptor_uri.c: Added #include <io.h> /* For access(...) */ inside 
> the #ifdef WIN32 block.

POSIX says it's in unistd.h but whatever.  It has been added
to win32_config.h along with memory.h from a patch for win32/vc6
from Jose Kahan.


>     * turtle_lexer.c: Added #ifdef HAVE_UNISTD_H around #include 
> <unistd.h>, as I don't have it (and it doesn't need it on my system).
>     * turtle_lexer.h: Added #ifdef HAVE_UNISTD_H around #include 
> <unistd.h>, as I don't have it (and it doesn't need it on my system).

That's annoying, I use %option nounistd in the lexer and it
shouldn't be generating them.  This is, however, a bug in flex 2.5.x
and it looks like the one I used had that bug when I made the release.

>     * win32_config.h: Added version defines (VERSION, 
> RAPTOR_VERSION_MAJOR, RAPTOR_VERSION_MINOR, RAPTOR_VERSION_RELEASE, 
> RAPTOR_VERSION_DECIMAL).
>     * win32_config.h: Added #define __func__ "", I don't know whether 
> there is a better alternative (it seems MSVC6 doesn't know this macro).

These I already added from Jose who was building it for win32.

__func__ is part of C99 from the ISO standard a few years ago.
Aren't standards great! :)

<snip/>

Actually I noticed these lines in win32_config.h :

/* for access() which is POSIX but doesn't seem to have the defines in VC */
#ifndef R_OK
#define R_OK 4
#endif

so maybe can they be removed if io.h is included?  Jose/others verify?

Dave




More information about the redland-dev mailing list