msvc: makekdewidgets

Peter Kümmel syntheticpp at gmx.net
Sun May 14 17:50:38 CEST 2006


Something for the kdewin32 TODO list:


makekdewidgets throws an assert in win/src/mmap.c:

line 117:
	hfd = (HANDLE)_get_osfhandle( fd );


When the mmap call is avoided then makekdewidgets
does not crash:


Index: kdecore/kconfigbackend.cpp
===================================================================
--- kdecore/kconfigbackend.cpp  (Revision 540637)
+++ kdecore/kconfigbackend.cpp  (Arbeitskopie)
@@ -445,7 +445,7 @@

    unsigned int ll = localeString.length();

-#ifdef HAVE_MMAP
+#if defined(HAVE_MMAP) && !defined(Q_CC_MSVC)
    static volatile const char *map;
    map = ( const char* ) mmap(0, rFile.size(), PROT_READ, MAP_PRIVATE,
                                           rFile.handle(), 0);
@@ -699,7 +699,7 @@
    if (fileOptionImmutable)
       bFileImmutable = true;

-#ifdef HAVE_MMAP
+#if defined(HAVE_MMAP) && !defined(Q_CC_MSVC)
    if (map)
    {
       munmap(( char* )map, rFile.size());



More information about the Kde-buildsystem mailing list