Ensure that KQUEUE_DEBUG is always defined.

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@381 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
mheily 2011-01-15 17:51:18 +00:00
parent fa235b8355
commit 65656760de
3 changed files with 2 additions and 5 deletions

View File

@ -156,7 +156,7 @@ knote_get_socket_type(struct knote *kn)
return (0);
break;
default:
dbg_printf("getsockopt(3) failed: %s", strerror(errno));
dbg_perror("getsockopt(3)");
return (-1);
}
} else {

View File

@ -24,9 +24,7 @@
#include "private.h"
#ifndef NDEBUG
int KQUEUE_DEBUG = 0;
#endif
static RB_HEAD(kqt, kqueue) kqtree = RB_INITIALIZER(&kqtree);

View File

@ -43,11 +43,10 @@ struct evfilt_data;
/* Maximum events returnable in a single kevent() call */
#define MAX_KEVENT 512
#ifndef NDEBUG
extern int KQUEUE_DEBUG;
#ifndef NDEBUG
#define dbg_puts(str) do { \
if (KQUEUE_DEBUG) \
fprintf(stderr, "KQ [%d]: %s(): %s\n", THREAD_ID, __func__,str); \