[Patch] fix compile kdecore with msvc

Thiago Macieira thiago at kde.org
Sun Oct 30 00:18:11 BST 2005


Ralf Habacker wrote:
>// replacement for unix close function
>inline void kde_close(int fd, char *a, int b)
>{
>        u_long res;
>        if (/* is socket file descriptor */
> /*ioctlsocket(fd,FIONREAD,&res) == 0*/ ){ closesocket(fd);
>        }
>        else {
>                close(fd);
>        }
>}

Well, maybe we don't have to detect it. The KSocketDevice class always 
deals with sockets, so there's no problem using closesocket(), which is a 
wrapper for close(2) on Unix.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

4. And æfter se scieppend ingelogode, he wrát "cenn", ac eala! se 
rihtendgesamnung andswarode "cenn: ne wát hú cennan 'eall'. Ástynt."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051029/b58c923f/attachment.sig>


More information about the kde-core-devel mailing list