Ignore:
Timestamp:
Jun 27, 2007, 3:03:31 PM (13 years ago)
Author:
Sam Hocevar
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/cacaserver.c

    r1462 r1770  
    3131#   include <winsock2.h>
    3232#   include <ws2tcpip.h>
     33#   define USE_WINSOCK 1
    3334#endif
    3435#if defined(HAVE_UNISTD_H)
     
    4243#include <stdarg.h>
    4344
     45#ifndef USE_WINSOCK
     46#   define USE_WINSOCK 0
     47#endif
     48
    4449#include "cucul.h"
    4550
     
    130135    char *tmp;
    131136
    132 #ifdef HAVE_WINDOWS_H
    133         WORD winsockVersion;
    134         WSADATA wsaData;
    135         winsockVersion = MAKEWORD(1, 1);
    136 
    137         WSAStartup(winsockVersion, &wsaData);
     137#if USE_WINSOCK
     138    WORD winsockVersion;
     139    WSADATA wsaData;
     140    winsockVersion = MAKEWORD(1, 1);
     141
     142    WSAStartup(winsockVersion, &wsaData);
    138143#endif
    139144    server = malloc(sizeof(struct server));
     
    292297    free(server);
    293298
    294 #ifdef HAVE_WINDOWS_H
     299#if USE_WINSOCK
    295300    WSACleanup();
    296301#endif
Note: See TracChangeset for help on using the changeset viewer.