]> arthur.barton.de Git - netatalk.git/blob - libevent/test/test-init.c
Add libevent
[netatalk.git] / libevent / test / test-init.c
1 /*
2  * Compile with:
3  * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
4  */
5 #include "event2/event-config.h"
6
7 #include <sys/types.h>
8 #include <sys/stat.h>
9 #ifdef _EVENT_HAVE_SYS_TIME_H
10 #include <sys/time.h>
11 #endif
12 #ifdef _EVENT_HAVE_SYS_SOCKET_H
13 #include <sys/socket.h>
14 #endif
15 #include <fcntl.h>
16 #include <stdlib.h>
17 #include <stdio.h>
18 #include <string.h>
19 #ifndef WIN32
20 #include <unistd.h>
21 #endif
22 #include <errno.h>
23
24 #include <event.h>
25
26 int
27 main(int argc, char **argv)
28 {
29 #ifdef WIN32
30         WORD wVersionRequested;
31         WSADATA wsaData;
32         int     err;
33
34         wVersionRequested = MAKEWORD(2, 2);
35
36         err = WSAStartup(wVersionRequested, &wsaData);
37 #endif
38
39         /* Initalize the event library */
40         event_init();
41
42         return (0);
43 }
44