mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-04 01:36:23 -04:00
util-internal: fix __func__ redefinition (netbsd)
==> netbsd: In file included from ../listener.c:57:0: ==> netbsd: ../util-internal.h:58:0: warning: "__func__" redefined [enabled by default] ==> netbsd: #define __func__ EVENT____func__ ==> netbsd: ^ ==> netbsd: In file included from /usr/include/amd64/types.h:39:0, ==> netbsd: from /usr/include/sys/types.h:45, ==> netbsd: from ../listener.c:30: ==> netbsd: /usr/include/sys/cdefs.h:394:0: note: this is the location of the previous definition ==> netbsd: #define __func__ __PRETTY_FUNCTION__
This commit is contained in:
parent
2c62062e12
commit
253e7fa90c
@ -1585,7 +1585,7 @@ class CCodeGenerator:
|
||||
'#include <event2/event.h>\n'
|
||||
'#include <event2/buffer.h>\n'
|
||||
'#include <event2/tag.h>\n\n'
|
||||
'#ifdef EVENT____func__\n'
|
||||
'#if defined(EVENT____func__) && !defined(__func__)\n'
|
||||
'#define __func__ EVENT____func__\n'
|
||||
'#endif\n\n'
|
||||
)
|
||||
|
@ -26,10 +26,6 @@
|
||||
|
||||
#include <event2/event.h>
|
||||
|
||||
#ifdef EVENT____func__
|
||||
#define __func__ EVENT____func__
|
||||
#endif
|
||||
|
||||
int called = 0;
|
||||
|
||||
static void
|
||||
@ -37,7 +33,7 @@ signal_cb(evutil_socket_t fd, short event, void *arg)
|
||||
{
|
||||
struct event *signal = arg;
|
||||
|
||||
printf("%s: got signal %d\n", __func__, event_get_signal(signal));
|
||||
printf("signal_cb: got signal %d\n", event_get_signal(signal));
|
||||
|
||||
if (called >= 2)
|
||||
event_del(signal);
|
||||
|
@ -43,10 +43,6 @@
|
||||
|
||||
#include "event2/event-config.h"
|
||||
|
||||
#ifdef EVENT____func__
|
||||
#define __func__ EVENT____func__
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -49,10 +49,6 @@
|
||||
#include <event.h>
|
||||
#include <evutil.h>
|
||||
|
||||
#ifdef EVENT____func__
|
||||
#define __func__ EVENT____func__
|
||||
#endif
|
||||
|
||||
struct timeval timeout = {3, 0};
|
||||
|
||||
static void
|
||||
|
@ -49,10 +49,6 @@
|
||||
#include <event.h>
|
||||
#include <evutil.h>
|
||||
|
||||
#ifdef EVENT____func__
|
||||
#define __func__ EVENT____func__
|
||||
#endif
|
||||
|
||||
int test_okay = 1;
|
||||
int called = 0;
|
||||
struct timeval timeout = {60, 0};
|
||||
|
@ -24,6 +24,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "../util-internal.h"
|
||||
#include "event2/event-config.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -51,10 +52,6 @@
|
||||
#include "event2/event_compat.h"
|
||||
#include "event2/util.h"
|
||||
|
||||
#ifdef EVENT____func__
|
||||
#define __func__ EVENT____func__
|
||||
#endif
|
||||
|
||||
evutil_socket_t pair[2];
|
||||
int test_okay = 1;
|
||||
int called = 0;
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
||||
#ifdef EVENT__inline
|
||||
#define inline EVENT__inline
|
||||
#endif
|
||||
#ifdef EVENT____func__
|
||||
#if defined(EVENT____func__) && !defined(__func__)
|
||||
#define __func__ EVENT____func__
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user