From 901637c25c0b4d3075dd33b0aff59209d39a7886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 28 Feb 2025 21:40:50 +0100 Subject: [PATCH] Remove superflous header includes from isc/util.h header Formerly, isc/util.h would pull a few extra headers (isc/list.h, isc/attributes.h, isc/result.h and errno.h). These includes were removed in favor of including them directly when used. --- lib/isc/include/isc/rwlock.h | 4 +++- lib/isc/include/isc/util.h | 11 ----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/isc/include/isc/rwlock.h b/lib/isc/include/isc/rwlock.h index 16cbe536d8..b636fbc37c 100644 --- a/lib/isc/include/isc/rwlock.h +++ b/lib/isc/include/isc/rwlock.h @@ -14,7 +14,6 @@ #pragma once #include -#include /*! \file isc/rwlock.h */ @@ -28,6 +27,7 @@ typedef enum { } isc_rwlocktype_t; #if USE_PTHREAD_RWLOCK +#include #include /* @@ -38,6 +38,8 @@ typedef enum { #if ISC_TRACK_PTHREADS_OBJECTS +#include + typedef pthread_rwlock_t *isc_rwlock_t; typedef pthread_rwlock_t isc__rwlock_t; diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h index bcfe3ad2ae..a392714e18 100644 --- a/lib/isc/include/isc/util.h +++ b/lib/isc/include/isc/util.h @@ -27,8 +27,6 @@ * ISC_ or isc_ to the name. */ -#include - /*** *** Clang Compatibility Macros ***/ @@ -122,8 +120,6 @@ #define ISC_UTIL_TRACE(a) #endif /* ifdef ISC_UTIL_TRACEON */ -#include /* Contractual promise. */ - #define SPINLOCK(sp) \ { \ ISC_UTIL_TRACE(fprintf(stderr, "SPINLOCKING %p %s %d\n", (sp), \ @@ -218,11 +214,6 @@ INSIST(locktype == isc_rwlocktype_write); \ } -/* - * List Macros. - */ -#include /* Contractual promise. */ - /*% * Performance */ @@ -318,8 +309,6 @@ mock_assert(const int result, const char *const expression, /* * Errors */ -#include /* for errno */ - #include /* Contractual promise. */ #include /* for ISC_STRERRORSIZE */