From 139f030622ece79db86ada64e1c74810f099b22b Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Mon, 6 Jan 2025 22:49:43 +0800 Subject: [PATCH] headers: make more headers self-contained Some IDEs parse headers in isolation to populate their code model. This exposes some missing headers, mainly for alsa internal struct definitions, ssize_t (requiring sys/types.h), size_t (requiring string.h), va_args (requiring stdargs.h) or FILE (requiring stdio.h) This patch makes the main headers parsable by qtcreator --- include/conf.h | 5 +++++ include/control.h | 4 ++++ include/error.h | 2 ++ include/hwdep.h | 3 +++ include/input.h | 1 + include/mixer.h | 5 +++++ include/output.h | 2 ++ include/pcm.h | 4 ++++ include/pcm_rate.h | 4 ++++ include/rawmidi.h | 7 +++++++ include/seq.h | 3 +++ include/timer.h | 7 +++++++ include/topology.h | 1 + include/ump_msg.h | 1 + 14 files changed, 49 insertions(+) diff --git a/include/conf.h b/include/conf.h index 09da0e9aa..321fda1fc 100644 --- a/include/conf.h +++ b/include/conf.h @@ -28,6 +28,11 @@ #ifndef __ALSA_CONF_H #define __ALSA_CONF_H +#include + +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/control.h b/include/control.h index e7541d56d..b6dfd01a2 100644 --- a/include/control.h +++ b/include/control.h @@ -28,6 +28,10 @@ #ifndef __ALSA_CONTROL_H #define __ALSA_CONTROL_H +#include + +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/error.h b/include/error.h index 7239db852..4d06f2ea5 100644 --- a/include/error.h +++ b/include/error.h @@ -28,6 +28,8 @@ #ifndef __ALSA_ERROR_H #define __ALSA_ERROR_H +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/hwdep.h b/include/hwdep.h index 46ed1f780..0ea2e5615 100644 --- a/include/hwdep.h +++ b/include/hwdep.h @@ -28,6 +28,9 @@ #ifndef __ALSA_HWDEP_H #define __ALSA_HWDEP_H +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/input.h b/include/input.h index f84954a9a..879b7678c 100644 --- a/include/input.h +++ b/include/input.h @@ -29,6 +29,7 @@ #define __ALSA_INPUT_H #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/mixer.h b/include/mixer.h index 735dfdd84..f1d192214 100644 --- a/include/mixer.h +++ b/include/mixer.h @@ -28,6 +28,11 @@ #ifndef __ALSA_MIXER_H #define __ALSA_MIXER_H +#include +#include + +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/output.h b/include/output.h index 5e16420b5..ecf99b64f 100644 --- a/include/output.h +++ b/include/output.h @@ -29,6 +29,8 @@ #define __ALSA_OUTPUT_H #include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/pcm.h b/include/pcm.h index b5c678898..c8328ca90 100644 --- a/include/pcm.h +++ b/include/pcm.h @@ -34,6 +34,10 @@ extern "C" { #endif #include +#include + +#include +#include /** * \defgroup PCM PCM Interface diff --git a/include/pcm_rate.h b/include/pcm_rate.h index 48473ed4e..2d2fcdfaf 100644 --- a/include/pcm_rate.h +++ b/include/pcm_rate.h @@ -31,6 +31,10 @@ #ifndef __ALSA_PCM_RATE_H #define __ALSA_PCM_RATE_H +#include +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rawmidi.h b/include/rawmidi.h index 2630d1e67..8b25759d4 100644 --- a/include/rawmidi.h +++ b/include/rawmidi.h @@ -28,6 +28,13 @@ #ifndef __ALSA_RAWMIDI_H #define __ALSA_RAWMIDI_H +#include + +#include + +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/seq.h b/include/seq.h index 5082ad0ad..b4e6acedc 100644 --- a/include/seq.h +++ b/include/seq.h @@ -31,6 +31,9 @@ #include "ump.h" +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/timer.h b/include/timer.h index dc5ca69e5..99ce024ff 100644 --- a/include/timer.h +++ b/include/timer.h @@ -28,6 +28,13 @@ #ifndef __ALSA_TIMER_H #define __ALSA_TIMER_H +#include + +#include + +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/topology.h b/include/topology.h index a590d1a8b..99e7e105d 100644 --- a/include/topology.h +++ b/include/topology.h @@ -22,6 +22,7 @@ #define __ALSA_TOPOLOGY_H #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/ump_msg.h b/include/ump_msg.h index 5f0a45acd..8d60354a0 100644 --- a/include/ump_msg.h +++ b/include/ump_msg.h @@ -10,6 +10,7 @@ #define __ALSA_UMP_MSG_H #include +#include #ifdef __cplusplus extern "C" {