libevent/test/test-init.c

45 lines
716 B
C
Raw Normal View History

2003-09-25 17:55:17 +00:00
/*
* Compile with:
* cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
*/
#include "event-config.h"
2003-09-25 17:55:17 +00:00
#include <sys/types.h>
#include <sys/stat.h>
2009-11-05 20:37:19 +00:00
#ifdef _EVENT_HAVE_SYS_TIME_H
2003-09-25 17:55:17 +00:00
#include <sys/time.h>
2009-11-05 20:37:19 +00:00
#endif
#ifdef _EVENT_HAVE_SYS_SOCKET_H
2003-09-25 17:55:17 +00:00
#include <sys/socket.h>
#endif
2003-09-25 17:55:17 +00:00
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
2009-11-05 20:37:19 +00:00
#ifndef WIN32
2003-09-25 17:55:17 +00:00
#include <unistd.h>
2009-11-05 20:37:19 +00:00
#endif
2003-09-25 17:55:17 +00:00
#include <errno.h>
#include <event.h>
int
main(int argc, char **argv)
{
#ifdef WIN32
WORD wVersionRequested;
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD(2, 2);
err = WSAStartup(wVersionRequested, &wsaData);
#endif
2003-09-25 17:55:17 +00:00
/* Initalize the event library */
event_init();
return (0);
}