From feb9c4cdecb24d6d52496487aa7f074651c4907a Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 30 Aug 2023 18:48:23 +0200 Subject: [PATCH] reshuffle included files to include config.h as first config.h may contain defines like _FILE_OFFSET_BITS which influence the system wide include files (off_t types, open -> open64 function usage etc.). Related: https://github.com/alsa-project/alsa-utils/pull/223 Signed-off-by: Jaroslav Kysela --- alsaloop/alsaloop.c | 1 + alsaloop/control.c | 1 + alsaloop/effect-sweep.c | 1 + alsaloop/pcmjob.c | 1 + amidi/amidi.c | 4 ++-- amixer/amixer.c | 1 + axfer/container.h | 2 ++ axfer/xfer.h | 4 ++-- bat/alsa.c | 3 ++- bat/analyze.c | 3 ++- bat/common.c | 3 ++- bat/convert.c | 1 + bat/latencytest.c | 2 ++ bat/signal.c | 2 ++ bat/tinyalsa.c | 3 ++- iecset/iecset.c | 1 + nhlt/nhlt-dmic-info.c | 5 +++-- seq/aconnect/aconnect.c | 2 +- seq/aplaymidi/aplaymidi.c | 2 +- seq/aseqdump/aseqdump.c | 2 +- seq/aseqnet/aseqnet.c | 2 +- speaker-test/pink.c | 1 + speaker-test/speaker-test.c | 3 ++- topology/nhlt/intel/dmic-nhlt.c | 1 + topology/nhlt/intel/dmic/dmic-debug.c | 1 + topology/nhlt/intel/dmic/dmic-process.c | 1 + topology/nhlt/intel/intel-nhlt.c | 1 + topology/nhlt/intel/ssp-nhlt.c | 1 + topology/nhlt/intel/ssp/ssp-debug.c | 1 + topology/nhlt/intel/ssp/ssp-process.c | 1 + topology/nhlt/nhlt-processor.c | 1 + topology/pre-process-class.c | 1 + topology/pre-process-dai.c | 1 + topology/pre-process-object.c | 1 + topology/pre-processor.c | 1 + topology/topology.c | 1 + 36 files changed, 48 insertions(+), 15 deletions(-) diff --git a/alsaloop/alsaloop.c b/alsaloop/alsaloop.c index 17cb00c..b10733e 100644 --- a/alsaloop/alsaloop.c +++ b/alsaloop/alsaloop.c @@ -20,6 +20,7 @@ * */ +#include "aconfig.h" #include #include #include diff --git a/alsaloop/control.c b/alsaloop/control.c index 137d481..d3a7718 100644 --- a/alsaloop/control.c +++ b/alsaloop/control.c @@ -21,6 +21,7 @@ * */ +#include "aconfig.h" #include #include #include diff --git a/alsaloop/effect-sweep.c b/alsaloop/effect-sweep.c index bb5c766..47bdcd5 100644 --- a/alsaloop/effect-sweep.c +++ b/alsaloop/effect-sweep.c @@ -18,6 +18,7 @@ * */ +#include "aconfig.h" #include #include diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c index 5e616a1..be71971 100644 --- a/alsaloop/pcmjob.c +++ b/alsaloop/pcmjob.c @@ -21,6 +21,7 @@ * */ +#include "aconfig.h" #include #include #include diff --git a/amidi/amidi.c b/amidi/amidi.c index a8fa84b..f930ca8 100644 --- a/amidi/amidi.c +++ b/amidi/amidi.c @@ -20,6 +20,8 @@ */ #define _GNU_SOURCE +#include "aconfig.h" +#include "version.h" #include #include #include @@ -37,8 +39,6 @@ #include #include #include -#include "aconfig.h" -#include "version.h" #define NSEC_PER_SEC 1000000000L diff --git a/amixer/amixer.c b/amixer/amixer.c index 1a49d48..8b8000b 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -18,6 +18,7 @@ * */ +#include "aconfig.h" #include #include #include diff --git a/axfer/container.h b/axfer/container.h index ab162c8..3dd466a 100644 --- a/axfer/container.h +++ b/axfer/container.h @@ -9,6 +9,8 @@ #ifndef __ALSA_UTILS_AXFER_CONTAINER__H_ #define __ALSA_UTILS_AXFER_CONTAINER__H_ +#include "aconfig.h" + #define _LARGEFILE64_SOURCE #include diff --git a/axfer/xfer.h b/axfer/xfer.h index 24349cd..b5a0e29 100644 --- a/axfer/xfer.h +++ b/axfer/xfer.h @@ -9,12 +9,12 @@ #ifndef __ALSA_UTILS_AXFER_XFER__H_ #define __ALSA_UTILS_AXFER_XFER__H_ +#include "aconfig.h" + #include "mapper.h" #include -#include "aconfig.h" - enum xfer_type { XFER_TYPE_UNSUPPORTED = -1, XFER_TYPE_LIBASOUND = 0, diff --git a/bat/alsa.c b/bat/alsa.c index d05c47e..67489c4 100644 --- a/bat/alsa.c +++ b/bat/alsa.c @@ -13,6 +13,8 @@ * */ +#include "aconfig.h" + #include #include #include @@ -22,7 +24,6 @@ #include -#include "aconfig.h" #include "gettext.h" #include "common.h" diff --git a/bat/analyze.c b/bat/analyze.c index 211dfc1..6867880 100644 --- a/bat/analyze.c +++ b/bat/analyze.c @@ -13,6 +13,8 @@ * */ +#include "aconfig.h" + #include #include #include @@ -22,7 +24,6 @@ #include #include -#include "aconfig.h" #include "gettext.h" #include "common.h" diff --git a/bat/common.c b/bat/common.c index 47c3ea5..9ff9405 100644 --- a/bat/common.c +++ b/bat/common.c @@ -13,13 +13,14 @@ * */ +#include "aconfig.h" + #include #include #include #include #include -#include "aconfig.h" #include "gettext.h" #include "common.h" diff --git a/bat/convert.c b/bat/convert.c index f555389..c502ae5 100644 --- a/bat/convert.c +++ b/bat/convert.c @@ -13,6 +13,7 @@ * */ +#include "aconfig.h" #include #include #include diff --git a/bat/latencytest.c b/bat/latencytest.c index 8c10efb..7c9db61 100644 --- a/bat/latencytest.c +++ b/bat/latencytest.c @@ -13,6 +13,8 @@ * */ +#include "aconfig.h" + #include #include #include diff --git a/bat/signal.c b/bat/signal.c index c9b5c7b..da5368c 100644 --- a/bat/signal.c +++ b/bat/signal.c @@ -20,6 +20,8 @@ * stable indefinitely */ +#include "aconfig.h" + #include #include #include diff --git a/bat/tinyalsa.c b/bat/tinyalsa.c index f1c20fa..cde5709 100644 --- a/bat/tinyalsa.c +++ b/bat/tinyalsa.c @@ -13,6 +13,8 @@ * */ +#include "aconfig.h" + #include #include #include @@ -22,7 +24,6 @@ #include -#include "aconfig.h" #include "gettext.h" #include "common.h" diff --git a/iecset/iecset.c b/iecset/iecset.c index 9b3c1d7..65e9425 100644 --- a/iecset/iecset.c +++ b/iecset/iecset.c @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "aconfig.h" #include #include #include diff --git a/nhlt/nhlt-dmic-info.c b/nhlt/nhlt-dmic-info.c index 8d3c538..3f6c64d 100644 --- a/nhlt/nhlt-dmic-info.c +++ b/nhlt/nhlt-dmic-info.c @@ -23,6 +23,7 @@ * */ +#include "aconfig.h" #include #include #include @@ -271,7 +272,7 @@ static int nhlt_to_json(FILE *out, const char *nhlt_file) */ #define PROG "nhlt-dmic-info" -#define VERSION "1" +#define PROG_VERSION "1" #define NHLT_FILE "/sys/firmware/acpi/tables/NHLT" @@ -380,7 +381,7 @@ int main(int argc, char *argv[]) debug = 1; break; case 'v': - printf(PROG " version " VERSION "\n"); + printf(PROG " version " PROG_VERSION "\n"); res = EXIT_SUCCESS; goto out; case '?': // error msg already printed diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c index eeae4b5..3a10de9 100644 --- a/seq/aconnect/aconnect.c +++ b/seq/aconnect/aconnect.c @@ -15,6 +15,7 @@ * */ +#include "aconfig.h" #include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include "aconfig.h" #include "gettext.h" #ifdef SND_SEQ_PORT_CAP_INACTIVE diff --git a/seq/aplaymidi/aplaymidi.c b/seq/aplaymidi/aplaymidi.c index 88d4e63..a7293d3 100644 --- a/seq/aplaymidi/aplaymidi.c +++ b/seq/aplaymidi/aplaymidi.c @@ -21,6 +21,7 @@ /* TODO: sequencer queue timer selection */ +#include "aconfig.h" #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include "aconfig.h" #include "version.h" #ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION #include diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c index c66f935..8455ecb 100644 --- a/seq/aseqdump/aseqdump.c +++ b/seq/aseqdump/aseqdump.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "aconfig.h" #include #include #include @@ -27,7 +28,6 @@ #include #include #include -#include "aconfig.h" #include "version.h" #ifdef HAVE_SEQ_CLIENT_INFO_GET_MIDI_VERSION #include diff --git a/seq/aseqnet/aseqnet.c b/seq/aseqnet/aseqnet.c index 650502c..f40de7d 100644 --- a/seq/aseqnet/aseqnet.c +++ b/seq/aseqnet/aseqnet.c @@ -15,6 +15,7 @@ * */ +#include "aconfig.h" #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include "aconfig.h" #include "gettext.h" /* diff --git a/speaker-test/pink.c b/speaker-test/pink.c index ef30755..63fe296 100644 --- a/speaker-test/pink.c +++ b/speaker-test/pink.c @@ -24,6 +24,7 @@ Copyleft 1999 Phil Burk - No rights reserved. */ +#include "aconfig.h" #include #include #include "pink.h" diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c index 8d25a7d..a13e737 100644 --- a/speaker-test/speaker-test.c +++ b/speaker-test/speaker-test.c @@ -36,6 +36,8 @@ * $Id: speaker_test.c,v 1.00 2003/11/26 19:43:38 jcdutton Exp $ */ +#include "aconfig.h" + #include #include #include @@ -53,7 +55,6 @@ #include #include #include "pink.h" -#include "aconfig.h" #include "gettext.h" #include "version.h" #include "os_compat.h" diff --git a/topology/nhlt/intel/dmic-nhlt.c b/topology/nhlt/intel/dmic-nhlt.c index fe2c790..70a22e3 100644 --- a/topology/nhlt/intel/dmic-nhlt.c +++ b/topology/nhlt/intel/dmic-nhlt.c @@ -4,6 +4,7 @@ // // Author: Jaska Uimonen +#include "aconfig.h" #include #include #include diff --git a/topology/nhlt/intel/dmic/dmic-debug.c b/topology/nhlt/intel/dmic/dmic-debug.c index beea23f..f99d308 100644 --- a/topology/nhlt/intel/dmic/dmic-debug.c +++ b/topology/nhlt/intel/dmic/dmic-debug.c @@ -5,6 +5,7 @@ // Author: Seppo Ingalsuo // Jaska Uimonen +#include "aconfig.h" #include #include #include "dmic-debug.h" diff --git a/topology/nhlt/intel/dmic/dmic-process.c b/topology/nhlt/intel/dmic/dmic-process.c index 3bfbf92..67623ef 100644 --- a/topology/nhlt/intel/dmic/dmic-process.c +++ b/topology/nhlt/intel/dmic/dmic-process.c @@ -5,6 +5,7 @@ // Author: Seppo Ingalsuo // Jaska Uimonen +#include "aconfig.h" #include #include #include diff --git a/topology/nhlt/intel/intel-nhlt.c b/topology/nhlt/intel/intel-nhlt.c index 21d44da..b245afc 100644 --- a/topology/nhlt/intel/intel-nhlt.c +++ b/topology/nhlt/intel/intel-nhlt.c @@ -4,6 +4,7 @@ // // Author: Jaska Uimonen +#include "aconfig.h" #include "intel-nhlt.h" static int get_int_val(snd_config_t *input, long *int_val, snd_config_t *top) diff --git a/topology/nhlt/intel/ssp-nhlt.c b/topology/nhlt/intel/ssp-nhlt.c index 6cde33c..1137819 100644 --- a/topology/nhlt/intel/ssp-nhlt.c +++ b/topology/nhlt/intel/ssp-nhlt.c @@ -4,6 +4,7 @@ // // Author: Jaska Uimonen +#include "aconfig.h" #include #include #include diff --git a/topology/nhlt/intel/ssp/ssp-debug.c b/topology/nhlt/intel/ssp/ssp-debug.c index 36f50dd..8c64675 100644 --- a/topology/nhlt/intel/ssp/ssp-debug.c +++ b/topology/nhlt/intel/ssp/ssp-debug.c @@ -4,6 +4,7 @@ // // Author: Jaska Uimonen +#include "aconfig.h" #include #include #include "ssp-debug.h" diff --git a/topology/nhlt/intel/ssp/ssp-process.c b/topology/nhlt/intel/ssp/ssp-process.c index 32fe322..9cda5c3 100644 --- a/topology/nhlt/intel/ssp/ssp-process.c +++ b/topology/nhlt/intel/ssp/ssp-process.c @@ -7,6 +7,7 @@ // Rander Wang // Jaska Uimonen +#include "aconfig.h" #include #include #include diff --git a/topology/nhlt/nhlt-processor.c b/topology/nhlt/nhlt-processor.c index 57e9edd..567fa5c 100644 --- a/topology/nhlt/nhlt-processor.c +++ b/topology/nhlt/nhlt-processor.c @@ -4,6 +4,7 @@ // // Author: Jaska Uimonen +#include "aconfig.h" #include #include #include diff --git a/topology/pre-process-class.c b/topology/pre-process-class.c index 4f07a8b..d883d05 100644 --- a/topology/pre-process-class.c +++ b/topology/pre-process-class.c @@ -17,6 +17,7 @@ The full GNU General Public License is included in this distribution in the file called LICENSE.GPL. */ +#include "aconfig.h" #include #include #include diff --git a/topology/pre-process-dai.c b/topology/pre-process-dai.c index 9bf1a1d..343ce81 100644 --- a/topology/pre-process-dai.c +++ b/topology/pre-process-dai.c @@ -17,6 +17,7 @@ The full GNU General Public License is included in this distribution in the file called LICENSE.GPL. */ +#include "aconfig.h" #include #include #include diff --git a/topology/pre-process-object.c b/topology/pre-process-object.c index b63402b..48555e7 100644 --- a/topology/pre-process-object.c +++ b/topology/pre-process-object.c @@ -17,6 +17,7 @@ The full GNU General Public License is included in this distribution in the file called LICENSE.GPL. */ +#include "aconfig.h" #include #include #include diff --git a/topology/pre-processor.c b/topology/pre-processor.c index 0b3d2b5..3903dee 100644 --- a/topology/pre-processor.c +++ b/topology/pre-processor.c @@ -18,6 +18,7 @@ in the file called LICENSE.GPL. */ +#include "aconfig.h" #include #include #include diff --git a/topology/topology.c b/topology/topology.c index c0c5270..1840ffe 100644 --- a/topology/topology.c +++ b/topology/topology.c @@ -20,6 +20,7 @@ in the file called LICENSE.GPL. */ +#include "aconfig.h" #include #include #include