--- /usr/src/lib/libc/include/isc/assertions.h 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/include/isc/assertions.h 2008-11-13 20:36:51.000000000 -0600 @@ -1,5 +1,3 @@ -/* $NetBSD: assertions.h,v 1.5 2009/04/12 17:07:16 christos Exp $ */ - /* * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1997-2001 Internet Software Consortium. @@ -18,7 +16,7 @@ */ /* - * Id: assertions.h,v 1.5 2008/11/14 02:36:51 marka Exp + * $Id: assertions.h,v 1.5 2008/11/14 02:36:51 marka Exp $ */ #ifndef ASSERTIONS_H @@ -50,7 +48,6 @@ #define CHECK_INVARIANT 0 #endif -#ifdef _DIAGNOSTIC #ifndef CHECK_REQUIRE #define CHECK_REQUIRE 1 #endif @@ -66,7 +63,6 @@ #ifndef CHECK_INVARIANT #define CHECK_INVARIANT 1 #endif -#endif /* _DIAGNOSTIC */ #if CHECK_REQUIRE != 0 #define REQUIRE(cond) \ @@ -106,13 +102,8 @@ ((__assertion_failed)(__FILE__, __LINE__, assert_insist, \ #cond, 1), 0))) #else -#if !defined(__lint__) #define INSIST(cond) ((void) (cond)) #define INSIST_ERR(cond) ((void) (cond)) -#else /* !__lint__ */ -#define INSIST(cond) -#define INSIST_ERR(cond) -#endif /* !__lint__ */ #endif /* CHECK_INSIST */ #if CHECK_INVARIANT != 0 --- /usr/src/lib/libc/include/isc/dst.h 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/include/isc/dst.h 2005-04-26 23:56:17.000000000 -0500 @@ -1,5 +1,3 @@ -/* $NetBSD: dst.h,v 1.1.1.4 2009/04/12 16:35:44 christos Exp $ */ - #ifndef DST_H #define DST_H --- /usr/src/lib/libc/include/isc/list.h 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/include/isc/list.h 2009-01-29 12:26:42.000000000 -0600 @@ -1,5 +1,3 @@ -/* $NetBSD: list.h,v 1.5 2009/04/12 17:07:16 christos Exp $ */ - /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1997,1999 by Internet Software Consortium. @@ -23,14 +21,14 @@ #define LIST(type) struct { type *head, *tail; } #define INIT_LIST(list) \ - do { (list).head = NULL; (list).tail = NULL; } while (/*CONSTCOND*/0) + do { (list).head = NULL; (list).tail = NULL; } while (0) #define LINK(type) struct { type *prev, *next; } #define INIT_LINK_TYPE(elt, link, type) \ do { \ (elt)->link.prev = (type *)(-1); \ (elt)->link.next = (type *)(-1); \ - } while (/*CONSTCOND*/0) + } while (0) #define INIT_LINK(elt, link) \ INIT_LINK_TYPE(elt, link, void) #define LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1) && \ @@ -50,7 +48,7 @@ (elt)->link.prev = NULL; \ (elt)->link.next = (list).head; \ (list).head = (elt); \ - } while (/*CONSTCOND*/0) + } while (0) #define APPEND(list, elt, link) \ do { \ @@ -62,7 +60,7 @@ (elt)->link.prev = (list).tail; \ (elt)->link.next = NULL; \ (list).tail = (elt); \ - } while (/*CONSTCOND*/0) + } while (0) #define UNLINK_TYPE(list, elt, link, type) \ do { \ @@ -80,7 +78,7 @@ (list).head = (elt)->link.next; \ } \ INIT_LINK_TYPE(elt, link, type); \ - } while (/*CONSTCOND*/0) + } while (0) #define UNLINK(list, elt, link) \ UNLINK_TYPE(list, elt, link, void) @@ -98,7 +96,7 @@ (elt)->link.prev->link.next = (elt); \ (elt)->link.next = (before); \ } \ - } while (/*CONSTCOND*/0) + } while (0) #define INSERT_AFTER(list, after, elt, link) \ do { \ @@ -111,7 +109,7 @@ (elt)->link.next->link.prev = (elt); \ (elt)->link.prev = (after); \ } \ - } while (/*CONSTCOND*/0) + } while (0) #define ENQUEUE(list, elt, link) APPEND(list, elt, link) #define DEQUEUE(list, elt, link) UNLINK(list, elt, link) --- /usr/src/lib/libc/include/isc/memcluster.h 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/include/isc/memcluster.h 2005-04-26 23:56:18.000000000 -0500 @@ -1,5 +1,3 @@ -/* $NetBSD: memcluster.h,v 1.1.1.4 2009/04/12 16:35:44 christos Exp $ */ - /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1997,1999 by Internet Software Consortium. --- /usr/src/lib/libc/include/isc/eventlib.h 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/include/isc/eventlib.h 2008-11-13 20:36:51.000000000 -0600 @@ -1,5 +1,3 @@ -/* $NetBSD: eventlib.h,v 1.3 2009/04/12 17:07:16 christos Exp $ */ - /* * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1995-1999, 2001, 2003 Internet Software Consortium. @@ -20,7 +18,7 @@ /* eventlib.h - exported interfaces for eventlib * vix 09sep95 [initial] * - * Id: eventlib.h,v 1.7 2008/11/14 02:36:51 marka Exp + * $Id: eventlib.h,v 1.7 2008/11/14 02:36:51 marka Exp $ */ #ifndef _EVENTLIB_H @@ -31,6 +29,8 @@ #include #include +#include + #ifndef __P # define __EVENTLIB_P_DEFINED # ifdef __STDC__ --- /usr/src/lib/libc/include/isc/heap.h 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/include/isc/heap.h 2005-04-26 23:56:17.000000000 -0500 @@ -1,5 +1,3 @@ -/* $NetBSD: heap.h,v 1.1.1.4 2009/04/12 16:35:44 christos Exp $ */ - /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1997,1999 by Internet Software Consortium. --- /usr/src/lib/libc/isc/assertions.c 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/isc/assertions.c 2008-11-13 20:36:51.000000000 -0600 @@ -1,5 +1,3 @@ -/* $NetBSD: assertions.c,v 1.7 2011/09/16 16:05:58 joerg Exp $ */ - /* * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1997, 1999, 2001 Internet Software Consortium. @@ -17,13 +15,8 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#include -#if !defined(LINT) && !defined(CODECENTER) && !defined(lint) -#ifdef notdef -static const char rcsid[] = "Id: assertions.c,v 1.5 2008/11/14 02:36:51 marka Exp"; -#else -__RCSID("$NetBSD: assertions.c,v 1.7 2011/09/16 16:05:58 joerg Exp $"); -#endif +#if !defined(LINT) && !defined(CODECENTER) +static const char rcsid[] = "$Id: assertions.c,v 1.5 2008/11/14 02:36:51 marka Exp $"; #endif #include "port_before.h" @@ -41,7 +34,7 @@ * Forward. */ -__dead static void default_assertion_failed(const char *, int, assertion_type, +static void default_assertion_failed(const char *, int, assertion_type, const char *, int); /* --- /usr/src/lib/libc/isc/ev_streams.c 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/isc/ev_streams.c 2005-04-26 23:56:36.000000000 -0500 @@ -1,5 +1,3 @@ -/* $NetBSD: ev_streams.c,v 1.6 2009/04/12 17:07:17 christos Exp $ */ - /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1996-1999 by Internet Software Consortium @@ -21,13 +19,8 @@ * vix 04mar96 [initial] */ -#include -#if !defined(LINT) && !defined(CODECENTER) && !defined(lint) -#ifdef notdef -static const char rcsid[] = "Id: ev_streams.c,v 1.5 2005/04/27 04:56:36 sra Exp"; -#else -__RCSID("$NetBSD: ev_streams.c,v 1.6 2009/04/12 17:07:17 christos Exp $"); -#endif +#if !defined(LINT) && !defined(CODECENTER) +static const char rcsid[] = "$Id: ev_streams.c,v 1.5 2005/04/27 04:56:36 sra Exp $"; #endif #include "port_before.h" @@ -44,13 +37,11 @@ #include "port_after.h" -#ifndef _LIBC static int copyvec(evStream *str, const struct iovec *iov, int iocnt); static void consume(evStream *str, size_t bytes); static void done(evContext opaqueCtx, evStream *str); static void writable(evContext opaqueCtx, void *uap, int fd, int evmask); static void readable(evContext opaqueCtx, void *uap, int fd, int evmask); -#endif struct iovec evConsIovec(void *buf, size_t cnt) { @@ -62,7 +53,6 @@ return (ret); } -#ifndef _LIBC int evWrite(evContext opaqueCtx, int fd, const struct iovec *iov, int iocnt, evStreamFunc func, void *uap, evStreamID *id) @@ -314,6 +304,5 @@ if (str->ioDone <= 0 || str->ioDone == str->ioTotal) done(opaqueCtx, str); } -#endif /*! \file */ --- /usr/src/lib/libc/isc/ev_timers.c 2013-06-05 09:26:11.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/isc/ev_timers.c 2005-04-26 23:56:36.000000000 -0500 @@ -1,5 +1,3 @@ -/* $NetBSD: ev_timers.c,v 1.11 2012/03/21 00:34:54 christos Exp $ */ - /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-1999 by Internet Software Consortium @@ -21,13 +19,8 @@ * vix 09sep95 [initial] */ -#include -#if !defined(LINT) && !defined(CODECENTER) && !defined(lint) -#ifdef notdef -static const char rcsid[] = "Id: ev_timers.c,v 1.6 2005/04/27 04:56:36 sra Exp"; -#else -__RCSID("$NetBSD: ev_timers.c,v 1.11 2012/03/21 00:34:54 christos Exp $"); -#endif +#if !defined(LINT) && !defined(CODECENTER) +static const char rcsid[] = "$Id: ev_timers.c,v 1.6 2005/04/27 04:56:36 sra Exp $"; #endif /* Import. */ @@ -50,7 +43,6 @@ /* Forward. */ -#ifndef _LIBC static int due_sooner(void *, void *); static void set_index(void *, int); static void free_timer(void *, void *); @@ -66,7 +58,6 @@ struct timespec max_idle; evTimer * timer; } idle_timer; -#endif /* Public. */ @@ -108,41 +99,34 @@ int evCmpTime(struct timespec a, struct timespec b) { -#define SGN(x) ((x) < 0 ? (-1) : (x) > 0 ? (1) : (0)); - time_t s = a.tv_sec - b.tv_sec; - long n; + long x = a.tv_sec - b.tv_sec; - if (s != 0) - return SGN(s); - - n = a.tv_nsec - b.tv_nsec; - return SGN(n); + if (x == 0L) + x = a.tv_nsec - b.tv_nsec; + return (x < 0L ? (-1) : x > 0L ? (1) : (0)); } struct timespec -evNowTime(void) -{ +evNowTime() { struct timeval now; #ifdef CLOCK_REALTIME struct timespec tsnow; int m = CLOCK_REALTIME; #ifdef CLOCK_MONOTONIC -#ifndef _LIBC if (__evOptMonoTime) m = CLOCK_MONOTONIC; #endif -#endif if (clock_gettime(m, &tsnow) == 0) return (tsnow); #endif if (gettimeofday(&now, NULL) < 0) - return (evConsTime((time_t)0, 0L)); + return (evConsTime(0, 0)); return (evTimeSpec(now)); } struct timespec -evUTCTime(void) { +evUTCTime() { struct timeval now; #ifdef CLOCK_REALTIME struct timespec tsnow; @@ -150,18 +134,16 @@ return (tsnow); #endif if (gettimeofday(&now, NULL) < 0) - return (evConsTime((time_t)0, 0L)); + return (evConsTime(0, 0)); return (evTimeSpec(now)); } -#ifndef _LIBC struct timespec evLastEventTime(evContext opaqueCtx) { evContext_p *ctx = opaqueCtx.opaque; return (ctx->lastEventTime); } -#endif struct timespec evTimeSpec(struct timeval tv) { @@ -177,11 +159,10 @@ struct timeval tv; tv.tv_sec = ts.tv_sec; - tv.tv_usec = (suseconds_t)(ts.tv_nsec / 1000); + tv.tv_usec = ts.tv_nsec / 1000; return (tv); } -#ifndef _LIBC int evSetTimer(evContext opaqueCtx, evTimerFunc func, @@ -457,11 +438,11 @@ } static void -set_index(void *what, int idx) { +set_index(void *what, int index) { evTimer *timer; timer = what; - timer->index = idx; + timer->index = index; } static void @@ -507,13 +488,12 @@ * Setting the interval to zero will cause the timer to * be cleaned up in evDrop(). */ - this->timer->inter = evConsTime(0L, 0L); + this->timer->inter = evConsTime(0, 0); FREE(this); } else { /* evDrop() will reschedule the timer. */ this->timer->inter = evSubTime(this->max_idle, idle); } } -#endif /*! \file */ --- /usr/src/lib/libc/isc/eventlib_p.h 2012-10-24 08:34:35.000000000 -0500 +++ /home/reed/src/isc/libbind/libbind/isc/eventlib_p.h 2006-03-09 17:57:56.000000000 -0600 @@ -1,5 +1,3 @@ -/* $NetBSD: eventlib_p.h,v 1.3 2009/04/12 17:07:17 christos Exp $ */ - /* * Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-1999 by Internet Software Consortium @@ -21,7 +19,7 @@ * \brief private interfaces for eventlib * \author vix 09sep95 [initial] * - * Id: eventlib_p.h,v 1.9 2006/03/09 23:57:56 marka Exp + * $Id: eventlib_p.h,v 1.9 2006/03/09 23:57:56 marka Exp $ */ #ifndef _EVENTLIB_P_H