[Git][NTPsec/ntpsec][master] 12 commits: libisc: remove cruft from isc/util.h, fix includes.

Gary E. Miller gitlab at mg.gitlab.com
Sat May 27 03:04:29 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
a46c0905 by Gary E. Miller at 2017-05-26T18:36:13-07:00
libisc: remove cruft from isc/util.h, fix includes.

- - - - -
4005242e by Gary E. Miller at 2017-05-26T18:42:37-07:00
libisc: remove unused function prototypes.

isc_netaddr_format() has been gone for two years.  And yet there
is code that calls it!  Must be dead code.

- - - - -
9b58efe9 by Gary E. Miller at 2017-05-26T18:45:11-07:00
libisc: remove code that calls isc_netaddr_format().

isc_netaddr_format() has been gone for two years.  And yet there
is code that calls it!  Must be dead code.

- - - - -
d79c93a8 by Gary E. Miller at 2017-05-26T18:50:36-07:00
libisc: remove cruft from libisc/netaddr.h

- - - - -
6bdcff63 by Gary E. Miller at 2017-05-26T18:53:45-07:00
libisc: remove unused isc/syslog.h

- - - - -
a4ac7815 by Gary E. Miller at 2017-05-26T18:59:10-07:00
libisc: remove cruft from isc/sockaddr.h

- - - - -
9db0ab01 by Gary E. Miller at 2017-05-26T19:26:18-07:00
libisc: remove C++ compatibility macros.

No C++ in ntpd.

- - - - -
76b13437 by Gary E. Miller at 2017-05-26T19:38:36-07:00
libisc: remove cruft from isc/result.h

- - - - -
77e47a6f by Gary E. Miller at 2017-05-26T19:40:43-07:00
libisc: remive unused isc/resultclass.h

- - - - -
4168c9ef by Gary E. Miller at 2017-05-26T19:46:46-07:00
libisc: remove cruft from isc/net.h

- - - - -
c1e70c70 by Gary E. Miller at 2017-05-26T19:52:46-07:00
libisc: remove uneeded include.

- - - - -
a93c57d4 by Gary E. Miller at 2017-05-26T20:02:02-07:00
libisc: remove cruft from isc/list.h

- - - - -


15 changed files:

- include/isc/mem.h
- libisc/ifiter_ioctl.c
- libisc/include/isc/assertions.h
- libisc/include/isc/backtrace.h
- libisc/include/isc/error.h
- libisc/include/isc/interfaceiter.h
- − libisc/include/isc/lang.h
- libisc/include/isc/list.h
- libisc/include/isc/net.h
- libisc/include/isc/netaddr.h
- libisc/include/isc/result.h
- − libisc/include/isc/resultclass.h
- libisc/include/isc/sockaddr.h
- − libisc/include/isc/syslog.h
- libisc/include/isc/util.h


Changes:

=====================================
include/isc/mem.h
=====================================
--- a/include/isc/mem.h
+++ b/include/isc/mem.h
@@ -17,7 +17,6 @@
 
 #include <stdio.h>
 
-#include "isc/lang.h"
 #include "isc/types.h"
 
 #include "ntp_stdlib.h"


=====================================
libisc/ifiter_ioctl.c
=====================================
--- a/libisc/ifiter_ioctl.c
+++ b/libisc/ifiter_ioctl.c
@@ -469,7 +469,6 @@ internal_current4(isc_interfaceiter_t *iter) {
 	if (family == AF_INET)
 		goto inet;
 
-#if !defined(HAVE_STRUCT_IF_LADDRREQ) && defined(SIOCGLIFADDR)
 	memset(&lifreq, 0, sizeof(lifreq));
 	memcpy(lifreq.lifr_name, iter->current.name, sizeof(lifreq.lifr_name));
 	memcpy(&lifreq.lifr_addr, &iter->current.address.type.in6,
@@ -483,14 +482,6 @@ internal_current4(isc_interfaceiter_t *iter) {
 		return (ISC_R_IGNORE);
 	}
 	prefixlen = lifreq.lifr_addrlen;
-#else
-	isc_netaddr_format(&iter->current.address, sabuf, sizeof(sabuf));
-	isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-		      ISC_LOGMODULE_INTERFACE,
-		      ISC_LOG_INFO,
-		     "prefix length for %s is unknown (assume 128)", sabuf);
-	prefixlen = 128;
-#endif
 
 	/*
 	 * Netmask already zeroed.


=====================================
libisc/include/isc/assertions.h
=====================================
--- a/libisc/include/isc/assertions.h
+++ b/libisc/include/isc/assertions.h
@@ -11,10 +11,6 @@
 #ifndef GUARD_ISC_ASSERTIONS_H
 #define GUARD_ISC_ASSERTIONS_H 1
 
-#include "isc/lang.h"
-
-ISC_LANG_BEGINDECLS
-
 /*% isc assertion type */
 typedef enum {
 	isc_assertiontype_require,
@@ -108,6 +104,4 @@ isc_assertion_typetotext(isc_assertiontype_t type)
 #define ISC_INVARIANT(cond)	((void) 0)
 #endif /* ISC_CHECK_INVARIANT */
 
-ISC_LANG_ENDDECLS
-
 #endif /* GUARD_ISC_ASSERTIONS_H */


=====================================
libisc/include/isc/backtrace.h
=====================================
--- a/libisc/include/isc/backtrace.h
+++ b/libisc/include/isc/backtrace.h
@@ -42,7 +42,6 @@ struct isc_backtrace_symmap {
  *** Functions
  ***/
 
-ISC_LANG_BEGINDECLS
 isc_result_t
 isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes)
 		       __attribute__((const));
@@ -105,6 +104,5 @@ isc_backtrace_getsymbol(const void *addr, const char **symbolp,
  *\li	#ISC_R_FAILURE
  *\li	#ISC_R_NOTFOUND
  */
-ISC_LANG_ENDDECLS
 
 #endif	/* GUARD_ISC_BACKTRACE_H */


=====================================
libisc/include/isc/error.h
=====================================
--- a/libisc/include/isc/error.h
+++ b/libisc/include/isc/error.h
@@ -13,9 +13,6 @@
 #include <stdarg.h>
 
 #include "isc/formatcheck.h"
-#include "isc/lang.h"
-
-ISC_LANG_BEGINDECLS
 
 typedef void (*isc_errorcallback_t)(const char *, int, const char *, va_list);
 
@@ -46,6 +43,4 @@ isc_error_runtimecheck(const char *, int, const char *)
 	((void) ((cond) || \
 		 ((isc_error_runtimecheck)(__FILE__, __LINE__, #cond), 0)))
 
-ISC_LANG_ENDDECLS
-
 #endif /* GUARD_ISC_ERROR_H */


=====================================
libisc/include/isc/interfaceiter.h
=====================================
--- a/libisc/include/isc/interfaceiter.h
+++ b/libisc/include/isc/interfaceiter.h
@@ -28,7 +28,6 @@
  *** Imports
  ***/
 
-#include "isc/lang.h"
 #include "isc/netaddr.h"
 #include "isc/types.h"
 
@@ -62,8 +61,6 @@ struct isc_interface {
  *** Functions
  ***/
 
-ISC_LANG_BEGINDECLS
-
 bool
 isc_interfaceiter_create_bool(isc_mem_t *mctx, isc_interfaceiter_t **iterp);
 isc_result_t
@@ -130,6 +127,4 @@ isc_interfaceiter_destroy(isc_interfaceiter_t **iterp);
  * \brief Destroy the iterator.
  */
 
-ISC_LANG_ENDDECLS
-
 #endif /* GUARD_ISC_INTERFACEITER_H */


=====================================
libisc/include/isc/lang.h deleted
=====================================
--- a/libisc/include/isc/lang.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2004-2007  Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001  Internet Software Consortium.
- * Copyright 2015 by the NTPsec project contributors
- * SPDX-License-Identifier: ISC
- */
-
-#ifndef GUARD_ISC_LANG_H
-#define GUARD_ISC_LANG_H 1
-
-/*! \file isc/lang.h */
-
-#ifdef __cplusplus
-#define ISC_LANG_BEGINDECLS	extern "C" {
-#define ISC_LANG_ENDDECLS	}
-#else
-#define ISC_LANG_BEGINDECLS
-#define ISC_LANG_ENDDECLS
-#endif
-
-#endif /* GUARD_ISC_LANG_H */


=====================================
libisc/include/isc/list.h
=====================================
--- a/libisc/include/isc/list.h
+++ b/libisc/include/isc/list.h
@@ -7,179 +7,9 @@
 
 #ifndef GUARD_ISC_LIST_H
 #define GUARD_ISC_LIST_H 1
-#include <stdbool.h>
-#include "isc/assertions.h"
-
-#ifdef ISC_LIST_CHECKINIT
-#define ISC_LINK_INSIST(x) ISC_INSIST(x)
-#else
-#define ISC_LINK_INSIST(x)
-#endif
 
 #define ISC_LIST(type) struct { type *head, *tail; }
-#define ISC_LIST_INIT(list) \
-	do { (list).head = NULL; (list).tail = NULL; } while (0)
 
 #define ISC_LINK(type) struct { type *prev, *next; }
-#define ISC_LINK_INIT_TYPE(elt, link, type) \
-	do { \
-		(elt)->link.prev = (type *)(-1); \
-		(elt)->link.next = (type *)(-1); \
-	} while (0)
-#define ISC_LINK_INIT(elt, link) \
-	ISC_LINK_INIT_TYPE(elt, link, void)
-#define ISC_LINK_LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1))
-
-#define ISC_LIST_HEAD(list) ((list).head)
-#define ISC_LIST_TAIL(list) ((list).tail)
-#define ISC_LIST_EMPTY(list) ISC_TF((list).head == NULL)
-
-#define __ISC_LIST_PREPENDUNSAFE(list, elt, link) \
-	do { \
-		if ((list).head != NULL) \
-			(list).head->link.prev = (elt); \
-		else \
-			(list).tail = (elt); \
-		(elt)->link.prev = NULL; \
-		(elt)->link.next = (list).head; \
-		(list).head = (elt); \
-	} while (0)
-
-#define ISC_LIST_PREPEND(list, elt, link) \
-	do { \
-		ISC_LINK_INSIST(!ISC_LINK_LINKED(elt, link)); \
-		__ISC_LIST_PREPENDUNSAFE(list, elt, link); \
-	} while (0)
-
-#define ISC_LIST_INITANDPREPEND(list, elt, link) \
-		__ISC_LIST_PREPENDUNSAFE(list, elt, link)
-
-#define __ISC_LIST_APPENDUNSAFE(list, elt, link) \
-	do { \
-		if ((list).tail != NULL) \
-			(list).tail->link.next = (elt); \
-		else \
-			(list).head = (elt); \
-		(elt)->link.prev = (list).tail; \
-		(elt)->link.next = NULL; \
-		(list).tail = (elt); \
-	} while (0)
-
-#define ISC_LIST_APPEND(list, elt, link) \
-	do { \
-		ISC_LINK_INSIST(!ISC_LINK_LINKED(elt, link)); \
-		__ISC_LIST_APPENDUNSAFE(list, elt, link); \
-	} while (0)
-
-#define ISC_LIST_INITANDAPPEND(list, elt, link) \
-		__ISC_LIST_APPENDUNSAFE(list, elt, link)
-
-#define __ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, type) \
-	do { \
-		if ((elt)->link.next != NULL) \
-			(elt)->link.next->link.prev = (elt)->link.prev; \
-		else { \
-			ISC_INSIST((list).tail == (elt)); \
-			(list).tail = (elt)->link.prev; \
-		} \
-		if ((elt)->link.prev != NULL) \
-			(elt)->link.prev->link.next = (elt)->link.next; \
-		else { \
-			ISC_INSIST((list).head == (elt)); \
-			(list).head = (elt)->link.next; \
-		} \
-		(elt)->link.prev = (type *)(-1); \
-		(elt)->link.next = (type *)(-1); \
-	} while (0)
-
-#define __ISC_LIST_UNLINKUNSAFE(list, elt, link) \
-	__ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, void)
-
-#define ISC_LIST_UNLINK_TYPE(list, elt, link, type) \
-	do { \
-		ISC_LINK_INSIST(ISC_LINK_LINKED(elt, link)); \
-		__ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, type); \
-	} while (0)
-#define ISC_LIST_UNLINK(list, elt, link) \
-	ISC_LIST_UNLINK_TYPE(list, elt, link, void)
-
-#define ISC_LIST_PREV(elt, link) ((elt)->link.prev)
-#define ISC_LIST_NEXT(elt, link) ((elt)->link.next)
-
-#define __ISC_LIST_INSERTBEFOREUNSAFE(list, before, elt, link) \
-	do { \
-		if ((before)->link.prev == NULL) \
-			ISC_LIST_PREPEND(list, elt, link); \
-		else { \
-			(elt)->link.prev = (before)->link.prev; \
-			(before)->link.prev = (elt); \
-			(elt)->link.prev->link.next = (elt); \
-			(elt)->link.next = (before); \
-		} \
-	} while (0)
-
-#define ISC_LIST_INSERTBEFORE(list, before, elt, link) \
-	do { \
-		ISC_LINK_INSIST(ISC_LINK_LINKED(before, link)); \
-		ISC_LINK_INSIST(!ISC_LINK_LINKED(elt, link)); \
-		__ISC_LIST_INSERTBEFOREUNSAFE(list, before, elt, link); \
-	} while (0)
-
-#define __ISC_LIST_INSERTAFTERUNSAFE(list, after, elt, link) \
-	do { \
-		if ((after)->link.next == NULL) \
-			ISC_LIST_APPEND(list, elt, link); \
-		else { \
-			(elt)->link.next = (after)->link.next; \
-			(after)->link.next = (elt); \
-			(elt)->link.next->link.prev = (elt); \
-			(elt)->link.prev = (after); \
-		} \
-	} while (0)
-
-#define ISC_LIST_INSERTAFTER(list, after, elt, link) \
-	do { \
-		ISC_LINK_INSIST(ISC_LINK_LINKED(after, link)); \
-		ISC_LINK_INSIST(!ISC_LINK_LINKED(elt, link)); \
-		__ISC_LIST_INSERTAFTERUNSAFE(list, after, elt, link); \
-	} while (0)
-
-#define ISC_LIST_APPENDLIST(list1, list2, link) \
-	do { \
-		if (ISC_LIST_EMPTY(list1)) \
-			(list1) = (list2); \
-		else if (!ISC_LIST_EMPTY(list2)) { \
-			(list1).tail->link.next = (list2).head; \
-			(list2).head->link.prev = (list1).tail; \
-			(list1).tail = (list2).tail; \
-		} \
-		(list2).head = NULL; \
-		(list2).tail = NULL; \
-	} while (0)
-
-#define ISC_LIST_PREPENDLIST(list1, list2, link) \
-	do { \
-		if (ISC_LIST_EMPTY(list1)) \
-			(list1) = (list2); \
-		else if (!ISC_LIST_EMPTY(list2)) { \
-			(list2).tail->link.next = (list1).head; \
-			(list1).head->link.prev = (list2).tail; \
-			(list1).head = (list2).head; \
-		} \
-		(list2).head = NULL; \
-		(list2).tail = NULL; \
-	} while (0)
-
-#define ISC_LIST_ENQUEUE(list, elt, link) ISC_LIST_APPEND(list, elt, link)
-#define __ISC_LIST_ENQUEUEUNSAFE(list, elt, link) \
-	__ISC_LIST_APPENDUNSAFE(list, elt, link)
-#define ISC_LIST_DEQUEUE(list, elt, link) \
-	 ISC_LIST_UNLINK_TYPE(list, elt, link, void)
-#define ISC_LIST_DEQUEUE_TYPE(list, elt, link, type) \
-	 ISC_LIST_UNLINK_TYPE(list, elt, link, type)
-#define __ISC_LIST_DEQUEUEUNSAFE(list, elt, link) \
-	__ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, void)
-#define __ISC_LIST_DEQUEUEUNSAFE_TYPE(list, elt, link, type) \
-	__ISC_LIST_UNLINKUNSAFE_TYPE(list, elt, link, type)
 
 #endif /* GUARD_ISC_LIST_H */


=====================================
libisc/include/isc/net.h
=====================================
--- a/libisc/include/isc/net.h
+++ b/libisc/include/isc/net.h
@@ -50,35 +50,13 @@
  *** Imports.
  ***/
 
-#include <sys/types.h>
-#include <sys/socket.h>		/* Contractual promise. */
-
-#include <net/if.h>
-
 #include <netinet/in.h>		/* Contractual promise. */
-#include <arpa/inet.h>		/* Contractual promise. */
-
-#include "isc/lang.h"
 #include "isc/types.h"
 
-/*% IP address. */
-#define ISC__IPADDR(x)	((isc_uint32_t)htonl((isc_uint32_t)(x)))
-
-/*% Is IP address multicast? */
-#define ISC_IPADDR_ISMULTICAST(i) \
-		(((isc_uint32_t)(i) & ISC__IPADDR(0xf0000000)) \
-		 == ISC__IPADDR(0xe0000000))
-
-#define ISC_IPADDR_ISEXPERIMENTAL(i) \
-		(((isc_uint32_t)(i) & ISC__IPADDR(0xf0000000)) \
-		 == ISC__IPADDR(0xf0000000))
-
 /***
  *** Functions.
  ***/
 
-ISC_LANG_BEGINDECLS
-
 bool isc_net_probeipv4_bool(void);
 
 isc_result_t
@@ -125,6 +103,4 @@ isc_net_probe_ipv6only(void);
  * \li	#ISC_R_UNEXPECTED
  */
 
-ISC_LANG_ENDDECLS
-
 #endif /* GUARD_ISC_NET_H */


=====================================
libisc/include/isc/netaddr.h
=====================================
--- a/libisc/include/isc/netaddr.h
+++ b/libisc/include/isc/netaddr.h
@@ -11,12 +11,9 @@
 /*! \file isc/netaddr.h */
 
 #include <stdbool.h>
-#include "isc/lang.h"
 #include "isc/net.h"
 #include "isc/types.h"
 
-ISC_LANG_BEGINDECLS
-
 struct isc_netaddr {
 	unsigned int family;
 	union {
@@ -29,43 +26,6 @@ struct isc_netaddr {
 bool
 isc_netaddr_eqprefix(const isc_netaddr_t *, const isc_netaddr_t *,
 		     unsigned int) __attribute__((pure));
-/*%<
- * Convert a netmask in 's' into a prefix length in '*lenp'.
- * The mask should consist of zero or more '1' bits in the most
- * most significant part of the address, followed by '0' bits.
- * If this is not the case, #ISC_R_MASKNONCONTIG is returned.
- *
- * Returns:
- *\li	#ISC_R_SUCCESS
- *\li	#ISC_R_MASKNONCONTIG
- */
-
-isc_result_t
-isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target);
-/*%<
- * Append a text representation of 'sockaddr' to the buffer 'target'.
- * The text is NOT null terminated.  Handles IPv4 and IPv6 addresses.
- *
- * Returns:
- *\li	#ISC_R_SUCCESS
- *\li	#ISC_R_NOSPACE	The text or the null termination did not fit.
- *\li	#ISC_R_FAILURE	Unspecified failure
- */
-
-void
-isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size);
-/*%<
- * Format a human-readable representation of the network address '*na'
- * into the character array 'array', which is of size 'size'.
- * The resulting string is guaranteed to be null-terminated.
- */
-
-#define ISC_NETADDR_FORMATSIZE \
-	sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:XXX.XXX.XXX.XXX%SSSSSSSSSS")
-/*%<
- * Minimum size of array to pass to isc_netaddr_format().
- */
-
 void
 isc_netaddr_fromsockaddr(isc_netaddr_t *netaddr, const isc_sockaddr_t *source);
 
@@ -75,68 +35,13 @@ isc_netaddr_fromin(isc_netaddr_t *netaddr, const struct in_addr *ina);
 void
 isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6);
 
-isc_result_t
-isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path);
-
 void
 isc_netaddr_setzone(isc_netaddr_t *netaddr, uint32_t zone);
 
-void
-isc_netaddr_any(isc_netaddr_t *netaddr);
-/*%<
- * Return the IPv4 wildcard address.
- */
-
-void
-isc_netaddr_any6(isc_netaddr_t *netaddr);
-/*%<
- * Return the IPv6 wildcard address.
- */
-
-bool
-isc_netaddr_ismulticast(isc_netaddr_t *na);
-/*%<
- * Returns true if the address is a multicast address.
- */
-
-bool
-isc_netaddr_isexperimental(isc_netaddr_t *na);
-/*%<
- * Returns true if the address is a experimental (CLASS E) address.
- */
-
 bool
 isc_netaddr_islinklocal(isc_netaddr_t *na) __attribute__((pure));
 /*%<
  * Returns #true if the address is a link local address.
  */
 
-bool
-isc_netaddr_issitelocal(isc_netaddr_t *na);
-/*%<
- * Returns #true if the address is a site local address.
- */
-
-void
-isc_netaddr_fromv4mapped(isc_netaddr_t *t, const isc_netaddr_t *s);
-/*%<
- * Convert an IPv6 v4mapped address into an IPv4 address.
- */
-
-isc_result_t
-isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen);
-/*
- * Test whether the netaddr 'na' and 'prefixlen' are consistent.
- * e.g. prefixlen within range.
- *      na does not have bits set which are not covered by the prefixlen.
- *
- * Returns:
- *	ISC_R_SUCCESS
- *	ISC_R_RANGE		prefixlen out of range
- *	ISC_R_NOTIMPLEMENTED	unsupported family
- *	ISC_R_FAILURE		extra bits.
- */
-
-ISC_LANG_ENDDECLS
-
 #endif /* GUARD_ISC_NETADDR_H */


=====================================
libisc/include/isc/result.h
=====================================
--- a/libisc/include/isc/result.h
+++ b/libisc/include/isc/result.h
@@ -10,88 +10,13 @@
 
 /*! \file isc/result.h */
 
-#include "isc/lang.h"
-#include "isc/types.h"
-
 #define ISC_R_SUCCESS			0	/*%< success */
 #define ISC_R_NOMEMORY			1	/*%< out of memory */
-#define ISC_R_TIMEDOUT			2	/*%< timed out */
-#define ISC_R_NOTHREADS			3	/*%< no available threads */
-#define ISC_R_ADDRNOTAVAIL		4	/*%< address not available */
-#define ISC_R_ADDRINUSE			5	/*%< address in use */
-#define ISC_R_NOPERM			6	/*%< permission denied */
-#define ISC_R_NOCONN			7	/*%< no pending connections */
-#define ISC_R_NETUNREACH		8	/*%< network unreachable */
-#define ISC_R_HOSTUNREACH		9	/*%< host unreachable */
-#define ISC_R_NETDOWN			10	/*%< network down */
-#define ISC_R_HOSTDOWN			11	/*%< host down */
-#define ISC_R_CONNREFUSED		12	/*%< connection refused */
-#define ISC_R_NORESOURCES		13	/*%< not enough free resources */
-#define ISC_R_EOF			14	/*%< end of file */
-#define ISC_R_BOUND			15	/*%< socket already bound */
-#define ISC_R_RELOAD			16	/*%< reload */
-#define ISC_R_SUSPEND	      ISC_R_RELOAD	/*%< alias of 'reload' */
-#define ISC_R_LOCKBUSY			17	/*%< lock busy */
-#define ISC_R_EXISTS			18	/*%< already exists */
-#define ISC_R_NOSPACE			19	/*%< ran out of space */
-#define ISC_R_CANCELED			20	/*%< operation canceled */
-#define ISC_R_NOTBOUND			21	/*%< socket is not bound */
-#define ISC_R_SHUTTINGDOWN		22	/*%< shutting down */
 #define ISC_R_NOTFOUND			23	/*%< not found */
-#define ISC_R_UNEXPECTEDEND		24	/*%< unexpected end of input */
 #define ISC_R_FAILURE			25	/*%< generic failure */
-#define ISC_R_IOERROR			26	/*%< I/O error */
 #define ISC_R_NOTIMPLEMENTED		27	/*%< not implemented */
-#define ISC_R_UNBALANCED		28	/*%< unbalanced parentheses */
 #define ISC_R_NOMORE			29	/*%< no more */
-#define ISC_R_INVALIDFILE		30	/*%< invalid file */
-#define ISC_R_BADBASE64			31	/*%< bad base64 encoding */
-#define ISC_R_UNEXPECTEDTOKEN		32	/*%< unexpected token */
-#define ISC_R_QUOTA			33	/*%< quota reached */
 #define ISC_R_UNEXPECTED		34	/*%< unexpected error */
-#define ISC_R_ALREADYRUNNING		35	/*%< already running */
 #define ISC_R_IGNORE			36	/*%< ignore */
-#define ISC_R_MASKNONCONTIG             37	/*%< addr mask not contiguous */
-#define ISC_R_FILENOTFOUND		38	/*%< file not found */
-#define ISC_R_FILEEXISTS		39	/*%< file already exists */
-#define ISC_R_NOTCONNECTED		40	/*%< socket is not connected */
-#define ISC_R_RANGE			41	/*%< out of range */
-#define ISC_R_NOENTROPY			42	/*%< out of entropy */
-#define ISC_R_MULTICAST			43	/*%< invalid use of multicast */
-#define ISC_R_NOTFILE			44	/*%< not a file */
-#define ISC_R_NOTDIRECTORY		45	/*%< not a directory */
-#define ISC_R_QUEUEFULL			46	/*%< queue is full */
-#define ISC_R_FAMILYMISMATCH		47	/*%< address family mismatch */
-#define ISC_R_FAMILYNOSUPPORT		48	/*%< AF not supported */
-#define ISC_R_BADHEX			49	/*%< bad hex encoding */
-#define ISC_R_TOOMANYOPENFILES		50	/*%< too many open files */
-#define ISC_R_NOTBLOCKING		51	/*%< not blocking */
-#define ISC_R_UNBALANCEDQUOTES		52	/*%< unbalanced quotes */
-#define ISC_R_INPROGRESS		53	/*%< operation in progress */
-#define ISC_R_CONNECTIONRESET		54	/*%< connection reset */
-#define ISC_R_SOFTQUOTA			55	/*%< soft quota reached */
-#define ISC_R_BADNUMBER			56	/*%< not a valid number */
-#define ISC_R_DISABLED			57	/*%< disabled */
-#define ISC_R_MAXSIZE			58	/*%< max size */
-#define ISC_R_BADADDRESSFORM		59	/*%< invalid address format */
-#define ISC_R_BADBASE32			60	/*%< bad base32 encoding */
-#define ISC_R_UNSET			61	/*%< unset */
-
-/*% Not a result code: the number of results. */
-#define ISC_R_NRESULTS 			62
-
-ISC_LANG_BEGINDECLS
-
-const char *
-isc_result_totext(isc_result_t);
-/*%<
- * Convert an isc_result_t into a string message describing the result.
- */
-
-isc_result_t
-isc_result_register(unsigned int base, unsigned int nresults,
-		    const char **text, int set);
-
-ISC_LANG_ENDDECLS
 
 #endif /* GUARD_ISC_RESULT_H */


=====================================
libisc/include/isc/resultclass.h deleted
=====================================
--- a/libisc/include/isc/resultclass.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2004-2007, 2009  Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001  Internet Software Consortium.
- * Copyright 2015 by the NTPsec project contributors
- * SPDX-License-Identifier: ISC
- */
-
-#ifndef GUARD_ISC_RESULTCLASS_H
-#define GUARD_ISC_RESULTCLASS_H 1
-
-
-/*! \file isc/resultclass.h
- * \brief Registry of Predefined Result Type Classes
- *
- * A result class number is an unsigned 16 bit number.  Each class may
- * contain up to 65536 results.  A result code is formed by adding the
- * result number within the class to the class number multiplied by 65536.
- *
- * Classes < 1024 are reserved for ISC use.
- * Result classes >= 1024 and <= 65535 are reserved for application use.
- */
-
-#define ISC_RESULTCLASS_FROMNUM(num)		((num) << 16)
-#define ISC_RESULTCLASS_TONUM(rclass)		((rclass) >> 16)
-#define ISC_RESULTCLASS_SIZE			65536
-#define ISC_RESULTCLASS_INCLASS(rclass, result) \
-	((rclass) == ((result) & 0xFFFF0000))
-
-
-#define	ISC_RESULTCLASS_ISC		ISC_RESULTCLASS_FROMNUM(0)
-#define	ISC_RESULTCLASS_DNS		ISC_RESULTCLASS_FROMNUM(1)
-#define	ISC_RESULTCLASS_DST		ISC_RESULTCLASS_FROMNUM(2)
-#define	ISC_RESULTCLASS_DNSRCODE	ISC_RESULTCLASS_FROMNUM(3)
-#define	ISC_RESULTCLASS_OMAPI		ISC_RESULTCLASS_FROMNUM(4)
-#define	ISC_RESULTCLASS_ISCCC		ISC_RESULTCLASS_FROMNUM(5)
-#define	ISC_RESULTCLASS_DHCP		ISC_RESULTCLASS_FROMNUM(6)
-
-
-#endif /* GUARD_ISC_RESULTCLASS_H */


=====================================
libisc/include/isc/sockaddr.h
=====================================
--- a/libisc/include/isc/sockaddr.h
+++ b/libisc/include/isc/sockaddr.h
@@ -10,7 +10,6 @@
 
 /*! \file isc/sockaddr.h */
 
-#include "isc/lang.h"
 #include "isc/net.h"
 #include "isc/types.h"
 
@@ -24,15 +23,4 @@ struct isc_sockaddr {
 	ISC_LINK(struct isc_sockaddr)	link;
 };
 
-typedef ISC_LIST(struct isc_sockaddr)	isc_sockaddrlist_t;
-
-#define ISC_SOCKADDR_CMPADDR	  0x0001	/*%< compare the address
-						 *   sin_addr/sin6_addr */
-#define ISC_SOCKADDR_CMPPORT 	  0x0002	/*%< compare the port
-						 *   sin_port/sin6_port */
-#define ISC_SOCKADDR_CMPSCOPE     0x0004	/*%< compare the scope
-						 *   sin6_scope */
-#define ISC_SOCKADDR_CMPSCOPEZERO 0x0008	/*%< when comparing scopes
-						 *   zero scopes always match */
-
 #endif /* GUARD_ISC_SOCKADDR_H */


=====================================
libisc/include/isc/syslog.h deleted
=====================================
--- a/libisc/include/isc/syslog.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001  Internet Software Consortium.
- * Copyright 2015 by the NTPsec project contributors
- * SPDX-License-Identifier: ISC
- */
-
-#ifndef GUARD_ISC_SYSLOG_H
-#define GUARD_ISC_SYSLOG_H 1
-
-/*! \file */
-
-#include "isc/lang.h"
-#include "isc/types.h"
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-isc_syslog_facilityfromstring(const char *str, int *facilityp);
-/*%<
- * Convert 'str' to the appropriate syslog facility constant.
- *
- * Requires:
- *
- *\li	'str' is not NULL
- *\li	'facilityp' is not NULL
- *
- * Returns:
- * \li	#ISC_R_SUCCESS
- * \li	#ISC_R_NOTFOUND
- */
-
-ISC_LANG_ENDDECLS
-
-#endif /* GUARD_ISC_SYSLOG_H */


=====================================
libisc/include/isc/util.h
=====================================
--- a/libisc/include/isc/util.h
+++ b/libisc/include/isc/util.h
@@ -37,35 +37,6 @@
 #define UNUSED(x)      (void)(x)
 
 /*%
- * The opposite: silent warnings about stored values which are never read.
- */
-#define POST(x)        (void)(x)
-
-#define ISC_MAX(a, b)  ((a) > (b) ? (a) : (b))
-#define ISC_MIN(a, b)  ((a) < (b) ? (a) : (b))
-
-/*%
- * Use this to remove the const qualifier of a variable to assign it to
- * a non-const variable or pass it as a non-const function argument ...
- * but only when you are sure it won't then be changed!
- * This is necessary to sometimes shut up some compilers
- * (as with gcc -Wcast-qual) when there is just no other good way to avoid the
- * situation.
- */
-#define DE_CONST(konst, var) \
-	do { \
-		union { const void *k; void *v; } _u; \
-		_u.k = konst; \
-		var = _u.v; \
-	} while (0)
-
-/*%
- * Use this in translation units that would otherwise be empty, to
- * suppress compiler warnings.
- */
-#define EMPTY_TRANSLATION_UNIT extern void exit(int);
-
-/*%
  * We use macros instead of calling the routines directly because
  * the capital letters make the locking stand out.
  * We RUNTIME_CHECK for success since in general there's no way
@@ -82,32 +53,9 @@
 #include "isc/result.h"		/* Contractual promise. */
 
 /*
- * List Macros.
- */
-#include "isc/list.h"		/* Contractual promise. */
-
-#define LIST(type)			ISC_LIST(type)
-#define INIT_LIST(type)			ISC_LIST_INIT(type)
-#define LINK(type)			ISC_LINK(type)
-#define INIT_LINK(elt, link)		ISC_LINK_INIT(elt, link)
-#define HEAD(list)			ISC_LIST_HEAD(list)
-#define TAIL(list)			ISC_LIST_TAIL(list)
-#define EMPTY(list)			ISC_LIST_EMPTY(list)
-#define PREV(elt, link)			ISC_LIST_PREV(elt, link)
-#define NEXT(elt, link)			ISC_LIST_NEXT(elt, link)
-#define APPEND(list, elt, link)		ISC_LIST_APPEND(list, elt, link)
-#define PREPEND(list, elt, link)	ISC_LIST_PREPEND(list, elt, link)
-#define UNLINK(list, elt, link)		ISC_LIST_UNLINK(list, elt, link)
-#define ENQUEUE(list, elt, link)	ISC_LIST_APPEND(list, elt, link)
-#define DEQUEUE(list, elt, link)	ISC_LIST_UNLINK(list, elt, link)
-#define INSERTBEFORE(li, b, e, ln)	ISC_LIST_INSERTBEFORE(li, b, e, ln)
-#define INSERTAFTER(li, a, e, ln)	ISC_LIST_INSERTAFTER(li, a, e, ln)
-#define APPENDLIST(list1, list2, link)	ISC_LIST_APPENDLIST(list1, list2, link)
-
-/*
  * Assertions
  */
-#include <isc/assertions.h>	/* Contractual promise. */
+#include "isc/assertions.h"	/* Contractual promise. */
 
 /*% Require Assertion */
 #define REQUIRE(e)			ISC_REQUIRE(e)
@@ -121,7 +69,7 @@
 /*
  * Errors
  */
-#include <isc/error.h>		/* Contractual promise. */
+#include "isc/error.h"		/* Contractual promise. */
 
 /*% Unexpected Error */
 #define UNEXPECTED_ERROR		isc_error_unexpected



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/d5b424f58315dc7babbdec4d7a59416a168a0b0b...a93c57d49446e79d427249c7184de17d41ebb718

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/d5b424f58315dc7babbdec4d7a59416a168a0b0b...a93c57d49446e79d427249c7184de17d41ebb718
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170527/f2718a42/attachment.html>


More information about the vc mailing list