7 #include "event2/event.h"
8 #include "event2/util.h"
9 #include "event2/thread.h"
11 #define E(x) printf (#x " -> \"%s\"\n", evutil_socket_error_to_string (x));
13 int main (int argc, char **argv)
18 #ifdef EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED
19 evthread_use_windows_threads ();
22 s1 = evutil_socket_error_to_string (WSAEINTR);
24 for (i = 0; i < 3; i++) {
25 printf ("\niteration %d:\n\n", i);
39 E(WSAEPROTONOSUPPORT);
40 E(WSAESOCKTNOSUPPORT);
61 E(WSAVERNOTSUPPORTED);
69 E(0xdeadbeef); /* test the case where no message is available */
71 /* fill up the hash table a bit to make sure it grows properly */
72 for (j = 0; j < 50; j++) {
74 evutil_secure_rng_get_bytes(&err, sizeof(err));
75 evutil_socket_error_to_string(err);
79 s2 = evutil_socket_error_to_string (WSAEINTR);
81 printf ("caching failed!\n");
83 libevent_global_shutdown ();