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-lib/pull/333
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2023-08-30 18:22:59 +02:00
parent 6142ff0ca7
commit ad3a8b8b31
77 changed files with 92 additions and 101 deletions

View file

@ -18,6 +18,8 @@
*
*/
#include "aserver.h"
#include <sys/shm.h>
#include <sys/socket.h>
#include <poll.h>
@ -33,7 +35,6 @@
#include <limits.h>
#include <signal.h>
#include "aserver.h"
char *command;

View file

@ -18,9 +18,9 @@
*
*/
#include <netdb.h>
#include "../src/pcm/pcm_local.h"
#include "../src/control/control_local.h"
#include <netdb.h>
int snd_receive_fd(int sock, void *data, size_t len, int *fd);

View file

@ -21,6 +21,12 @@
*
*/
#define alisp_seq_iterator alisp_object
#include "local.h"
#include "alisp.h"
#include "alisp_local.h"
#include <assert.h>
#include <limits.h>
@ -31,11 +37,6 @@
#include <math.h>
#include <err.h>
#define alisp_seq_iterator alisp_object
#include "local.h"
#include "alisp.h"
#include "alisp_local.h"
struct alisp_object alsa_lisp_nil;
struct alisp_object alsa_lisp_t;

View file

@ -31,12 +31,12 @@
*
*/
#include "local.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "local.h"
typedef long long value_type_t;

View file

@ -74,12 +74,12 @@
*/
#include "local.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "local.h"
/**
* \brief Gets the boolean value from the given ASCII string.

View file

@ -25,6 +25,7 @@
*
*/
#include "control_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -32,7 +33,6 @@
#include <ctype.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "control_local.h"
#ifndef DOC_HIDDEN
#define SND_FILE_CONTROL ALSA_DEVICE_DIRECTORY "controlC%i"

View file

@ -185,6 +185,7 @@ in-kernel implementations utilize this feature for I/O operations. This is
against the original design.
*/
#include "control_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
@ -196,7 +197,6 @@ against the original design.
#include <poll.h>
#include <stdbool.h>
#include <limits.h>
#include "control_local.h"
/**
* \brief get identifier of CTL handle

View file

@ -27,12 +27,12 @@
*
*/
#include "control_local.h"
#include "control_external.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "control_local.h"
#include "control_external.h"
#ifndef PIC
/* entry for static linking */

View file

@ -26,6 +26,7 @@
*
*/
#include "control_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -33,7 +34,6 @@
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "control_local.h"
#ifndef PIC
/* entry for static linking */

View file

@ -25,13 +25,13 @@
*
*/
#include "control_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
#include "control_local.h"
#if 0
#define REMAP_DEBUG 1

View file

@ -25,11 +25,11 @@
*
*/
#include "control_local.h"
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "control_local.h"
/* Function to convert from percentage to volume. val = percentage */

View file

@ -26,12 +26,12 @@
*
*/
#include "control_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include "control_local.h"
static void __fill_eld_ctl_id(snd_ctl_elem_id_t *id, int dev, int subdev)
{

View file

@ -42,13 +42,13 @@ to reduce overhead accessing the real controls in kernel drivers.
*/
#include "control_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "control_local.h"
#ifdef HAVE_LIBPTHREAD
#include <pthread.h>
#endif

View file

@ -26,6 +26,7 @@
*
*/
#include "control_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -33,7 +34,6 @@
#ifndef HAVE_SOFT_FLOAT
#include <math.h>
#endif
#include "control_local.h"
#ifndef DOC_HIDDEN
/* convert to index of integer array */

View file

@ -27,8 +27,8 @@
*
*/
#include "list.h"
#include "local.h"
#include "list.h"
#ifdef HAVE_LIBPTHREAD
#include <pthread.h>
#endif

View file

@ -28,11 +28,11 @@
*
*/
#include "local.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "local.h"
/**
* Array of error codes in US ASCII.

View file

@ -28,13 +28,13 @@
*
*/
#include "hwdep_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "hwdep_local.h"
static int snd_hwdep_open_conf(snd_hwdep_t **hwdep,
const char *name, snd_config_t *hwdep_root,

View file

@ -19,13 +19,13 @@
*
*/
#include "hwdep_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "hwdep_local.h"
#ifndef PIC
/* entry for static linking */

View file

@ -19,10 +19,10 @@
*
*/
#include "local.h"
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include "local.h"
typedef struct {
int (*close)(snd_hwdep_t *hwdep);

View file

@ -27,11 +27,11 @@
*
*/
#include "local.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "local.h"
#ifndef DOC_HIDDEN

View file

@ -39,13 +39,13 @@ This is an abstraction layer over the hcontrol layer.
*/
#include "mixer_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "mixer_local.h"
#ifndef DOC_HIDDEN
typedef struct _snd_mixer_slave {

View file

@ -29,6 +29,8 @@
*
*/
#include "mixer_local.h"
#include "mixer_simple.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -36,9 +38,6 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <math.h>
#include "config.h"
#include "mixer_local.h"
#include "mixer_simple.h"
/**
* \brief Register mixer simple element class

View file

@ -27,6 +27,8 @@
*
*/
#include "mixer_local.h"
#include "mixer_simple.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -35,8 +37,6 @@
#include <sys/ioctl.h>
#include <math.h>
#include <dlfcn.h>
#include "mixer_local.h"
#include "mixer_simple.h"
#ifndef DOC_HIDDEN

View file

@ -29,6 +29,8 @@
*
*/
#include "local.h"
#include "mixer_simple.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -38,9 +40,6 @@
#include <assert.h>
#include <math.h>
#include <limits.h>
#include "local.h"
#include "config.h"
#include "mixer_simple.h"
#ifndef DOC_HIDDEN

View file

@ -30,10 +30,10 @@
*
*/
#include "local.h"
#include <stdarg.h>
#include <limits.h>
#include <sys/stat.h>
#include "local.h"
/**
* \brief This function is unimplemented.

View file

@ -27,11 +27,11 @@
*
*/
#include "local.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "local.h"
#ifndef DOC_HIDDEN
typedef struct _snd_output_ops {

View file

@ -22,9 +22,9 @@
#define SND_INTERVAL_C
#define SND_INTERVAL_INLINE
#include "pcm_local.h"
#include <sys/types.h>
#include <limits.h>
#include "pcm_local.h"
static inline void div64_32(uint64_t *n, uint32_t d, uint32_t *rem)
{

View file

@ -22,6 +22,7 @@
#define SND_MASK_C
#define SND_MASK_INLINE
#include "config.h"
#include <sys/types.h>
#include <limits.h>
#include "pcm_local.h"

View file

@ -658,6 +658,7 @@ playback devices.
\example ../../test/latency.c
*/
#include "pcm_local.h"
#include <stdio.h>
#include <string.h>
#if HAVE_MALLOC_H
@ -669,7 +670,6 @@ playback devices.
#include <poll.h>
#include <sys/mman.h>
#include <limits.h>
#include "pcm_local.h"
#ifndef DOC_HIDDEN
/* return specific error codes for known bad PCM states */

View file

@ -56,11 +56,10 @@ IMA compatibility project proceedings, Vol 2, Issue 2, May 1992.
come across a good description of XA yet.
*/
#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "plugin_ops.h"
#include "bswap.h"
#ifndef PIC
/* entry for static linking */

View file

@ -26,8 +26,8 @@
*
*/
#include "bswap.h"
#include "pcm_local.h"
#include "bswap.h"
#include "pcm_plugin.h"
#include "plugin_ops.h"

View file

@ -26,9 +26,9 @@
*
*/
#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "bswap.h"
#ifndef PIC
/* entry for static linking */

View file

@ -26,6 +26,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>

View file

@ -26,11 +26,11 @@
*
*/
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "bswap.h"
#include <ctype.h>
#include <string.h>
#include "pcm_local.h"
#include "pcm_plugin.h"
#ifndef PIC
/* entry for static linking */

View file

@ -26,10 +26,10 @@
*
*/
#include <sys/ioctl.h>
#include <limits.h>
#include "pcm_local.h"
#include "pcm_generic.h"
#include <sys/ioctl.h>
#include <limits.h>
#ifndef DOC_HIDDEN

View file

@ -27,6 +27,9 @@
*
*/
#include "pcm_local.h"
#include "../control/control_local.h"
#include "../timer/timer_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@ -37,9 +40,6 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include "pcm_local.h"
#include "../control/control_local.h"
#include "../timer/timer_local.h"
//#define DEBUG_RW /* use to debug readi/writei/readn/writen */
//#define DEBUG_MMAP /* debug mmap_commit */

View file

@ -26,11 +26,10 @@
*
*/
#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "plugin_ops.h"
#include "bswap.h"
#ifndef PIC
/* entry for static linking */

View file

@ -32,12 +32,11 @@
* http://www.medianet.ag
*/
#include "config.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include <dirent.h>
#include <locale.h>
#include <math.h>
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "ladspa.h"

View file

@ -26,11 +26,10 @@
*
*/
#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "plugin_ops.h"
#include "bswap.h"
#ifndef DOC_HIDDEN

View file

@ -26,11 +26,10 @@
*
*/
#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "plugin_ops.h"
#include "bswap.h"
#ifndef PIC
/* entry for static linking */

View file

@ -27,12 +27,12 @@
*/
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "bswap.h"
#include <time.h>
#include <pthread.h>
#include <dlfcn.h>
#include "pcm_local.h"
#include "pcm_plugin.h"
#define atomic_read(ptr) __atomic_load_n(ptr, __ATOMIC_SEQ_CST )
#define atomic_add(ptr, n) __atomic_add_fetch(ptr, n, __ATOMIC_SEQ_CST)

View file

@ -19,12 +19,12 @@
*
*/
#include "pcm_local.h"
#include "bswap.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "bswap.h"
#include "pcm_local.h"
/**

View file

@ -18,7 +18,7 @@
*
*/
#include "config.h"
#include "pcm_local.h"
#include <stdio.h>
#if HAVE_MALLOC_H
#include <malloc.h>
@ -29,7 +29,6 @@
#ifdef HAVE_SYS_SHM_H
#include <sys/shm.h>
#endif
#include "pcm_local.h"
void snd_pcm_mmap_appl_backward(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
{

View file

@ -26,11 +26,10 @@
*
*/
#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "plugin_ops.h"
#include "bswap.h"
#ifndef PIC
/* entry for static linking */

View file

@ -26,13 +26,13 @@
*
*/
#include "pcm_local.h"
#include "pcm_generic.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include "pcm_local.h"
#include "pcm_generic.h"
#ifndef PIC
/* entry for static linking */

View file

@ -26,10 +26,10 @@
*
*/
#include "bswap.h"
#include <limits.h>
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "bswap.h"
#include <limits.h>
#ifndef PIC
/* entry for static linking */

View file

@ -82,9 +82,9 @@ pcm.rate44100Hz {
*/
#include <limits.h>
#include "pcm_local.h"
#include "pcm_plugin.h"
#include <limits.h>
#ifndef DOC_HIDDEN

View file

@ -27,13 +27,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <inttypes.h>
#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "pcm_rate.h"
#include "plugin_ops.h"
#include "bswap.h"
#include <inttypes.h>
#if 0
#define DEBUG_REFINE

View file

@ -20,13 +20,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <inttypes.h>
#include "bswap.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "pcm_rate.h"
#include "plugin_ops.h"
#include "bswap.h"
#include <inttypes.h>
/* LINEAR_DIV needs to be large enough to handle resampling from 768000 -> 8000 */

View file

@ -26,12 +26,11 @@
*
*/
#include "bswap.h"
#include <math.h>
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "plugin_ops.h"
#include "bswap.h"
#include <math.h>
#ifndef PIC
/* entry for static linking */

View file

@ -26,6 +26,7 @@
*
*/
#include "pcm_local.h"
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
@ -36,7 +37,6 @@
#include <sys/socket.h>
#include <poll.h>
#include <pthread.h>
#include "pcm_local.h"
#ifndef PIC
/* entry for static linking */

View file

@ -26,11 +26,10 @@
*
*/
#include "bswap.h"
#include <math.h>
#include "pcm_local.h"
#include "pcm_plugin.h"
#include "bswap.h"
#include <math.h>
#include <sound/tlv.h>
#ifndef PIC

View file

@ -20,6 +20,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View file

@ -25,6 +25,7 @@
*
*/
#include "local.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@ -37,7 +38,6 @@
#include <sys/ioctl.h>
#include <net/if.h>
#include <netdb.h>
#include "local.h"
#ifndef DOC_HIDDEN
int snd_send_fd(int sock, void *data, size_t len, int fd)

View file

@ -17,7 +17,6 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include "list.h"
#include "tplg_local.h"
/* write a block, track the position */

View file

@ -17,7 +17,6 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include "list.h"
#include "tplg_local.h"
/* mapping of channel text names to types */

View file

@ -17,7 +17,6 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include "list.h"
#include "tplg_local.h"
#define ENUM_VAL_SIZE (SNDRV_CTL_ELEM_ID_NAME_MAXLEN >> 2)

View file

@ -17,7 +17,6 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include "list.h"
#include "tplg_local.h"
/* mapping of widget text names to types */

View file

@ -17,7 +17,6 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include "list.h"
#include "tplg_local.h"
#include <ctype.h>

View file

@ -15,7 +15,6 @@
Authors: Jaroslav Kysela <perex@perex.cz>
*/
#include "list.h"
#include "tplg_local.h"
int tplg_decode_template(snd_tplg_t *tplg,

View file

@ -17,7 +17,6 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include "list.h"
#include "tplg_local.h"
struct tplg_table tplg_table[] = {

View file

@ -15,7 +15,6 @@
Authors: Jaroslav Kysela <perex@perex.cz>
*/
#include "list.h"
#include "tplg_local.h"
/* verbose output detailing each object size and file position */

View file

@ -17,7 +17,6 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include "list.h"
#include "tplg_local.h"
/* mapping of kcontrol text names to types */

View file

@ -17,9 +17,8 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include <sys/stat.h>
#include "list.h"
#include "tplg_local.h"
#include <sys/stat.h>
/*
* Get integer value

View file

@ -17,7 +17,6 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#include "list.h"
#include "tplg_local.h"
#define RATE(v) [SND_PCM_RATE_##v] = #v

View file

@ -15,7 +15,6 @@
Authors: Jaroslav Kysela <perex@perex.cz>
*/
#include "list.h"
#include "tplg_local.h"
#define SAVE_ALLOC_SHIFT (13) /* 8192 bytes */

View file

@ -18,7 +18,6 @@
*/
#include "list.h"
#include "tplg_local.h"
#define TEXT_SIZE_MAX \

View file

@ -10,11 +10,12 @@
* Lesser General Public License for more details.
*/
#include "local.h"
#include <limits.h>
#include <stdint.h>
#include <stdbool.h>
#include "local.h"
#include "list.h"
#include "bswap.h"
#include "topology.h"

View file

@ -4,7 +4,7 @@
* helpful to verify the information reported by drivers.
*/
#include "../include/config.h"
#include "config.h"
#include <stdio.h>
#if HAVE_MALLOC_H
#include <malloc.h>

View file

@ -2,6 +2,7 @@
* channel mapping API test program
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
#include "config.h"
#include <stdio.h>
#include <string.h>
#include "../include/asoundlib.h"

View file

@ -27,6 +27,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View file

@ -2,6 +2,8 @@
* This small demo sends a simple sinusoidal wave to your speakers.
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View file

@ -34,6 +34,8 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include <fcntl.h>

View file

@ -1,3 +1,5 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View file

@ -1,3 +1,4 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View file

@ -7,6 +7,7 @@
* Licensed under the terms of the GNU General Public License, version 2.
*/
#include "config.h"
#include "../include/asoundlib.h"
#include <sound/tlv.h>
#include <stdbool.h>