mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-14 14:54:49 -04:00
work around missing __func__ in sample code
svn:r1310
This commit is contained in:
parent
0b22ca1929
commit
e8343e9ff1
@ -27,6 +27,10 @@
|
||||
|
||||
#include <event.h>
|
||||
|
||||
#ifdef _EVENT___func__
|
||||
#define __func__ _EVENT___func__
|
||||
#endif
|
||||
|
||||
int called = 0;
|
||||
|
||||
static void
|
||||
@ -46,6 +50,15 @@ int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
struct event signal_int;
|
||||
#ifdef WIN32
|
||||
WORD wVersionRequested;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
|
||||
wVersionRequested = MAKEWORD(2, 2);
|
||||
|
||||
err = WSAStartup(wVersionRequested, &wsaData);
|
||||
#endif
|
||||
|
||||
/* Initalize the event library */
|
||||
event_init();
|
||||
|
@ -27,6 +27,10 @@
|
||||
#include <event.h>
|
||||
#include <evutil.h>
|
||||
|
||||
#ifdef _EVENT___func__
|
||||
#define __func__ _EVENT___func__
|
||||
#endif
|
||||
|
||||
int lasttime;
|
||||
|
||||
static void
|
||||
@ -51,6 +55,16 @@ main (int argc, char **argv)
|
||||
struct event timeout;
|
||||
struct timeval tv;
|
||||
|
||||
#ifdef WIN32
|
||||
WORD wVersionRequested;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
|
||||
wVersionRequested = MAKEWORD(2, 2);
|
||||
|
||||
err = WSAStartup(wVersionRequested, &wsaData);
|
||||
#endif
|
||||
|
||||
/* Initalize the event library */
|
||||
event_init();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user