[KinoSearch] Windows - Kinosearch
Marvin Humphrey
marvin at rectangular.com
Mon Sep 8 22:29:34 PDT 2008
On Sep 8, 2008, at 7:51 PM, Paul-Kenji Cahier wrote:
> Strawberry perl actually uses mingw to provide as much unix
> compatibility as possible, so it does go easier than activeperl.
Yeah. I use MSVC because it's *more* difficult. If code satisfies
both MSVC and GCC, we're in pretty good shape as far as portability.
>> MatchPostingScorer*
>> -MatchPostingScorer_init(MatchPostingScorer *self, Similarity *sim,
>> +MatchPostScorer_init(MatchPostingScorer *self, Similarity *sim,
>> PostingList *plist, Compiler *compiler)
> Thanks. That fixed the error.
Groovy.
> I had to actually comment out:
> typedef __int64 off64_t;
> in compat/windows/lfs.h(since mingw already defines it)
Actually, it's an error to include that file. It's only needed with
older versions of MSVC that don't define _ftelli64. Specifically,
it's needed by the MSVC 6 used to compile ActivePerl8xx.
At this point, I think it's best to drop support for Windows compilers
that don't provide _ftelli64. MSVC is on version 9 now.
r3847 zaps those files.
> I also had to #define DIR_SEP "/"
> since apparently mingw doesnt define it.
> (but there are mnor changes)
DIR_SEP is defined by Charmonizer (a configuration/probing tool). I'm
a little surprised that Charmonizer didn't successfully define DIR_SEP
as anything. The code that does the probing is in trunk/charmonizer/
src/Charmonizer/Probe/DirSep.charm (which is basically C code despite
the suffix). I guess none of the combos succeeded.
> I checked the mingw headers, and there's no sleep function in them,
> though
> they do tell that one should call the win32 sleep or _sleep, which I
> changed
> and worked for the best as it stopped the sleep error.
OK, that code was in there, but it wasn't reached because I assumed
that if unistd.h was available we were all good.
In commit r3846, the order of the #ifdef tests has been reversed so
that "windows.h" is preferred.
Try that.
> Sadly, for this one, I couldnt find an equivalent to kill.
> So I tried making it always return true(and not call kill) which
> did indeed let it finish compiling completly.
The #ifdef test order in ProcessID.c has also been reversed in r3846.
The Windows code doesn't use kill(), it uses OpenProcess(),
GetCurrentProcessId() and other yum yums.
> However it seems to be crashing on many tests.
> (according to the debugger, it crashes in kinosearch's dll, but I
> cant figure where since I dont have debug information)
Yeah, that's probably the same problem that's plaguing my MSVC build. :
( The common thread is that all of the failing tests call $invindexer-
>finish(). I'll take another hack at it.
Too bad there's no Valgrind for Windows -- that would make solving
this one much easier.
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
More information about the kinosearch
mailing list