]> granicus.if.org Git - libevent/commitdiff
signal: guard __cdecl definition with #ifdef
authorAzat Khuzhin <azat@libevent.org>
Sun, 24 Mar 2019 22:41:09 +0000 (01:41 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sat, 25 May 2019 18:25:11 +0000 (21:25 +0300)
Under mingw64:
  ../signal.c:88:0: warning: "__cdecl" redefined
   #define __cdecl

  <built-in>: note: this is the location of the previous definition

https://ci.appveyor.com/project/azat/libevent/builds/23321613#L427
(cherry picked from commit b8e2f01690c07f7b6eb29d097b30c1640fc9612e)

signal.c

index 3f46295024e572cfdf7e000a7fb0881f1ba00160..89f5fc1717638f58d0608fd82588f6a17dad0559 100644 (file)
--- a/signal.c
+++ b/signal.c
 #ifndef _WIN32
 /* Windows wants us to call our signal handlers as __cdecl.  Nobody else
  * expects you to do anything crazy like this. */
+#ifndef __cdecl
 #define __cdecl
 #endif
+#endif
 
 static int evsig_add(struct event_base *, evutil_socket_t, short, short, void *);
 static int evsig_del(struct event_base *, evutil_socket_t, short, short, void *);