work around missing __func__ in sample code

svn:r1310
This commit is contained in:
Nick Mathewson 2009-05-22 19:11:59 +00:00
parent 0b22ca1929
commit e8343e9ff1
2 changed files with 27 additions and 0 deletions

View File

@ -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();

View File

@ -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();