From b5cd18739a64c8d923a55b61c89ae3900faafd84 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 21:17:12 +0100 Subject: Fix include paths and formatting inconsistencies --- include/arch/x86_64/bits/fenv.h | 2 ++ include/arch/x86_64/drm/drm.h | 2 +- include/arch/x86_64/drm/i915_drm.h | 8 ++++---- include/arch/x86_64/linux/can/isotp.h | 2 +- include/arch/x86_64/linux/hdlcdrv.h | 2 +- include/arch/x86_64/linux/scc.h | 2 +- include/bits/stat.h | 3 ++- include/poll.h | 2 +- include/signal.h | 4 +++- include/sys/cdefs.h | 16 ++++++++-------- include/sys/select.h | 3 +++ include/sys/wait.h | 4 +++- 12 files changed, 30 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/arch/x86_64/bits/fenv.h b/include/arch/x86_64/bits/fenv.h index 40bc9e25..9ac982db 100644 --- a/include/arch/x86_64/bits/fenv.h +++ b/include/arch/x86_64/bits/fenv.h @@ -1,3 +1,5 @@ +#pragma once + #define FE_INVALID 1 #define __FE_DENORM 2 #define FE_DIVBYZERO 4 diff --git a/include/arch/x86_64/drm/drm.h b/include/arch/x86_64/drm/drm.h index a928f61f..ebd6ebb5 100644 --- a/include/arch/x86_64/drm/drm.h +++ b/include/arch/x86_64/drm/drm.h @@ -253,7 +253,7 @@ enum drm_stat_type { _DRM_STAT_DMA, /**< DMA */ _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ _DRM_STAT_MISSED /**< Missed DMA opportunity */ - /* Add to the *END* of the list */ + /* Add to the *END* of the list */ }; /* diff --git a/include/arch/x86_64/drm/i915_drm.h b/include/arch/x86_64/drm/i915_drm.h index e0403cb6..68f08e16 100644 --- a/include/arch/x86_64/drm/i915_drm.h +++ b/include/arch/x86_64/drm/i915_drm.h @@ -2115,10 +2115,10 @@ struct drm_i915_gem_context_param { #define I915_CONTEXT_MAX_USER_PRIORITY 1023 /* inclusive */ #define I915_CONTEXT_DEFAULT_PRIORITY 0 #define I915_CONTEXT_MIN_USER_PRIORITY -1023 /* inclusive */ - /* - * When using the following param, value should be a pointer to - * drm_i915_gem_context_param_sseu. - */ + /* + * When using the following param, value should be a pointer to + * drm_i915_gem_context_param_sseu. + */ #define I915_CONTEXT_PARAM_SSEU 0x7 /* diff --git a/include/arch/x86_64/linux/can/isotp.h b/include/arch/x86_64/linux/can/isotp.h index d986173d..3d72f3d3 100644 --- a/include/arch/x86_64/linux/can/isotp.h +++ b/include/arch/x86_64/linux/can/isotp.h @@ -85,7 +85,7 @@ struct can_isotp_options { /* __u8 value : content on rx path */ __u8 rx_ext_address; /* set address for extended addressing */ - /* __u8 value : extended address (rx) */ + /* __u8 value : extended address (rx) */ }; struct can_isotp_fc_options { diff --git a/include/arch/x86_64/linux/hdlcdrv.h b/include/arch/x86_64/linux/hdlcdrv.h index 784d1dcf..0d3f0ba7 100644 --- a/include/arch/x86_64/linux/hdlcdrv.h +++ b/include/arch/x86_64/linux/hdlcdrv.h @@ -29,7 +29,7 @@ struct hdlcdrv_channel_params { int slottime; /* the slottime in 10ms; usually 10 = 100ms */ int ppersist; /* the p-persistence 0..255 */ int fulldup; /* some driver do not support full duplex, setting */ - /* this just makes them send even if DCD is on */ + /* this just makes them send even if DCD is on */ }; struct hdlcdrv_old_channel_state { diff --git a/include/arch/x86_64/linux/scc.h b/include/arch/x86_64/linux/scc.h index ce9c783b..ac19e3ef 100644 --- a/include/arch/x86_64/linux/scc.h +++ b/include/arch/x86_64/linux/scc.h @@ -87,7 +87,7 @@ enum CLOCK_sources { CLK_DIVIDER, /* Rx = DPLL, Tx = divider (fullduplex with */ /* modems without clock regeneration */ CLK_BRG /* experimental fullduplex mode with DPLL/BRG for */ - /* MODEMs without clock recovery */ + /* MODEMs without clock recovery */ }; /* Tx state */ diff --git a/include/bits/stat.h b/include/bits/stat.h index ba43e695..0022cea8 100644 --- a/include/bits/stat.h +++ b/include/bits/stat.h @@ -3,11 +3,12 @@ #ifndef __BITS_STAT_H_ #error "Internal header — include the public API header instead." +#else +#undef __BITS_STAT_H_ #endif #define __BITS_TIMESPEC_H_ #include -#undef __BITS_TIMESPEC_H_ typedef __UINT64_TYPE__ dev_t; typedef __UINT64_TYPE__ ino_t; diff --git a/include/poll.h b/include/poll.h index 40367012..1e7e98bd 100644 --- a/include/poll.h +++ b/include/poll.h @@ -13,7 +13,7 @@ #define POLLNVAL 0x0020 typedef __INT64_TYPE__ time_t; -typedef __INT32_TYPE__ sigset_t; +typedef __UINT64_TYPE__ sigset_t; typedef unsigned long nfds_t; struct timespec; diff --git a/include/signal.h b/include/signal.h index 6b7f2a4a..8e49fc8a 100644 --- a/include/signal.h +++ b/include/signal.h @@ -5,7 +5,9 @@ #include #define __BITS_SIGINFO_H_ -#include +#include // for siginfo_t + +union sigval; #define SIG_DFL ((void (*)(int))0) #define SIG_ERR ((void (*)(int)) - 1) diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index c3bb51c1..0d6f6327 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -4,16 +4,16 @@ #define __BEGIN_DECLS extern "C" { #define __END_DECLS } -#define __dead __attribute__((__noreturn__)) - -#define __used __attribute__((__used__)) -#define __unused __attribute__((__unused__)) - +#define __dead __attribute__((__noreturn__)) +#define __used __attribute__((__used__)) +#define __unused __attribute__((__unused__)) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) +#define __malloc __attribute__((__malloc__)) +#define __pure __attribute__((__pure__)) +#define __nodiscard __attribute__((__warn_unused_result__)) -#define __malloc __attribute__((__malloc__)) - -#define __pure __attribute__((__pure__)) +#define __predict_true(exp) __builtin_expect((exp) != 0, 1) +#define __predict_false(exp) __builtin_expect((exp) != 0, 0) #endif diff --git a/include/sys/select.h b/include/sys/select.h index 13c48dda..16b391d1 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -7,6 +7,9 @@ #define __BITS_TIMESPEC_H_ #include +struct timespec; +struct timeval; + typedef __UINT64_TYPE__ sigset_t; int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, diff --git a/include/sys/wait.h b/include/sys/wait.h index ad935dc8..1325885e 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -2,7 +2,9 @@ #define __WAIT_H #define __BITS_WAIT_H_ -#include +#include // for WUNTRACED +#include // for siginfo_t +#include // for pid_t, id_t #define __BITS_SIGINFO_H_ #include -- cgit v1.2.3