From cbb930024fc86aaf4edfbce71ea39b5ea520e973 Mon Sep 17 00:00:00 2001 From: Trond Norbye Date: Tue, 7 Aug 2012 10:20:11 +0200 Subject: [PATCH] Allow headers to be included with -Werror and -Wundef Users of the library may enforce a stricter set of compiler warnings causing their builds to fail due to warnings emitted from the headers. --- include/uv-private/eio.h | 2 +- include/uv-private/ngx-queue.h | 2 +- include/uv-private/uv-unix.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/uv-private/eio.h b/include/uv-private/eio.h index aab9988b..975f7ef8 100644 --- a/include/uv-private/eio.h +++ b/include/uv-private/eio.h @@ -251,7 +251,7 @@ struct eio_req eio_channel *channel; /* data used to direct poll callbacks arising from this req */ -#if __i386 || __amd64 +#if defined(__i386) || defined(__amd64) unsigned char cancelled; #else sig_atomic_t cancelled; diff --git a/include/uv-private/ngx-queue.h b/include/uv-private/ngx-queue.h index 6fd0071f..201107ed 100644 --- a/include/uv-private/ngx-queue.h +++ b/include/uv-private/ngx-queue.h @@ -62,7 +62,7 @@ struct ngx_queue_s { (q)->prev -#if (NGX_DEBUG) +#if defined(NGX_DEBUG) #define ngx_queue_remove(x) \ (x)->next->prev = (x)->prev; \ diff --git a/include/uv-private/uv-unix.h b/include/uv-private/uv-unix.h index 083e53c8..d6b022c0 100644 --- a/include/uv-private/uv-unix.h +++ b/include/uv-private/uv-unix.h @@ -51,7 +51,7 @@ # include #endif -#if __sun +#if defined(__sun) # include # include #endif @@ -103,7 +103,7 @@ struct uv__io_s { #define UV_REQ_TYPE_PRIVATE /* empty */ -#if __linux__ +#if defined(__linux__) # define UV_LOOP_PRIVATE_PLATFORM_FIELDS \ uv__io_t inotify_read_watcher; \ void* inotify_watchers; \