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.
This commit is contained in:
Ondřej Surý
2025-02-28 21:40:50 +01:00
parent c5075a9a61
commit 901637c25c
2 changed files with 3 additions and 12 deletions

View File

@@ -14,7 +14,6 @@
#pragma once
#include <inttypes.h>
#include <stdlib.h>
/*! \file isc/rwlock.h */
@@ -28,6 +27,7 @@ typedef enum {
} isc_rwlocktype_t;
#if USE_PTHREAD_RWLOCK
#include <errno.h>
#include <pthread.h>
/*
@@ -38,6 +38,8 @@ typedef enum {
#if ISC_TRACK_PTHREADS_OBJECTS
#include <stdlib.h>
typedef pthread_rwlock_t *isc_rwlock_t;
typedef pthread_rwlock_t isc__rwlock_t;

View File

@@ -27,8 +27,6 @@
* ISC_ or isc_ to the name.
*/
#include <isc/attributes.h>
/***
*** Clang Compatibility Macros
***/
@@ -122,8 +120,6 @@
#define ISC_UTIL_TRACE(a)
#endif /* ifdef ISC_UTIL_TRACEON */
#include <isc/result.h> /* 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 <isc/list.h> /* Contractual promise. */
/*%
* Performance
*/
@@ -318,8 +309,6 @@ mock_assert(const int result, const char *const expression,
/*
* Errors
*/
#include <errno.h> /* for errno */
#include <isc/error.h> /* Contractual promise. */
#include <isc/strerr.h> /* for ISC_STRERRORSIZE */