mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-14 23:05:03 -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>
|
#include <event.h>
|
||||||
|
|
||||||
|
#ifdef _EVENT___func__
|
||||||
|
#define __func__ _EVENT___func__
|
||||||
|
#endif
|
||||||
|
|
||||||
int called = 0;
|
int called = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -46,6 +50,15 @@ int
|
|||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct event signal_int;
|
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 */
|
/* Initalize the event library */
|
||||||
event_init();
|
event_init();
|
||||||
|
@ -27,6 +27,10 @@
|
|||||||
#include <event.h>
|
#include <event.h>
|
||||||
#include <evutil.h>
|
#include <evutil.h>
|
||||||
|
|
||||||
|
#ifdef _EVENT___func__
|
||||||
|
#define __func__ _EVENT___func__
|
||||||
|
#endif
|
||||||
|
|
||||||
int lasttime;
|
int lasttime;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -51,6 +55,16 @@ main (int argc, char **argv)
|
|||||||
struct event timeout;
|
struct event timeout;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
WORD wVersionRequested;
|
||||||
|
WSADATA wsaData;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
wVersionRequested = MAKEWORD(2, 2);
|
||||||
|
|
||||||
|
err = WSAStartup(wVersionRequested, &wsaData);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initalize the event library */
|
/* Initalize the event library */
|
||||||
event_init();
|
event_init();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user