diff options
author | 2014-10-17 19:16:01 +0000 | |
---|---|---|
committer | 2014-10-17 19:16:01 +0000 | |
commit | defc4074ccfc9c1a6ee37be0e276b56046842efa (patch) | |
tree | 3fe00d2a6e8afa6e1176df7ccd7ac073e5e1030c /lib | |
parent | Also remove trailing spaces from the CPU brand string. (diff) | |
download | wireguard-openbsd-defc4074ccfc9c1a6ee37be0e276b56046842efa.tar.xz wireguard-openbsd-defc4074ccfc9c1a6ee37be0e276b56046842efa.zip |
Remove #ifdef HAVE_.*_H, just include the header files.
Do not include sys/param.h.
OK nicm@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libevent/Makefile | 16 | ||||
-rw-r--r-- | lib/libevent/buffer.c | 14 | ||||
-rw-r--r-- | lib/libevent/evbuffer.c | 7 | ||||
-rw-r--r-- | lib/libevent/event.c | 7 | ||||
-rw-r--r-- | lib/libevent/event_tagging.c | 13 | ||||
-rw-r--r-- | lib/libevent/evutil.c | 13 | ||||
-rw-r--r-- | lib/libevent/kqueue.c | 11 | ||||
-rw-r--r-- | lib/libevent/log.c | 9 | ||||
-rw-r--r-- | lib/libevent/poll.c | 7 | ||||
-rw-r--r-- | lib/libevent/select.c | 9 | ||||
-rw-r--r-- | lib/libevent/signal.c | 11 |
11 files changed, 22 insertions, 95 deletions
diff --git a/lib/libevent/Makefile b/lib/libevent/Makefile index a5b0761ba7e..500ff302c43 100644 --- a/lib/libevent/Makefile +++ b/lib/libevent/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.34 2014/10/15 22:34:44 bluhm Exp $ +# $OpenBSD: Makefile,v 1.35 2014/10/17 19:16:01 bluhm Exp $ LIB= event SRCS= buffer.c evbuffer.c event.c event_tagging.c evutil.c kqueue.c \ @@ -61,35 +61,21 @@ MLINKS= event.3 bufferevent_base_set.3 \ CFLAGS+= -I${.CURDIR} -DNDEBUG \ -DHAVE_CLOCK_GETTIME \ -DHAVE_CLOCK_MONOTONIC \ - -DHAVE_FCNTL_H \ -DHAVE_FD_MASK \ -DHAVE_GETADDRINFO \ -DHAVE_GETEGID \ -DHAVE_GETEUID \ -DHAVE_GETNAMEINFO \ -DHAVE_GETTIMEOFDAY \ - -DHAVE_INTTYPES_H \ -DHAVE_ISSETUGID \ -DHAVE_POLL \ -DHAVE_SELECT \ -DHAVE_SETFD \ - -DHAVE_STDARG_H \ - -DHAVE_STDINT_H \ - -DHAVE_STDLIB_H \ -DHAVE_STRLCPY \ -DHAVE_STRSEP \ -DHAVE_STRTOK_R \ -DHAVE_STRTOLL \ -DHAVE_STRUCT_IN6_ADDR \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_PARAM_H \ - -DHAVE_SYS_QUEUE_H \ - -DHAVE_SYS_SELECT_H \ - -DHAVE_SYS_SOCKET_H \ - -DHAVE_SYS_STAT_H \ - -DHAVE_SYS_TIME_H \ - -DHAVE_SYS_TYPES_H \ - -DHAVE_UNISTD_H \ -DHAVE_VASPRINTF \ -DHAVE_WORKING_KQUEUE diff --git a/lib/libevent/buffer.c b/lib/libevent/buffer.c index e888f59fcee..d84b9b19e8b 100644 --- a/lib/libevent/buffer.c +++ b/lib/libevent/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.21 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: buffer.c,v 1.22 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright (c) 2002, 2003 Niels Provos <provos@citi.umich.edu> @@ -33,30 +33,20 @@ #endif #include <sys/types.h> - -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#endif - -#ifdef HAVE_SYS_IOCTL_H #include <sys/ioctl.h> -#endif #include <assert.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#ifdef HAVE_STDARG_H #include <stdarg.h> -#endif -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include "event.h" #include "evutil.h" -#include "./log.h" +#include "log.h" struct evbuffer * evbuffer_new(void) diff --git a/lib/libevent/evbuffer.c b/lib/libevent/evbuffer.c index 9b66a06ab4d..3f32fc8f62d 100644 --- a/lib/libevent/evbuffer.c +++ b/lib/libevent/evbuffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evbuffer.c,v 1.14 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: evbuffer.c,v 1.15 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright (c) 2002-2004 Niels Provos <provos@citi.umich.edu> @@ -28,18 +28,13 @@ */ #include <sys/types.h> - -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#endif #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#ifdef HAVE_STDARG_H #include <stdarg.h> -#endif #include "evutil.h" #include "event.h" diff --git a/lib/libevent/event.c b/lib/libevent/event.c index fddc6288f14..3af73eaa3e4 100644 --- a/lib/libevent/event.c +++ b/lib/libevent/event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: event.c,v 1.31 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: event.c,v 1.32 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu> @@ -29,12 +29,9 @@ #include <sys/types.h> #include <sys/socket.h> -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#else -#include <sys/_libevent_time.h> -#endif #include <sys/queue.h> + #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/lib/libevent/event_tagging.c b/lib/libevent/event_tagging.c index 19d86184124..8afa55c1c88 100644 --- a/lib/libevent/event_tagging.c +++ b/lib/libevent/event_tagging.c @@ -1,4 +1,4 @@ -/* $OpenBSD: event_tagging.c,v 1.6 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: event_tagging.c,v 1.7 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright (c) 2003, 2004 Niels Provos <provos@citi.umich.edu> @@ -27,28 +27,17 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif - #include <sys/ioctl.h> - #include <sys/queue.h> -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#endif #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <syslog.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include "event.h" #include "evutil.h" diff --git a/lib/libevent/evutil.c b/lib/libevent/evutil.c index 38f29f3fe54..7293ebcf633 100644 --- a/lib/libevent/evutil.c +++ b/lib/libevent/evutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evutil.c,v 1.5 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: evutil.c,v 1.6 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright (c) 2007 Niels Provos <provos@citi.umich.edu> @@ -28,23 +28,16 @@ */ #include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif -#ifdef HAVE_UNISTD_H +#include <sys/queue.h> + #include <unistd.h> -#endif -#ifdef HAVE_FCNTL_H #include <fcntl.h> -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include <errno.h> #include <stdio.h> #include <signal.h> -#include <sys/queue.h> #include "event.h" #include "event-internal.h" #include "evutil.h" diff --git a/lib/libevent/kqueue.c b/lib/libevent/kqueue.c index ec82622e04e..773f08ab389 100644 --- a/lib/libevent/kqueue.c +++ b/lib/libevent/kqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kqueue.c,v 1.30 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: kqueue.c,v 1.31 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright 2000-2002 Niels Provos <provos@citi.umich.edu> @@ -30,13 +30,10 @@ #define _GNU_SOURCE 1 #include <sys/types.h> -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#else -#include <sys/_libevent_time.h> -#endif #include <sys/queue.h> #include <sys/event.h> + #include <signal.h> #include <stdio.h> #include <stdlib.h> @@ -44,14 +41,12 @@ #include <unistd.h> #include <errno.h> #include <assert.h> -#ifdef HAVE_INTTYPES_H #include <inttypes.h> -#endif /* Some platforms apparently define the udata field of struct kevent as * intptr_t, whereas others define it as void*. There doesn't seem to be an * easy way to tell them apart via autoconf, so we need to use OS macros. */ -#if defined(HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) #define PTR_TO_UDATA(x) ((intptr_t)(x)) #else #define PTR_TO_UDATA(x) (x) diff --git a/lib/libevent/log.c b/lib/libevent/log.c index fac2c5bef0e..3391392fbe5 100644 --- a/lib/libevent/log.c +++ b/lib/libevent/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.8 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: log.c,v 1.9 2014/10/17 19:16:01 bluhm Exp $ */ /* * log.c @@ -38,18 +38,15 @@ */ #include <sys/types.h> -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#else -#include <sys/_libevent_time.h> -#endif + #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <errno.h> -#include "event.h" +#include "event.h" #include "log.h" #include "evutil.h" diff --git a/lib/libevent/poll.c b/lib/libevent/poll.c index 65155a4f331..c318c376d5d 100644 --- a/lib/libevent/poll.c +++ b/lib/libevent/poll.c @@ -1,4 +1,4 @@ -/* $OpenBSD: poll.c,v 1.18 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: poll.c,v 1.19 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright 2000-2003 Niels Provos <provos@citi.umich.edu> @@ -28,12 +28,9 @@ */ #include <sys/types.h> -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#else -#include <sys/_libevent_time.h> -#endif #include <sys/queue.h> + #include <poll.h> #include <signal.h> #include <stdio.h> diff --git a/lib/libevent/select.c b/lib/libevent/select.c index 5e3fce23aa4..15109a79fdf 100644 --- a/lib/libevent/select.c +++ b/lib/libevent/select.c @@ -1,4 +1,4 @@ -/* $OpenBSD: select.c,v 1.19 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: select.c,v 1.20 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright 2000-2002 Niels Provos <provos@citi.umich.edu> @@ -28,15 +28,10 @@ */ #include <sys/types.h> -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#else -#include <sys/_libevent_time.h> -#endif -#ifdef HAVE_SYS_SELECT_H #include <sys/select.h> -#endif #include <sys/queue.h> + #include <signal.h> #include <stdio.h> #include <stdlib.h> diff --git a/lib/libevent/signal.c b/lib/libevent/signal.c index 7e141a0c3d7..32189e139e6 100644 --- a/lib/libevent/signal.c +++ b/lib/libevent/signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.c,v 1.20 2014/10/16 07:38:06 bluhm Exp $ */ +/* $OpenBSD: signal.c,v 1.21 2014/10/17 19:16:01 bluhm Exp $ */ /* * Copyright 2000-2002 Niels Provos <provos@citi.umich.edu> @@ -28,24 +28,17 @@ */ #include <sys/types.h> -#ifdef HAVE_SYS_TIME_H #include <sys/time.h> -#endif #include <sys/queue.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif + #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #include <errno.h> -#ifdef HAVE_FCNTL_H #include <fcntl.h> -#endif #include <assert.h> #include "event.h" |