Browse Source

* Added Winsock (c)(tm)(r) compatibility

tags/v0.99.beta14
Jean-Yves Lamoureux jylam 18 years ago
parent
commit
0890243547
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      src/cacaserver.c

+ 11
- 0
src/cacaserver.c View File

@@ -121,6 +121,14 @@ int main(void)
struct server *server; struct server *server;
char *tmp; char *tmp;


#ifdef HAVE_WINDOWS_H
WORD winsockVersion;
WSADATA wsaData;
int nret;
winsockVersion = MAKEWORD(1, 1);

WSAStartup(winsockVersion, &wsaData);
#endif
server = malloc(sizeof(struct server)); server = malloc(sizeof(struct server));


server->input = malloc(12); server->input = malloc(12);
@@ -262,6 +270,9 @@ int main(void)


free(server); free(server);


#ifdef HAVE_WINDOWS_H
WSACleanup();
#endif
return 0; return 0;
} }




Loading…
Cancel
Save