diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-05-22 19:11:59 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-05-22 19:11:59 +0000 |
commit | e8343e9ff18b768fdc0944da18350349ef26cdf0 (patch) | |
tree | e1f50b351200d0ff0dee063a1f7218eb223d5050 /sample | |
parent | 0b22ca192991aa5fa95e958cd6b010d89915bdb3 (diff) | |
download | libevent-e8343e9ff18b768fdc0944da18350349ef26cdf0.tar.gz |
work around missing __func__ in sample code
svn:r1310
Diffstat (limited to 'sample')
-rw-r--r-- | sample/signal-test.c | 13 | ||||
-rw-r--r-- | sample/time-test.c | 14 |
2 files changed, 27 insertions, 0 deletions
diff --git a/sample/signal-test.c b/sample/signal-test.c index cd1302f4..165883fb 100644 --- a/sample/signal-test.c +++ b/sample/signal-test.c @@ -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(); diff --git a/sample/time-test.c b/sample/time-test.c index a9504ba1..4c87d778 100644 --- a/sample/time-test.c +++ b/sample/time-test.c @@ -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(); |