CVS commit: src/external/bsd/libevent/dist/test

2021-05-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun May 30 00:19:09 UTC 2021

Modified Files:
src/external/bsd/libevent/dist/test: regress_ssl.c

Log Message:
Cast to enums via uintptr_t to avoid compiler warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/test/regress_ssl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_ssl.c
diff -u src/external/bsd/libevent/dist/test/regress_ssl.c:1.5 src/external/bsd/libevent/dist/test/regress_ssl.c:1.6
--- src/external/bsd/libevent/dist/test/regress_ssl.c:1.5	Wed Apr  7 03:36:48 2021
+++ src/external/bsd/libevent/dist/test/regress_ssl.c	Sun May 30 00:19:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_ssl.c,v 1.5 2021/04/07 03:36:48 christos Exp $	*/
+/*	$NetBSD: regress_ssl.c,v 1.6 2021/05/30 00:19:08 joerg Exp $	*/
 
 /*
  * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
@@ -891,7 +891,7 @@ regress_bufferevent_openssl_wm(void *arg
 	struct sockaddr_in sin;
 	struct sockaddr_storage ss;
 	enum regress_openssl_type type =
-		(enum regress_openssl_type)data->setup_data;
+		(enum regress_openssl_type)(uintptr_t)data->setup_data;
 	int bev_flags = BEV_OPT_CLOSE_ON_FREE;
 	ev_socklen_t slen;
 	SSL *ssl;



CVS commit: src/external/bsd/libevent/dist/test

2021-04-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Apr 10 19:27:16 UTC 2021

Modified Files:
src/external/bsd/libevent/dist/test: regress_http.c

Log Message:
tests/libevent: fix Clang build

No idea why GCC did not complain about this as well.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/libevent/dist/test/regress_http.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_http.c
diff -u src/external/bsd/libevent/dist/test/regress_http.c:1.9 src/external/bsd/libevent/dist/test/regress_http.c:1.10
--- src/external/bsd/libevent/dist/test/regress_http.c:1.9	Sat Apr 10 19:18:45 2021
+++ src/external/bsd/libevent/dist/test/regress_http.c	Sat Apr 10 19:27:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_http.c,v 1.9 2021/04/10 19:18:45 rillig Exp $	*/
+/*	$NetBSD: regress_http.c,v 1.10 2021/04/10 19:27:16 rillig Exp $	*/
 
 /*
  * Copyright (c) 2003-2007 Niels Provos 
@@ -36,7 +36,7 @@
 
 #include "event2/event-config.h"
 #include 
-__RCSID("$NetBSD: regress_http.c,v 1.9 2021/04/10 19:18:45 rillig Exp $");
+__RCSID("$NetBSD: regress_http.c,v 1.10 2021/04/10 19:27:16 rillig Exp $");
 
 #include 
 #include 
@@ -4580,7 +4580,11 @@ http_request_own_test(void *arg)
 	test_ok = 1;
 }
 
-static void http_run_bev_request(struct event_base *base, int port,
+static void
+#ifdef __GNUC__
+	__attribute__((format(printf, 3, 4)))
+#endif
+http_run_bev_request(struct event_base *base, int port,
 	const char *fmt, ...)
 {
 	struct bufferevent *bev = NULL;



CVS commit: src/external/bsd/libevent/dist

2021-04-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Apr 10 19:18:45 UTC 2021

Modified Files:
src/external/bsd/libevent/dist: bufferevent_ratelim.c evdns.c
event-internal.h event_tagging.c evmap.c evthread-internal.h
ht-internal.h log-internal.h select.c util-internal.h
src/external/bsd/libevent/dist/include/event2: rpc.h
src/external/bsd/libevent/dist/test: regress_http.c tinytest_macros.h

Log Message:
libevent: remove remaining CONSTCOND comments

Since lint1/tree.c 1.202 from 2021-01-31, lint no longer needs the
/*CONSTCOND*/ for do-while-0 "loops".

The comments from this commit were in do-while-0 loops that do not
follow the canonical form, therefore the previous commit did not catch
them.  Some of them have a trailing semicolon (which defies the whole
purpose of the do-while-0 loop), some are missing the space between
'while (0)', some start in column 1 instead of 9.

This reduces the local modifications, compared to the upstream code.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/bufferevent_ratelim.c \
src/external/bsd/libevent/dist/event_tagging.c \
src/external/bsd/libevent/dist/evmap.c \
src/external/bsd/libevent/dist/evthread-internal.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/libevent/dist/evdns.c \
src/external/bsd/libevent/dist/log-internal.h \
src/external/bsd/libevent/dist/util-internal.h
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libevent/dist/event-internal.h \
src/external/bsd/libevent/dist/select.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/ht-internal.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/include/event2/rpc.h
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/libevent/dist/test/regress_http.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/libevent/dist/test/tinytest_macros.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/bufferevent_ratelim.c
diff -u src/external/bsd/libevent/dist/bufferevent_ratelim.c:1.5 src/external/bsd/libevent/dist/bufferevent_ratelim.c:1.6
--- src/external/bsd/libevent/dist/bufferevent_ratelim.c:1.5	Sat Apr 10 19:02:37 2021
+++ src/external/bsd/libevent/dist/bufferevent_ratelim.c	Sat Apr 10 19:18:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: bufferevent_ratelim.c,v 1.5 2021/04/10 19:02:37 rillig Exp $	*/
+/*	$NetBSD: bufferevent_ratelim.c,v 1.6 2021/04/10 19:18:45 rillig Exp $	*/
 
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -213,7 +213,7 @@ bufferevent_get_rlim_max_(struct buffere
 	do {	\
 		if (max_so_far > (x))		\
 			max_so_far = (x);	\
-	} while (/*CONSTCOND*/0);
+	} while (0);
 
 	if (!bev->rate_limiting)
 		return max_so_far;
Index: src/external/bsd/libevent/dist/event_tagging.c
diff -u src/external/bsd/libevent/dist/event_tagging.c:1.5 src/external/bsd/libevent/dist/event_tagging.c:1.6
--- src/external/bsd/libevent/dist/event_tagging.c:1.5	Wed Apr  7 03:36:48 2021
+++ src/external/bsd/libevent/dist/event_tagging.c	Sat Apr 10 19:18:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: event_tagging.c,v 1.5 2021/04/07 03:36:48 christos Exp $	*/
+/*	$NetBSD: event_tagging.c,v 1.6 2021/04/10 19:18:45 rillig Exp $	*/
 
 /*
  * Copyright (c) 2003-2009 Niels Provos 
@@ -29,7 +29,7 @@
 
 #include "event2/event-config.h"
 #include 
-__RCSID("$NetBSD: event_tagging.c,v 1.5 2021/04/07 03:36:48 christos Exp $");
+__RCSID("$NetBSD: event_tagging.c,v 1.6 2021/04/10 19:18:45 rillig Exp $");
 #include "evconfig-private.h"
 
 #ifdef EVENT__HAVE_SYS_TYPES_H
@@ -143,7 +143,7 @@ evtag_init(void)
 	data[0] = (data[0] & 0x0f) | ((nibbles & 0x0f) << 4);		\
 	\
 	return ((off + 1) / 2);		\
-} while (/*CONSTCOND*/0)
+} while (0)
 
 static inline int
 encode_int_internal(ev_uint8_t *data, ev_uint32_t number)
@@ -355,7 +355,7 @@ do {	\
 	*pnumber = number;		\
 	\
 	return (int)(len);		\
-} while (/*CONSTCOND*/0)
+} while (0)
 
 /* Internal: decode an integer from an evbuffer, without draining it.
  *  Only integers up to 32-bits are supported.
Index: src/external/bsd/libevent/dist/evmap.c
diff -u src/external/bsd/libevent/dist/evmap.c:1.5 src/external/bsd/libevent/dist/evmap.c:1.6
--- src/external/bsd/libevent/dist/evmap.c:1.5	Sat Apr 10 19:02:37 2021
+++ src/external/bsd/libevent/dist/evmap.c	Sat Apr 10 19:18:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: evmap.c,v 1.5 2021/04/10 19:02:37 rillig Exp $	*/
+/*	$NetBSD: evmap.c,v 1.6 2021/04/10 19:18:45 rillig Exp $	*/
 
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -27,7 +27,7 @@
  */
 #include "event2/event-config.h"
 #include 
-__RCSID("$NetBSD: evmap.c,v 1.5 2021/04/10 19:02:37 rillig Exp $");
+__RCSID("$NetBSD: evmap.c,v 1.6 2021/04/10 19:18:45 rillig Exp $");
 #include "evconfig-private.h"
 
 #ifdef _WIN32
@@ -121,7 +121,7 @@ HT_GENERATE(event_io_map, event_map_entr
 		key_.fd = 

CVS commit: src/external/bsd/libevent/dist

2021-04-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Apr 10 19:02:37 UTC 2021

Modified Files:
src/external/bsd/libevent/dist: bufferevent-internal.h bufferevent.c
bufferevent_ratelim.c evbuffer-internal.h evdns.c evmap.c
evthread-internal.h ratelim-internal.h util-internal.h
src/external/bsd/libevent/dist/test: regress.c regress.h
regress_buffer.c regress_http.c regress_util.c

Log Message:
libevent: remove unnecessary CONSTCOND comments

Since lint1/tree.c 1.202 from 2021-01-31, lint no longer needs the
/*CONSTCOND*/ for do-while-0 "loops".

This reduces the local modifications.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/libevent/dist/bufferevent-internal.h \
src/external/bsd/libevent/dist/bufferevent_ratelim.c \
src/external/bsd/libevent/dist/evmap.c \
src/external/bsd/libevent/dist/evthread-internal.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/bufferevent.c \
src/external/bsd/libevent/dist/evbuffer-internal.h \
src/external/bsd/libevent/dist/evdns.c \
src/external/bsd/libevent/dist/util-internal.h
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/ratelim-internal.h
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/libevent/dist/test/regress.c
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/libevent/dist/test/regress.h \
src/external/bsd/libevent/dist/test/regress_buffer.c \
src/external/bsd/libevent/dist/test/regress_http.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libevent/dist/test/regress_util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/bufferevent-internal.h
diff -u src/external/bsd/libevent/dist/bufferevent-internal.h:1.4 src/external/bsd/libevent/dist/bufferevent-internal.h:1.5
--- src/external/bsd/libevent/dist/bufferevent-internal.h:1.4	Wed Apr  7 03:36:48 2021
+++ src/external/bsd/libevent/dist/bufferevent-internal.h	Sat Apr 10 19:02:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: bufferevent-internal.h,v 1.4 2021/04/07 03:36:48 christos Exp $	*/
+/*	$NetBSD: bufferevent-internal.h,v 1.5 2021/04/10 19:02:37 rillig Exp $	*/
 
 /*
  * Copyright (c) 2008-2012 Niels Provos and Nick Mathewson
@@ -461,14 +461,14 @@ bufferevent_socket_set_conn_address_(str
 	do {\
 		if (evutil_timerisset(&(bev)->timeout_read))		\
 			event_add(&(bev)->ev_read, &(bev)->timeout_read); \
-	} while (/*CONSTCOND*/0)
+	} while (0)
 /** Internal use: We have just successfully written data from an inbuf, so
  * reset the read timeout (if any). */
 #define BEV_RESET_GENERIC_WRITE_TIMEOUT(bev)\
 	do {\
 		if (evutil_timerisset(&(bev)->timeout_write))		\
 			event_add(&(bev)->ev_write, &(bev)->timeout_write); \
-	} while (/*CONSTCOND*/0)
+	} while (0)
 #define BEV_DEL_GENERIC_READ_TIMEOUT(bev)	\
 		event_del(&(bev)->ev_read)
 #define BEV_DEL_GENERIC_WRITE_TIMEOUT(bev)	\
@@ -487,13 +487,13 @@ bufferevent_socket_set_conn_address_(str
 #define BEV_LOCK(b) do {		\
 		struct bufferevent_private *locking =  BEV_UPCAST(b);	\
 		EVLOCK_LOCK(locking->lock, 0);\
-	} while (/*CONSTCOND*/0)
+	} while (0)
 
 /** Internal: Release the lock (if any) on a bufferevent */
 #define BEV_UNLOCK(b) do {		\
 		struct bufferevent_private *locking =  BEV_UPCAST(b);	\
 		EVLOCK_UNLOCK(locking->lock, 0);			\
-	} while (/*CONSTCOND*/0)
+	} while (0)
 #endif
 
 
Index: src/external/bsd/libevent/dist/bufferevent_ratelim.c
diff -u src/external/bsd/libevent/dist/bufferevent_ratelim.c:1.4 src/external/bsd/libevent/dist/bufferevent_ratelim.c:1.5
--- src/external/bsd/libevent/dist/bufferevent_ratelim.c:1.4	Wed Apr  7 03:36:48 2021
+++ src/external/bsd/libevent/dist/bufferevent_ratelim.c	Sat Apr 10 19:02:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: bufferevent_ratelim.c,v 1.4 2021/04/07 03:36:48 christos Exp $	*/
+/*	$NetBSD: bufferevent_ratelim.c,v 1.5 2021/04/10 19:02:37 rillig Exp $	*/
 
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -484,7 +484,7 @@ bev_group_random_element_(struct buffere
 		bev = LIST_NEXT(bev, rate_limiting->next_in_group)) { \
 			block ;		\
 		}			\
-	} while (/*CONSTCOND*/0)
+	} while (0)
 
 static void
 bev_group_unsuspend_reading_(struct bufferevent_rate_limit_group *g)
Index: src/external/bsd/libevent/dist/evmap.c
diff -u src/external/bsd/libevent/dist/evmap.c:1.4 src/external/bsd/libevent/dist/evmap.c:1.5
--- src/external/bsd/libevent/dist/evmap.c:1.4	Wed Apr  7 03:36:48 2021
+++ src/external/bsd/libevent/dist/evmap.c	Sat Apr 10 19:02:37 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: evmap.c,v 1.4 2021/04/07 03:36:48 christos Exp $	*/
+/*	$NetBSD: evmap.c,v 1.5 2021/04/10 19:02:37 rillig Exp $	*/
 
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -27,7 +27,7 @@
  */
 #include "event2/event-config.h"
 #include 
-__RCSID("$NetBSD: evmap.c,v 1.4 2021/04/07 03:36:48 christos Exp $");

CVS commit: src/external/bsd/libevent/dist

2017-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar  2 15:43:14 UTC 2017

Modified Files:
src/external/bsd/libevent/dist: evthread.c

Log Message:
remove debugging abort that makes tests fail.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/libevent/dist/evthread.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/evthread.c
diff -u src/external/bsd/libevent/dist/evthread.c:1.1.1.2 src/external/bsd/libevent/dist/evthread.c:1.2
--- src/external/bsd/libevent/dist/evthread.c:1.1.1.2	Tue Jan 31 16:14:52 2017
+++ src/external/bsd/libevent/dist/evthread.c	Thu Mar  2 10:43:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: evthread.c,v 1.1.1.2 2017/01/31 21:14:52 christos Exp $	*/
+/*	$NetBSD: evthread.c,v 1.2 2017/03/02 15:43:14 christos Exp $	*/
 /*
  * Copyright (c) 2008-2012 Niels Provos, Nick Mathewson
  *
@@ -27,7 +27,7 @@
 
 #include "event2/event-config.h"
 #include 
-__RCSID("$NetBSD: evthread.c,v 1.1.1.2 2017/01/31 21:14:52 christos Exp $");
+__RCSID("$NetBSD: evthread.c,v 1.2 2017/03/02 15:43:14 christos Exp $");
 #include "evconfig-private.h"
 
 #ifndef EVENT__DISABLE_THREAD_SUPPORT
@@ -108,7 +108,7 @@ evthread_set_lock_callbacks(const struct
 	if (!cbs) {
 		if (target->alloc)
 			event_warnx("Trying to disable lock functions after "
-			"they have been set up will probaby not work.");
+			"they have been set up will probably not work.");
 		memset(target, 0, sizeof(evthread_lock_fns_));
 		return 0;
 	}
@@ -151,7 +151,7 @@ evthread_set_condition_callbacks(const s
 	if (!cbs) {
 		if (target->alloc_condition)
 			event_warnx("Trying to disable condition functions "
-			"after they have been set up will probaby not "
+			"after they have been set up will probably not "
 			"work.");
 		memset(target, 0, sizeof(evthread_cond_fns_));
 		return 0;



CVS commit: src/external/bsd/libevent/dist/test

2015-08-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Aug 28 13:04:48 UTC 2015

Modified Files:
src/external/bsd/libevent/dist/test: regress_buffer.c

Log Message:
Simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libevent/dist/test/regress_buffer.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_buffer.c
diff -u src/external/bsd/libevent/dist/test/regress_buffer.c:1.4 src/external/bsd/libevent/dist/test/regress_buffer.c:1.5
--- src/external/bsd/libevent/dist/test/regress_buffer.c:1.4	Thu Jan 29 07:26:02 2015
+++ src/external/bsd/libevent/dist/test/regress_buffer.c	Fri Aug 28 13:04:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_buffer.c,v 1.4 2015/01/29 07:26:02 spz Exp $	*/
+/*	$NetBSD: regress_buffer.c,v 1.5 2015/08/28 13:04:48 joerg Exp $	*/
 /*
  * Copyright (c) 2003-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -33,7 +33,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress_buffer.c,v 1.4 2015/01/29 07:26:02 spz Exp $);
+__RCSID($NetBSD: regress_buffer.c,v 1.5 2015/08/28 13:04:48 joerg Exp $);
 
 #include sys/types.h
 #include sys/stat.h
@@ -199,7 +199,7 @@ test_evbuffer(void *ptr)
 
 	tt_assert(evbuffer_get_length(evb_two) == 0);
 	tt_assert(evbuffer_get_length(evb) == 7);
-	tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), 1/hello, 7) != 0);
+	tt_assert(memcmp((char*)EVBUFFER_DATA(evb), 1/hello, 7) == 0);
 
 	memset(buffer, 0, sizeof(buffer));
 	evbuffer_add(evb, buffer, sizeof(buffer));



CVS commit: src/external/bsd/libevent/dist

2015-02-01 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sun Feb  1 10:19:00 UTC 2015

Modified Files:
src/external/bsd/libevent/dist: evutil_rand.c

Log Message:
void functions should not return values.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/evutil_rand.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/evutil_rand.c
diff -u src/external/bsd/libevent/dist/evutil_rand.c:1.3 src/external/bsd/libevent/dist/evutil_rand.c:1.4
--- src/external/bsd/libevent/dist/evutil_rand.c:1.3	Thu Jan 29 07:26:02 2015
+++ src/external/bsd/libevent/dist/evutil_rand.c	Sun Feb  1 10:19:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: evutil_rand.c,v 1.3 2015/01/29 07:26:02 spz Exp $	*/
+/*	$NetBSD: evutil_rand.c,v 1.4 2015/02/01 10:19:00 njoly Exp $	*/
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
  *
@@ -35,7 +35,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: evutil_rand.c,v 1.3 2015/01/29 07:26:02 spz Exp $);
+__RCSID($NetBSD: evutil_rand.c,v 1.4 2015/02/01 10:19:00 njoly Exp $);
 
 #include limits.h
 
@@ -70,7 +70,8 @@ static void
 ev_arc4random_buf(void *buf, size_t n)
 {
 #if defined(_EVENT_HAVE_ARC4RANDOM_BUF)  !defined(__APPLE__)
-	return arc4random_buf(buf, n);
+	arc4random_buf(buf, n);
+	return;
 #else
 	unsigned char *b = buf;
 
@@ -85,7 +86,8 @@ ev_arc4random_buf(void *buf, size_t n)
 		void (*tptr)(void *,size_t) =
 		(void (*)(void*,size_t))arc4random_buf;
 		if (tptr != NULL) {
-			return arc4random_buf(buf, n);
+			arc4random_buf(buf, n);
+			return;
 		}
 	}
 #endif



CVS commit: src/external/bsd/libevent/dist/include/event2

2015-02-01 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sun Feb  1 19:09:05 UTC 2015

Removed Files:
src/external/bsd/libevent/dist/include/event2: event-config.h

Log Message:
this generated include file oughtn't be around, the 'good' version is in
external/bsd/libevent/include/event2/event-config.h instead


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/libevent/dist/include/event2/event-config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/libevent/dist/test

2015-01-31 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jan 31 12:12:17 UTC 2015

Modified Files:
src/external/bsd/libevent/dist/test: regress.h

Log Message:
timeval fields might not be int, so use imaxabs.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libevent/dist/test/regress.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.h
diff -u src/external/bsd/libevent/dist/test/regress.h:1.4 src/external/bsd/libevent/dist/test/regress.h:1.5
--- src/external/bsd/libevent/dist/test/regress.h:1.4	Thu Jan 29 07:26:02 2015
+++ src/external/bsd/libevent/dist/test/regress.h	Sat Jan 31 12:12:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.h,v 1.4 2015/01/29 07:26:02 spz Exp $	*/
+/*	$NetBSD: regress.h,v 1.5 2015/01/31 12:12:17 joerg Exp $	*/
 /*
  * Copyright (c) 2000-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -112,7 +112,7 @@ int _test_ai_eq(const struct evutil_addr
 	} while (/*CONSTCOND*/0)
 
 #define test_timeval_diff_leq(tv1, tv2, diff, tolerance)		\
-	tt_int_op(abs(timeval_msec_diff((tv1), (tv2)) - diff), =, tolerance)
+	tt_int_op(imaxabs(timeval_msec_diff((tv1), (tv2)) - diff), =, tolerance)
 
 #define test_timeval_diff_eq(tv1, tv2, diff)\
 	test_timeval_diff_leq((tv1), (tv2), (diff), 50)



CVS commit: src/external/bsd/libevent/dist

2015-01-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jan 30 00:07:06 UTC 2015

Modified Files:
src/external/bsd/libevent/dist: log.c

Log Message:
Add missing __printflike


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/log.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/log.c
diff -u src/external/bsd/libevent/dist/log.c:1.3 src/external/bsd/libevent/dist/log.c:1.4
--- src/external/bsd/libevent/dist/log.c:1.3	Thu Jan 29 07:26:02 2015
+++ src/external/bsd/libevent/dist/log.c	Fri Jan 30 00:07:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: log.c,v 1.3 2015/01/29 07:26:02 spz Exp $	*/
+/*	$NetBSD: log.c,v 1.4 2015/01/30 00:07:06 joerg Exp $	*/
 /*	$OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $	*/
 
 /*
@@ -40,7 +40,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: log.c,v 1.3 2015/01/29 07:26:02 spz Exp $);
+__RCSID($NetBSD: log.c,v 1.4 2015/01/30 00:07:06 joerg Exp $);
 
 #ifdef WIN32
 #include winsock2.h
@@ -60,7 +60,7 @@ __RCSID($NetBSD: log.c,v 1.3 2015/01/29
 #include log-internal.h
 
 static void _warn_helper(int severity, const char *errstr, const char *fmt,
-va_list ap);
+va_list ap) __printflike(3, 0);
 static void event_log(int severity, const char *msg);
 static void event_exit(int errcode) EV_NORETURN;
 



CVS commit: src/external/bsd/libevent/dist

2015-01-28 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Thu Jan 29 06:34:05 UTC 2015

Removed Files:
src/external/bsd/libevent/dist: URLs libevent-2.0.22-stable.tar.gz
libevent-2.0.22-stable.tar.gz.asc

Log Message:
eeep, that import went not as I had intended. Going to remove the rest
of the clutter from the repo


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/libevent/dist/URLs \
src/external/bsd/libevent/dist/libevent-2.0.22-stable.tar.gz \
src/external/bsd/libevent/dist/libevent-2.0.22-stable.tar.gz.asc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/libevent/dist/test

2014-02-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 27 18:11:04 UTC 2014

Modified Files:
src/external/bsd/libevent/dist/test: regress.h

Log Message:
time_t is larger than int, so don't use abs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/test/regress.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.h
diff -u src/external/bsd/libevent/dist/test/regress.h:1.2 src/external/bsd/libevent/dist/test/regress.h:1.3
--- src/external/bsd/libevent/dist/test/regress.h:1.2	Thu Apr 11 16:56:42 2013
+++ src/external/bsd/libevent/dist/test/regress.h	Thu Feb 27 18:11:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.h,v 1.2 2013/04/11 16:56:42 christos Exp $	*/
+/*	$NetBSD: regress.h,v 1.3 2014/02/27 18:11:04 joerg Exp $	*/
 /*
  * Copyright (c) 2000-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -112,7 +112,7 @@ int _test_ai_eq(const struct evutil_addr
 	} while (/*CONSTCOND*/0)
 
 #define test_timeval_diff_leq(tv1, tv2, diff, tolerance)		\
-	tt_int_op(abs(timeval_msec_diff((tv1), (tv2)) - diff), =, tolerance)
+	tt_int_op(imaxabs(timeval_msec_diff((tv1), (tv2)) - diff), =, tolerance)
 
 #define test_timeval_diff_eq(tv1, tv2, diff)\
 	test_timeval_diff_leq((tv1), (tv2), (diff), 50)



CVS commit: src/external/bsd/libevent/dist

2014-01-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jan  7 02:09:01 UTC 2014

Modified Files:
src/external/bsd/libevent/dist: log-internal.h log.c

Log Message:
Add format string checks for _warn_helper.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/log-internal.h
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/libevent/dist/log.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/log-internal.h
diff -u src/external/bsd/libevent/dist/log-internal.h:1.2 src/external/bsd/libevent/dist/log-internal.h:1.3
--- src/external/bsd/libevent/dist/log-internal.h:1.2	Thu Apr 11 16:56:41 2013
+++ src/external/bsd/libevent/dist/log-internal.h	Tue Jan  7 02:09:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: log-internal.h,v 1.2 2013/04/11 16:56:41 christos Exp $	*/
+/*	$NetBSD: log-internal.h,v 1.3 2014/01/07 02:09:01 joerg Exp $	*/
 /*
  * Copyright (c) 2000-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -31,7 +31,7 @@
 #include event2/util.h
 
 #ifdef __GNUC__
-#define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b)))
+#define EV_CHECK_FMT(a,b) __attribute__((__format__(__printf__, a, b)))
 #define EV_NORETURN __attribute__((noreturn))
 #else
 #define EV_CHECK_FMT(a,b)
@@ -55,6 +55,4 @@ void _event_debugx(const char *fmt, ...)
 #define event_debug(x) do {;} while (/*CONSTCOND*/0)
 #endif
 
-#undef EV_CHECK_FMT
-
 #endif

Index: src/external/bsd/libevent/dist/log.c
diff -u src/external/bsd/libevent/dist/log.c:1.1.1.2 src/external/bsd/libevent/dist/log.c:1.2
--- src/external/bsd/libevent/dist/log.c:1.1.1.2	Thu Apr 11 16:43:26 2013
+++ src/external/bsd/libevent/dist/log.c	Tue Jan  7 02:09:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: log.c,v 1.1.1.2 2013/04/11 16:43:26 christos Exp $	*/
+/*	$NetBSD: log.c,v 1.2 2014/01/07 02:09:01 joerg Exp $	*/
 /*	$OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $	*/
 
 /*
@@ -40,7 +40,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: log.c,v 1.1.1.2 2013/04/11 16:43:26 christos Exp $);
+__RCSID($NetBSD: log.c,v 1.2 2014/01/07 02:09:01 joerg Exp $);
 
 #ifdef WIN32
 #include winsock2.h
@@ -60,7 +60,7 @@ __RCSID($NetBSD: log.c,v 1.1.1.2 2013/0
 #include log-internal.h
 
 static void _warn_helper(int severity, const char *errstr, const char *fmt,
-va_list ap);
+va_list ap) EV_CHECK_FMT(3, 0);
 static void event_log(int severity, const char *msg);
 static void event_exit(int errcode) EV_NORETURN;
 



CVS commit: src/external/bsd/libevent/dist/test

2014-01-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jan  4 02:56:31 UTC 2014

Modified Files:
src/external/bsd/libevent/dist/test: regress_buffer.c

Log Message:
Fix memcmp use.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/test/regress_buffer.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_buffer.c
diff -u src/external/bsd/libevent/dist/test/regress_buffer.c:1.2 src/external/bsd/libevent/dist/test/regress_buffer.c:1.3
--- src/external/bsd/libevent/dist/test/regress_buffer.c:1.2	Thu Apr 11 16:56:42 2013
+++ src/external/bsd/libevent/dist/test/regress_buffer.c	Sat Jan  4 02:56:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_buffer.c,v 1.2 2013/04/11 16:56:42 christos Exp $	*/
+/*	$NetBSD: regress_buffer.c,v 1.3 2014/01/04 02:56:31 joerg Exp $	*/
 /*
  * Copyright (c) 2003-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -33,7 +33,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress_buffer.c,v 1.2 2013/04/11 16:56:42 christos Exp $);
+__RCSID($NetBSD: regress_buffer.c,v 1.3 2014/01/04 02:56:31 joerg Exp $);
 
 #include sys/types.h
 #include sys/stat.h
@@ -247,7 +247,7 @@ test_evbuffer(void *ptr)
 	if (memcmp(evbuffer_pullup(
 			   evb, -1), buffer, sizeof(buffer) / 2) != 0 ||
 	memcmp(evbuffer_pullup(
-			   evb_two, -1), buffer, sizeof(buffer) != 0))
+			   evb_two, -1), buffer, sizeof(buffer)) != 0)
 		tt_abort_msg(Pullup did not preserve content);
 
 	evbuffer_validate(evb);



CVS commit: src/external/bsd/libevent/dist/compat/sys

2013-11-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 21 19:12:40 UTC 2013

Removed Files:
src/external/bsd/libevent/dist/compat/sys: queue.h

Log Message:
delete copy of queue.h that we don't use.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/libevent/dist/compat/sys/queue.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/libevent/dist/test

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 12 17:50:27 UTC 2013

Modified Files:
src/external/bsd/libevent/dist/test: regress.c

Log Message:
remove bug we added.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/libevent/dist/test/regress.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.c
diff -u src/external/bsd/libevent/dist/test/regress.c:1.6 src/external/bsd/libevent/dist/test/regress.c:1.7
--- src/external/bsd/libevent/dist/test/regress.c:1.6	Thu Apr 11 16:14:44 2013
+++ src/external/bsd/libevent/dist/test/regress.c	Fri Apr 12 13:50:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.c,v 1.6 2013/04/11 20:14:44 christos Exp $	*/
+/*	$NetBSD: regress.c,v 1.7 2013/04/12 17:50:27 christos Exp $	*/
 /*
  * Copyright (c) 2003-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -33,7 +33,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress.c,v 1.6 2013/04/11 20:14:44 christos Exp $);
+__RCSID($NetBSD: regress.c,v 1.7 2013/04/12 17:50:27 christos Exp $);
 
 #include sys/types.h
 #include sys/stat.h
@@ -89,8 +89,6 @@ static struct timeval tset;
 static struct timeval tcalled;
 
 
-static int interval;
-
 #define TEST1	this is a test
 #define SECONDS	1
 
@@ -247,7 +245,7 @@ timeout_cb(evutil_socket_t fd, short eve
 	else
 		evutil_timersub(tset, tcalled, tv);
 
-	diff = tv.tv_sec*1000 + tv.tv_usec/1000 - interval;
+	diff = tv.tv_sec*1000 + tv.tv_usec/1000 - SECONDS * 1000;
 	if (diff  0)
 		diff = -diff;
 



CVS commit: src/external/bsd/libevent/dist

2013-04-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 12 18:11:15 UTC 2013

Modified Files:
src/external/bsd/libevent/dist: minheap-internal.h

Log Message:
Work correctly with ISO C99 compiler.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/libevent/dist/minheap-internal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/minheap-internal.h
diff -u src/external/bsd/libevent/dist/minheap-internal.h:1.1.1.1 src/external/bsd/libevent/dist/minheap-internal.h:1.2
--- src/external/bsd/libevent/dist/minheap-internal.h:1.1.1.1	Thu Apr 11 16:43:29 2013
+++ src/external/bsd/libevent/dist/minheap-internal.h	Fri Apr 12 18:11:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: minheap-internal.h,v 1.1.1.1 2013/04/11 16:43:29 christos Exp $	*/
+/*	$NetBSD: minheap-internal.h,v 1.2 2013/04/12 18:11:15 joerg Exp $	*/
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
  *
@@ -57,19 +57,19 @@ static inline int	 min_heap_erase(mi
 static inline void	 min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e);
 static inline void	 min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e);
 
-int min_heap_elem_greater(struct event *a, struct event *b)
+static inline int min_heap_elem_greater(struct event *a, struct event *b)
 {
 	return evutil_timercmp(a-ev_timeout, b-ev_timeout, );
 }
 
-void min_heap_ctor(min_heap_t* s) { s-p = 0; s-n = 0; s-a = 0; }
-void min_heap_dtor(min_heap_t* s) { if (s-p) mm_free(s-p); }
-void min_heap_elem_init(struct event* e) { e-ev_timeout_pos.min_heap_idx = -1; }
-int min_heap_empty(min_heap_t* s) { return 0u == s-n; }
-unsigned min_heap_size(min_heap_t* s) { return s-n; }
-struct event* min_heap_top(min_heap_t* s) { return s-n ? *s-p : 0; }
+static inline void min_heap_ctor(min_heap_t* s) { s-p = 0; s-n = 0; s-a = 0; }
+static inline void min_heap_dtor(min_heap_t* s) { if (s-p) mm_free(s-p); }
+static inline void min_heap_elem_init(struct event* e) { e-ev_timeout_pos.min_heap_idx = -1; }
+static inline int min_heap_empty(min_heap_t* s) { return 0u == s-n; }
+static inline unsigned min_heap_size(min_heap_t* s) { return s-n; }
+static inline struct event* min_heap_top(min_heap_t* s) { return s-n ? *s-p : 0; }
 
-int min_heap_push(min_heap_t* s, struct event* e)
+static inline int min_heap_push(min_heap_t* s, struct event* e)
 {
 	if (min_heap_reserve(s, s-n + 1))
 		return -1;
@@ -77,7 +77,7 @@ int min_heap_push(min_heap_t* s, struct 
 	return 0;
 }
 
-struct event* min_heap_pop(min_heap_t* s)
+static inline struct event* min_heap_pop(min_heap_t* s)
 {
 	if (s-n)
 	{
@@ -89,12 +89,12 @@ struct event* min_heap_pop(min_heap_t* s
 	return 0;
 }
 
-int min_heap_elt_is_top(const struct event *e)
+static inline int min_heap_elt_is_top(const struct event *e)
 {
 	return e-ev_timeout_pos.min_heap_idx == 0;
 }
 
-int min_heap_erase(min_heap_t* s, struct event* e)
+static inline int min_heap_erase(min_heap_t* s, struct event* e)
 {
 	if (-1 != e-ev_timeout_pos.min_heap_idx)
 	{
@@ -115,7 +115,7 @@ int min_heap_erase(min_heap_t* s, struct
 	return -1;
 }
 
-int min_heap_reserve(min_heap_t* s, unsigned n)
+static inline int min_heap_reserve(min_heap_t* s, unsigned n)
 {
 	if (s-a  n)
 	{
@@ -131,7 +131,7 @@ int min_heap_reserve(min_heap_t* s, unsi
 	return 0;
 }
 
-void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e)
+static inline void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e)
 {
 unsigned parent = (hole_index - 1) / 2;
 while (hole_index  min_heap_elem_greater(s-p[parent], e))
@@ -143,7 +143,7 @@ void min_heap_shift_up_(min_heap_t* s, u
 (s-p[hole_index] = e)-ev_timeout_pos.min_heap_idx = hole_index;
 }
 
-void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e)
+static inline void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e)
 {
 unsigned min_child = 2 * (hole_index + 1);
 while (min_child = s-n)



CVS commit: src/external/bsd/libevent/dist/test

2013-04-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 12 18:11:41 UTC 2013

Modified Files:
src/external/bsd/libevent/dist/test: tinytest_macros.h

Log Message:
Remove potentially extra consts.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/libevent/dist/test/tinytest_macros.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/tinytest_macros.h
diff -u src/external/bsd/libevent/dist/test/tinytest_macros.h:1.2 src/external/bsd/libevent/dist/test/tinytest_macros.h:1.3
--- src/external/bsd/libevent/dist/test/tinytest_macros.h:1.2	Thu Apr 11 16:56:42 2013
+++ src/external/bsd/libevent/dist/test/tinytest_macros.h	Fri Apr 12 18:11:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: tinytest_macros.h,v 1.2 2013/04/11 16:56:42 christos Exp $	*/
+/*	$NetBSD: tinytest_macros.h,v 1.3 2013/04/12 18:11:40 joerg Exp $	*/
 /* tinytest_macros.h -- Copyright 2009-2012 Nick Mathewson
  *
  * Redistribution and use in source and binary forms, with or without
@@ -114,8 +114,8 @@
 #define tt_assert_test_fmt_type(a,b,str_test,type,test,printf_type,printf_fmt, \
 setup_block,cleanup_block,die_on_fail)\
 	TT_STMT_BEGIN			\
-	const type _val1 = (const type)(a);\
-	const type _val2 = (const type)(b);\
+	type _val1 = (type)(a);		\
+	type _val2 = (type)(b);		\
 	int _tt_status = (test);	\
 	if (!_tt_status || _tinytest_get_verbosity()1)	{		\
 		printf_type _print;	\



CVS commit: src/external/bsd/libevent/dist

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 12 19:41:46 UTC 2013

Modified Files:
src/external/bsd/libevent/dist: evutil.c

Log Message:
connect(2) returns EINPROGRESS for 239.10.20.30 which is supposed to
be an unroutable address. getsockopt() to find the actual error returns
0. This is prolly broken, but this temporary work-around fixes the regression
test.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/evutil.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/evutil.c
diff -u src/external/bsd/libevent/dist/evutil.c:1.2 src/external/bsd/libevent/dist/evutil.c:1.3
--- src/external/bsd/libevent/dist/evutil.c:1.2	Thu Apr 11 12:56:41 2013
+++ src/external/bsd/libevent/dist/evutil.c	Fri Apr 12 15:41:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: evutil.c,v 1.2 2013/04/11 16:56:41 christos Exp $	*/
+/*	$NetBSD: evutil.c,v 1.3 2013/04/12 19:41:45 christos Exp $	*/
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
  *
@@ -27,7 +27,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: evutil.c,v 1.2 2013/04/11 16:56:41 christos Exp $);
+__RCSID($NetBSD: evutil.c,v 1.3 2013/04/12 19:41:45 christos Exp $);
 
 #define _GNU_SOURCE
 
@@ -483,6 +483,15 @@ evutil_socket_connect(evutil_socket_t *f
 
 	if (connect(*fd_ptr, sa, socklen)  0) {
 		int e = evutil_socket_geterror(*fd_ptr);
+#ifdef __NetBSD__
+		if (e == EINPROGRESS) {
+			socklen_t l = sizeof(e);
+			l = sizeof(e);
+			if (getsockopt(*fd_ptr, SOL_SOCKET, SO_ERROR,
+			(void*)e, l) == -1)
+abort();
+		}
+#endif
 		if (EVUTIL_ERR_CONNECT_RETRIABLE(e))
 			return 0;
 		if (EVUTIL_ERR_CONNECT_REFUSED(e))



CVS commit: src/external/bsd/libevent/dist/test

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 12 19:59:26 UTC 2013

Modified Files:
src/external/bsd/libevent/dist/test: regress_thread.c

Log Message:
XXX: disable the simple conditions test right now because it depends on
thread scheduling timings and we don't seem to schedule threads the way
it assumes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/test/regress_thread.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_thread.c
diff -u src/external/bsd/libevent/dist/test/regress_thread.c:1.2 src/external/bsd/libevent/dist/test/regress_thread.c:1.3
--- src/external/bsd/libevent/dist/test/regress_thread.c:1.2	Thu Apr 11 12:56:42 2013
+++ src/external/bsd/libevent/dist/test/regress_thread.c	Fri Apr 12 15:59:26 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_thread.c,v 1.2 2013/04/11 16:56:42 christos Exp $	*/
+/*	$NetBSD: regress_thread.c,v 1.3 2013/04/12 19:59:26 christos Exp $	*/
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
  *
@@ -30,7 +30,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress_thread.c,v 1.2 2013/04/11 16:56:42 christos Exp $);
+__RCSID($NetBSD: regress_thread.c,v 1.3 2013/04/12 19:59:26 christos Exp $);
 
 #include sys/types.h
 #include stdio.h
@@ -304,6 +304,7 @@ wait_for_condition(void *arg)
 	THREAD_RETURN();
 }
 
+#if 0
 static void
 thread_conditions_simple(void *arg)
 {
@@ -394,7 +395,7 @@ thread_conditions_simple(void *arg)
 		}
 		evutil_timeradd(target_delay, launched_at, target_time);
 		test_timeval_diff_leq(target_time, alerted[i].alerted_at,
-		0, 50);
+		0, 150);
 	}
 	tt_int_op(n_broadcast + n_signal + n_timed_out, ==, NUM_THREADS);
 	tt_int_op(n_signal, ==, 1);
@@ -402,6 +403,7 @@ thread_conditions_simple(void *arg)
 end:
 	;
 }
+#endif
 
 #define CB_COUNT 128
 #define QUEUE_THREAD_COUNT 8
@@ -507,7 +509,9 @@ struct testcase_t thread_testcases[] = {
 	{ forking, thread_basic, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE,
 	  basic_setup, __UNCONST(forking) },
 #endif
+#if 0
 	TEST(conditions_simple),
+#endif
 	TEST(deferred_cb_skew),
 	END_OF_TESTCASES
 };



CVS commit: src/external/bsd/libevent/dist/test

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 12 20:00:22 UTC 2013

Modified Files:
src/external/bsd/libevent/dist/test: regress_thread.c

Log Message:
#if 0 more


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/test/regress_thread.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_thread.c
diff -u src/external/bsd/libevent/dist/test/regress_thread.c:1.3 src/external/bsd/libevent/dist/test/regress_thread.c:1.4
--- src/external/bsd/libevent/dist/test/regress_thread.c:1.3	Fri Apr 12 15:59:26 2013
+++ src/external/bsd/libevent/dist/test/regress_thread.c	Fri Apr 12 16:00:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_thread.c,v 1.3 2013/04/12 19:59:26 christos Exp $	*/
+/*	$NetBSD: regress_thread.c,v 1.4 2013/04/12 20:00:21 christos Exp $	*/
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
  *
@@ -30,7 +30,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress_thread.c,v 1.3 2013/04/12 19:59:26 christos Exp $);
+__RCSID($NetBSD: regress_thread.c,v 1.4 2013/04/12 20:00:21 christos Exp $);
 
 #include sys/types.h
 #include stdio.h
@@ -99,6 +99,7 @@ wake_all_timeout(evutil_socket_t fd, sho
 
 }
 
+#if 0
 static void
 wake_one_timeout(evutil_socket_t fd, short what, void *arg)
 {
@@ -107,6 +108,7 @@ wake_one_timeout(evutil_socket_t fd, sho
 	EVTHREAD_COND_SIGNAL(cw-cond);
 	EVLOCK_UNLOCK(cw-lock, 0);
 }
+#endif
 
 #define NUM_THREADS	100
 #define NUM_ITERATIONS  100
@@ -282,6 +284,7 @@ struct alerted_record {
 	int timed_out;
 };
 
+#if 0
 static THREAD_FN
 wait_for_condition(void *arg)
 {
@@ -304,7 +307,6 @@ wait_for_condition(void *arg)
 	THREAD_RETURN();
 }
 
-#if 0
 static void
 thread_conditions_simple(void *arg)
 {



CVS commit: src/external/bsd/libevent/dist

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 12 20:02:00 UTC 2013

Modified Files:
src/external/bsd/libevent/dist: evutil.c

Log Message:
undo previous, breaks differently when testing for EINPROGRESS.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/evutil.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/evutil.c
diff -u src/external/bsd/libevent/dist/evutil.c:1.3 src/external/bsd/libevent/dist/evutil.c:1.4
--- src/external/bsd/libevent/dist/evutil.c:1.3	Fri Apr 12 15:41:45 2013
+++ src/external/bsd/libevent/dist/evutil.c	Fri Apr 12 16:02:00 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: evutil.c,v 1.3 2013/04/12 19:41:45 christos Exp $	*/
+/*	$NetBSD: evutil.c,v 1.4 2013/04/12 20:02:00 christos Exp $	*/
 /*
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
  *
@@ -27,7 +27,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: evutil.c,v 1.3 2013/04/12 19:41:45 christos Exp $);
+__RCSID($NetBSD: evutil.c,v 1.4 2013/04/12 20:02:00 christos Exp $);
 
 #define _GNU_SOURCE
 
@@ -483,15 +483,6 @@ evutil_socket_connect(evutil_socket_t *f
 
 	if (connect(*fd_ptr, sa, socklen)  0) {
 		int e = evutil_socket_geterror(*fd_ptr);
-#ifdef __NetBSD__
-		if (e == EINPROGRESS) {
-			socklen_t l = sizeof(e);
-			l = sizeof(e);
-			if (getsockopt(*fd_ptr, SOL_SOCKET, SO_ERROR,
-			(void*)e, l) == -1)
-abort();
-		}
-#endif
 		if (EVUTIL_ERR_CONNECT_RETRIABLE(e))
 			return 0;
 		if (EVUTIL_ERR_CONNECT_REFUSED(e))



CVS commit: src/external/bsd/libevent/dist/test

2013-04-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 12 21:49:54 UTC 2013

Modified Files:
src/external/bsd/libevent/dist/test: regress_rpc.c

Log Message:
missed one xkill in the rename


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/test/regress_rpc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_rpc.c
diff -u src/external/bsd/libevent/dist/test/regress_rpc.c:1.2 src/external/bsd/libevent/dist/test/regress_rpc.c:1.3
--- src/external/bsd/libevent/dist/test/regress_rpc.c:1.2	Thu Apr 11 12:56:42 2013
+++ src/external/bsd/libevent/dist/test/regress_rpc.c	Fri Apr 12 17:49:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_rpc.c,v 1.2 2013/04/11 16:56:42 christos Exp $	*/
+/*	$NetBSD: regress_rpc.c,v 1.3 2013/04/12 21:49:54 christos Exp $	*/
 /*
  * Copyright (c) 2003-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -36,7 +36,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress_rpc.c,v 1.2 2013/04/11 16:56:42 christos Exp $);
+__RCSID($NetBSD: regress_rpc.c,v 1.3 2013/04/12 21:49:54 christos Exp $);
 
 #include sys/types.h
 #include sys/stat.h
@@ -500,7 +500,7 @@ rpc_basic_client(void)
 	{
 		struct evrpc_request_wrapper *ctx =
 		EVRPC_MAKE_CTX(Message, msg, kill,
-			pool, msg, kill, GotKillCb, NULL);
+			pool, msg, xkill, GotKillCb, NULL);
 		evrpc_make_request(ctx);
 	}
 



CVS commit: src/external/bsd/libevent/dist

2013-04-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 11 16:43:36 UTC 2013

Update of /cvsroot/src/external/bsd/libevent/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv12904

Log Message:
import libevent 2.x

Status:

Vendor Tag: LIBEVENT
Release Tags:   libevent-2-0-21-stable

N src/external/bsd/libevent/dist/Makefile.in
N src/external/bsd/libevent/dist/evmap-internal.h
N src/external/bsd/libevent/dist/event_iocp.c
N src/external/bsd/libevent/dist/win32select.c
N src/external/bsd/libevent/dist/configure.in
N src/external/bsd/libevent/dist/epoll.c
U src/external/bsd/libevent/dist/evrpc-internal.h
N src/external/bsd/libevent/dist/autogen.sh
U src/external/bsd/libevent/dist/event.h
N src/external/bsd/libevent/dist/evutil_rand.c
U src/external/bsd/libevent/dist/event.c
N src/external/bsd/libevent/dist/libevent_openssl.pc.in
N src/external/bsd/libevent/dist/Makefile.nmake
N src/external/bsd/libevent/dist/evmap.c
N src/external/bsd/libevent/dist/make-event-config.sed
N src/external/bsd/libevent/dist/ratelim-internal.h
N src/external/bsd/libevent/dist/log-internal.h
N src/external/bsd/libevent/dist/util-internal.h
U src/external/bsd/libevent/dist/evdns.c
N src/external/bsd/libevent/dist/evthread-internal.h
N src/external/bsd/libevent/dist/defer-internal.h
N src/external/bsd/libevent/dist/libevent.pc.in
N src/external/bsd/libevent/dist/strlcpy.c
N src/external/bsd/libevent/dist/arc4random.c
U src/external/bsd/libevent/dist/event_tagging.c
U src/external/bsd/libevent/dist/select.c
N src/external/bsd/libevent/dist/configure
U src/external/bsd/libevent/dist/kqueue.c
N src/external/bsd/libevent/dist/depcomp
N src/external/bsd/libevent/dist/missing
U src/external/bsd/libevent/dist/http-internal.h
N src/external/bsd/libevent/dist/devpoll.c
N src/external/bsd/libevent/dist/bufferevent_ratelim.c
N src/external/bsd/libevent/dist/bufferevent_sock.c
N src/external/bsd/libevent/dist/whatsnew-2.0.txt
N src/external/bsd/libevent/dist/config.sub
N src/external/bsd/libevent/dist/buffer_iocp.c
N src/external/bsd/libevent/dist/evthread_pthread.c
U src/external/bsd/libevent/dist/evutil.c
N src/external/bsd/libevent/dist/evthread.c
U src/external/bsd/libevent/dist/signal.c
N src/external/bsd/libevent/dist/bufferevent.c
N src/external/bsd/libevent/dist/bufferevent_openssl.c
U src/external/bsd/libevent/dist/strlcpy-internal.h
U src/external/bsd/libevent/dist/README
N src/external/bsd/libevent/dist/mm-internal.h
U src/external/bsd/libevent/dist/event-internal.h
N src/external/bsd/libevent/dist/install-sh
N src/external/bsd/libevent/dist/evport.c
N src/external/bsd/libevent/dist/config.guess
N src/external/bsd/libevent/dist/Doxyfile
N src/external/bsd/libevent/dist/ht-internal.h
U src/external/bsd/libevent/dist/log.c
N src/external/bsd/libevent/dist/epoll_sub.c
N src/external/bsd/libevent/dist/listener.c
U src/external/bsd/libevent/dist/evrpc.c
N src/external/bsd/libevent/dist/bufferevent_filter.c
N src/external/bsd/libevent/dist/evsignal-internal.h
N src/external/bsd/libevent/dist/evthread_win32.c
N src/external/bsd/libevent/dist/bufferevent_pair.c
U src/external/bsd/libevent/dist/poll.c
N src/external/bsd/libevent/dist/config.h.in
N src/external/bsd/libevent/dist/evbuffer-internal.h
N src/external/bsd/libevent/dist/compile
N src/external/bsd/libevent/dist/ltmain.sh
U src/external/bsd/libevent/dist/buffer.c
N src/external/bsd/libevent/dist/bufferevent_async.c
U src/external/bsd/libevent/dist/ChangeLog
U src/external/bsd/libevent/dist/evdns.h
N src/external/bsd/libevent/dist/LICENSE
N src/external/bsd/libevent/dist/ipv6-internal.h
U src/external/bsd/libevent/dist/http.c
N src/external/bsd/libevent/dist/libevent_pthreads.pc.in
N src/external/bsd/libevent/dist/aclocal.m4
U src/external/bsd/libevent/dist/evutil.h
N src/external/bsd/libevent/dist/minheap-internal.h
U src/external/bsd/libevent/dist/evrpc.h
N src/external/bsd/libevent/dist/bufferevent-internal.h
N src/external/bsd/libevent/dist/iocp-internal.h
U src/external/bsd/libevent/dist/evhttp.h
N src/external/bsd/libevent/dist/event_rpcgen.py
N src/external/bsd/libevent/dist/changelist-internal.h
N src/external/bsd/libevent/dist/Makefile.am
N src/external/bsd/libevent/dist/m4/acx_pthread.m4
N src/external/bsd/libevent/dist/m4/ltsugar.m4
N src/external/bsd/libevent/dist/m4/lt~obsolete.m4
N src/external/bsd/libevent/dist/m4/ltoptions.m4
N src/external/bsd/libevent/dist/m4/ltversion.m4
N src/external/bsd/libevent/dist/m4/libtool.m4
N src/external/bsd/libevent/dist/sample/signal-test.c
N src/external/bsd/libevent/dist/sample/event-test.c
N src/external/bsd/libevent/dist/sample/dns-example.c
N src/external/bsd/libevent/dist/sample/Makefile.in
N src/external/bsd/libevent/dist/sample/http-server.c
N src/external/bsd/libevent/dist/sample/time-test.c
N src/external/bsd/libevent/dist/sample/hello-world.c
N src/external/bsd/libevent/dist/sample/le-proxy.c
N src/external/bsd/libevent/dist/sample/Makefile.am
C src/external/bsd/libevent/dist/test/regress_dns.c

CVS commit: src/external/bsd/libevent/dist/test

2013-04-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr 11 20:14:44 UTC 2013

Modified Files:
src/external/bsd/libevent/dist/test: regress.c regress_dns.c

Log Message:
fix merge that broke the tests


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/test/regress.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/test/regress_dns.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.c
diff -u src/external/bsd/libevent/dist/test/regress.c:1.5 src/external/bsd/libevent/dist/test/regress.c:1.6
--- src/external/bsd/libevent/dist/test/regress.c:1.5	Thu Apr 11 12:56:42 2013
+++ src/external/bsd/libevent/dist/test/regress.c	Thu Apr 11 16:14:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.c,v 1.5 2013/04/11 16:56:42 christos Exp $	*/
+/*	$NetBSD: regress.c,v 1.6 2013/04/11 20:14:44 christos Exp $	*/
 /*
  * Copyright (c) 2003-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -33,7 +33,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress.c,v 1.5 2013/04/11 16:56:42 christos Exp $);
+__RCSID($NetBSD: regress.c,v 1.6 2013/04/11 20:14:44 christos Exp $);
 
 #include sys/types.h
 #include sys/stat.h
@@ -580,7 +580,6 @@ end:
 	cleanup_test();
 }
 
-#if 0
 static void
 test_simpletimeout(void)
 {
@@ -599,7 +598,6 @@ test_simpletimeout(void)
 
 	cleanup_test();
 }
-#endif
 
 static void
 periodic_timeout_cb(evutil_socket_t fd, short event, void *arg)

Index: src/external/bsd/libevent/dist/test/regress_dns.c
diff -u src/external/bsd/libevent/dist/test/regress_dns.c:1.3 src/external/bsd/libevent/dist/test/regress_dns.c:1.4
--- src/external/bsd/libevent/dist/test/regress_dns.c:1.3	Thu Apr 11 12:56:42 2013
+++ src/external/bsd/libevent/dist/test/regress_dns.c	Thu Apr 11 16:14:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_dns.c,v 1.3 2013/04/11 16:56:42 christos Exp $	*/
+/*	$NetBSD: regress_dns.c,v 1.4 2013/04/11 20:14:44 christos Exp $	*/
 /*
  * Copyright (c) 2003-2007 Niels Provos pro...@citi.umich.edu
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -34,7 +34,7 @@
 
 #include event2/event-config.h
 #include sys/cdefs.h
-__RCSID($NetBSD: regress_dns.c,v 1.3 2013/04/11 16:56:42 christos Exp $);
+__RCSID($NetBSD: regress_dns.c,v 1.4 2013/04/11 20:14:44 christos Exp $);
 
 #include sys/types.h
 #include sys/stat.h
@@ -79,10 +79,8 @@ __RCSID($NetBSD: regress_dns.c,v 1.3 20
 static int dns_ok = 0;
 static int dns_got_cancel = 0;
 static int dns_err = 0;
-#endif
 
 
-#if 0
 static void
 dns_gethostbyname_cb(int result, char type, int count, int ttl,
 void *addresses, void *arg)
@@ -223,7 +221,6 @@ end:
 	if (base)
 		event_base_free(base);
 }
-#endif
 
 static int n_server_responses = 0;
 



CVS commit: src/external/bsd/libevent/dist/test

2012-03-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Mar 11 19:03:34 UTC 2012

Modified Files:
src/external/bsd/libevent/dist/test: regress.c

Log Message:
Skip the simple timeout test. This test case is known to fail rather
consistently when run in emulated environments such as Qemu.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/test/regress.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.c
diff -u src/external/bsd/libevent/dist/test/regress.c:1.2 src/external/bsd/libevent/dist/test/regress.c:1.3
--- src/external/bsd/libevent/dist/test/regress.c:1.2	Thu Nov 11 14:11:26 2010
+++ src/external/bsd/libevent/dist/test/regress.c	Sun Mar 11 19:03:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.c,v 1.2 2010/11/11 14:11:26 pgoyette Exp $	*/
+/*	$NetBSD: regress.c,v 1.3 2012/03/11 19:03:33 jruoho Exp $	*/
 /*
  * Copyright (c) 2003, 2004 Niels Provos pro...@citi.umich.edu
  * All rights reserved.
@@ -1699,7 +1699,10 @@ main (int argc, char **argv)
 
 	test_combined();
 
+#if 0
 	test_simpletimeout();
+#endif
+
 #ifndef WIN32
 	test_simplesignal();
 	test_multiplesignal();



CVS commit: src/external/bsd/libevent/dist/test

2012-03-11 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Mon Mar 12 02:18:50 UTC 2012

Modified Files:
src/external/bsd/libevent/dist/test: regress.c

Log Message:
Fix build failure caused by previous change.  Hi jruoho!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libevent/dist/test/regress.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.c
diff -u src/external/bsd/libevent/dist/test/regress.c:1.3 src/external/bsd/libevent/dist/test/regress.c:1.4
--- src/external/bsd/libevent/dist/test/regress.c:1.3	Sun Mar 11 19:03:33 2012
+++ src/external/bsd/libevent/dist/test/regress.c	Mon Mar 12 02:18:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.c,v 1.3 2012/03/11 19:03:33 jruoho Exp $	*/
+/*	$NetBSD: regress.c,v 1.4 2012/03/12 02:18:49 jnemeth Exp $	*/
 /*
  * Copyright (c) 2003, 2004 Niels Provos pro...@citi.umich.edu
  * All rights reserved.
@@ -514,6 +514,7 @@ test_combined(void)
 	cleanup_test();
 }
 
+#if 0
 static void
 test_simpletimeout(void)
 {
@@ -532,6 +533,7 @@ test_simpletimeout(void)
 
 	cleanup_test();
 }
+#endif
 
 #ifndef WIN32
 extern struct event_base *current_base;



CVS commit: src/external/bsd/libevent/dist

2011-09-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Sep 16 16:09:03 UTC 2011

Modified Files:
src/external/bsd/libevent/dist: log.h

Log Message:
Use __dead


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libevent/dist/log.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/log.h
diff -u src/external/bsd/libevent/dist/log.h:1.1.1.1 src/external/bsd/libevent/dist/log.h:1.2
--- src/external/bsd/libevent/dist/log.h:1.1.1.1	Mon Nov  2 10:01:01 2009
+++ src/external/bsd/libevent/dist/log.h	Fri Sep 16 16:09:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: log.h,v 1.1.1.1 2009/11/02 10:01:01 plunky Exp $	*/
+/*	$NetBSD: log.h,v 1.2 2011/09/16 16:09:03 joerg Exp $	*/
 /*
  * Copyright (c) 2000-2004 Niels Provos pro...@citi.umich.edu
  * All rights reserved.
@@ -34,9 +34,9 @@
 #define EV_CHECK_FMT(a,b)
 #endif
 
-void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3);
+__dead void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3);
 void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2);
-void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3);
+__dead void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3);
 void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2);
 void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2);
 void _event_debugx(const char *fmt, ...) EV_CHECK_FMT(1,2);



CVS commit: src/external/bsd/libevent/dist/test

2010-11-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Nov 11 14:11:26 UTC 2010

Modified Files:
src/external/bsd/libevent/dist/test: regress.c

Log Message:
Calibrate the amount of time that a sleep() requires, and use that
interval instead of assuming that there are exactly 1000 real-time-clock
milliseconds per second!  On some ports when running under qemu, there
can be twice as many RTC milliseconds as expected.

This is part 2 of the changes required to make the libevent tests work
on port-amd64 under qemu.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libevent/dist/test/regress.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress.c
diff -u src/external/bsd/libevent/dist/test/regress.c:1.1.1.1 src/external/bsd/libevent/dist/test/regress.c:1.2
--- src/external/bsd/libevent/dist/test/regress.c:1.1.1.1	Mon Nov  2 10:01:03 2009
+++ src/external/bsd/libevent/dist/test/regress.c	Thu Nov 11 14:11:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress.c,v 1.1.1.1 2009/11/02 10:01:03 plunky Exp $	*/
+/*	$NetBSD: regress.c,v 1.2 2010/11/11 14:11:26 pgoyette Exp $	*/
 /*
  * Copyright (c) 2003, 2004 Niels Provos pro...@citi.umich.edu
  * All rights reserved.
@@ -78,6 +78,8 @@
 static struct timeval tcalled;
 static struct event_base *global_base;
 
+static int interval;
+
 #define TEST1	this is a test
 #define SECONDS	1
 
@@ -183,6 +185,27 @@
 }
 
 static void
+calibrate(void)
+{
+	struct timeval start, end, diff;
+	int delta;
+
+	gettimeofday(start, NULL);
+	sleep(SECONDS);
+	gettimeofday(end, NULL);
+
+	timersub(end, start, diff);
+
+	delta = diff.tv_sec * 1000 + diff.tv_usec / 1000;
+	if (delta  0)
+		delta = -delta;
+
+	interval = delta;
+	fprintf(stdout, Calibrated interval: %d sec = %d msec\n, SECONDS,
+		interval);
+}
+
+static void
 timeout_cb(int fd, short event, void *arg)
 {
 	struct timeval tv;
@@ -194,7 +217,7 @@
 	else
 		evutil_timersub(tset, tcalled, tv);
 
-	diff = tv.tv_sec*1000 + tv.tv_usec/1000 - SECONDS * 1000;
+	diff = tv.tv_sec*1000 + tv.tv_usec/1000 - interval;
 	if (diff  0)
 		diff = -diff;
 
@@ -924,7 +947,7 @@
 	evtimer_add(ev, tv);
 
 	tv.tv_usec = 0;
-	tv.tv_sec = 1;
+	tv.tv_sec = SECONDS;
 	event_loopexit(tv);
 
 	evutil_gettimeofday(tv_start, NULL);
@@ -1625,6 +1648,11 @@
 	if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
 		return (1);
 #endif
+	/*
+	 * Calibrate sleep() vs elapsed real-time
+	 */
+	calibrate();
+
 	setvbuf(stdout, NULL, _IONBF, 0);
 
 	/* Initalize the event library */



CVS commit: src/external/bsd/libevent/dist/test

2010-06-03 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Jun  3 07:08:41 UTC 2010

Modified Files:
src/external/bsd/libevent/dist/test: regress_dns.c

Log Message:
disable the DNS tests which rely on external hosts, as
they are not useful with automated testing systems without
internet connectivity.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/libevent/dist/test/regress_dns.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/test/regress_dns.c
diff -u src/external/bsd/libevent/dist/test/regress_dns.c:1.1.1.1 src/external/bsd/libevent/dist/test/regress_dns.c:1.2
--- src/external/bsd/libevent/dist/test/regress_dns.c:1.1.1.1	Mon Nov  2 10:01:03 2009
+++ src/external/bsd/libevent/dist/test/regress_dns.c	Thu Jun  3 07:08:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: regress_dns.c,v 1.1.1.1 2009/11/02 10:01:03 plunky Exp $	*/
+/*	$NetBSD: regress_dns.c,v 1.2 2010/06/03 07:08:41 plunky Exp $	*/
 /*
  * Copyright (c) 2003-2006 Niels Provos pro...@citi.umich.edu
  * All rights reserved.
@@ -65,10 +65,13 @@
 #include log.h
 
 static int dns_ok = 0;
+#if 0
 static int dns_err = 0;
+#endif
 
 void dns_suite(void);
 
+#if 0
 static void
 dns_gethostbyname_cb(int result, char type, int count, int ttl,
 void *addresses, void *arg)
@@ -185,6 +188,7 @@
 		exit(1);
 	}
 }
+#endif
 
 static int n_server_responses = 0;
 
@@ -368,10 +372,12 @@
 {
 	dns_server(); /* Do this before we call evdns_init. */
 
+#if 0
 	evdns_init();
 	dns_gethostbyname();
 	dns_gethostbyname6();
 	dns_gethostbyaddr();
 
 	evdns_shutdown(0);
+#endif
 }



CVS commit: src/external/bsd/libevent/dist

2010-05-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 14 03:02:13 UTC 2010

Modified Files:
src/external/bsd/libevent/dist: evdns.3

Log Message:
Proper markup for example. Use  include style. Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libevent/dist/evdns.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libevent/dist/evdns.3
diff -u src/external/bsd/libevent/dist/evdns.3:1.1.1.1 src/external/bsd/libevent/dist/evdns.3:1.2
--- src/external/bsd/libevent/dist/evdns.3:1.1.1.1	Mon Nov  2 10:00:53 2009
+++ src/external/bsd/libevent/dist/evdns.3	Fri May 14 03:02:13 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: evdns.3,v 1.1.1.1 2009/11/02 10:00:53 plunky Exp $
+.\	$NetBSD: evdns.3,v 1.2 2010/05/14 03:02:13 joerg Exp $
 .\
 .\
 .\ Copyright (c) 2006 Niels Provos pro...@citi.umich.edu
@@ -27,7 +27,7 @@
 .\ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 .\ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 7, 2006
+.Dd May 14, 2010
 .Dt EVDNS 3
 .Os
 .Sh NAME
@@ -125,11 +125,13 @@
 them when they go down. Otherwise it will round robin between them.
 .Pp
 Quick start guide:
-  #include evdns.h
-  void callback(int result, char type, int count, int ttl,
+.Bd -literal -offset indent
+#include \*[Lt]evdns.h\*[Gt]
+void callback(int result, char type, int count, int ttl,
 	 void *addresses, void *arg);
-  evdns_resolv_conf_parse(DNS_OPTIONS_ALL, /etc/resolv.conf);
-  evdns_resolve(www.hostname.com, 0, callback, NULL);
+evdns_resolv_conf_parse(DNS_OPTIONS_ALL, /etc/resolv.conf);
+evdns_resolve(www.hostname.com, 0, callback, NULL);
+.Ed
 .Pp
 When the lookup is complete the callback function is called. The
 first argument will be one of the DNS_ERR_* defines in evdns.h.



CVS commit: src/external/bsd/libevent/dist

2009-11-02 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Mon Nov  2 10:01:04 UTC 2009

Update of /cvsroot/src/external/bsd/libevent/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13221

Log Message:
libevent 1.4.12-stable

Status:

Vendor Tag: LIBEVENT
Release Tags:   libevent-1-4-12-stable

N src/external/bsd/libevent/dist/buffer.c
N src/external/bsd/libevent/dist/ChangeLog
N src/external/bsd/libevent/dist/event-internal.h
N src/external/bsd/libevent/dist/evbuffer.c
N src/external/bsd/libevent/dist/evdns.3
N src/external/bsd/libevent/dist/evdns.c
N src/external/bsd/libevent/dist/evdns.h
N src/external/bsd/libevent/dist/select.c
N src/external/bsd/libevent/dist/event.3
N src/external/bsd/libevent/dist/event.c
N src/external/bsd/libevent/dist/event.h
N src/external/bsd/libevent/dist/event_tagging.c
N src/external/bsd/libevent/dist/evhttp.h
N src/external/bsd/libevent/dist/evrpc-internal.h
N src/external/bsd/libevent/dist/evrpc.c
N src/external/bsd/libevent/dist/evrpc.h
N src/external/bsd/libevent/dist/evsignal.h
N src/external/bsd/libevent/dist/evutil.c
N src/external/bsd/libevent/dist/evutil.h
N src/external/bsd/libevent/dist/http-internal.h
N src/external/bsd/libevent/dist/http.c
N src/external/bsd/libevent/dist/kqueue.c
N src/external/bsd/libevent/dist/log.c
N src/external/bsd/libevent/dist/log.h
N src/external/bsd/libevent/dist/poll.c
N src/external/bsd/libevent/dist/min_heap.h
N src/external/bsd/libevent/dist/README
N src/external/bsd/libevent/dist/signal.c
N src/external/bsd/libevent/dist/strlcpy-internal.h
N src/external/bsd/libevent/dist/test/regress.gen.c
N src/external/bsd/libevent/dist/test/regress.c
N src/external/bsd/libevent/dist/test/regress.gen.h
N src/external/bsd/libevent/dist/test/regress.h
N src/external/bsd/libevent/dist/test/regress_dns.c
N src/external/bsd/libevent/dist/test/regress_http.c
N src/external/bsd/libevent/dist/test/regress_rpc.c

No conflicts created by this import