# HG changeset patch # User Matti Hamalainen # Date 1353349938 -7200 # Node ID f8e1de328ac17dfb5780393330b2c5b02d3d2b78 # Parent 600964060bcc086522a88a1f5a0c3076b979451e Fix various compilation related issues, make includes more POSIX compliant, utilize autoconf detected stuff via conditionals as needed. diff -r 600964060bcc -r f8e1de328ac1 configure.ac --- a/configure.ac Mon Nov 19 18:28:52 2012 +0200 +++ b/configure.ac Mon Nov 19 20:32:18 2012 +0200 @@ -61,7 +61,7 @@ AC_HEADER_STDC AC_C_INLINE AC_C_CONST -AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) +AC_CHECK_HEADERS([stdlib.h string.h unistd.h stdarg.h]) AC_TYPE_OFF_T AC_TYPE_SIZE_T diff -r 600964060bcc -r f8e1de328ac1 src/config.h.in --- a/src/config.h.in Mon Nov 19 18:28:52 2012 +0200 +++ b/src/config.h.in Mon Nov 19 20:32:18 2012 +0200 @@ -67,6 +67,9 @@ /* Define if you have XMMS patched with the songpos patch. */ #undef HAVE_SONG_POSITION +/* Define to 1 if you have the header file. */ +#undef HAVE_STDARG_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H diff -r 600964060bcc -r f8e1de328ac1 src/xs_config.c --- a/src/xs_config.c Mon Nov 19 18:28:52 2012 +0200 +++ b/src/xs_config.c Mon Nov 19 20:32:18 2012 +0200 @@ -51,11 +51,9 @@ #define XS_CFG_GET_INT(q,z) xmms_cfg_read_int(cfg, XS_CONFIG_IDENT, q, z) #define XS_CFG_GET_BOOL(q,z) xmms_cfg_read_boolean(cfg, XS_CONFIG_IDENT, q, z) #endif -#include -#include +#include "xs_support.h" #include "xs_glade.h" #include "xs_interface.h" -#include "xs_support.h" #include "xs_backend.h" /* @@ -322,7 +320,7 @@ #elif defined(HAVE_SIDPLAY1) xs_cfg.playerEngine = XS_ENG_SIDPLAY1; xs_cfg.memoryMode = XS_MPU_BANK_SWITCHING; -#else +#elif !defined(HAVE_SIDPLAYFP) #error This should not happen! No emulator engines configured in! #endif diff -r 600964060bcc -r f8e1de328ac1 src/xs_length.c --- a/src/xs_length.c Mon Nov 19 18:28:52 2012 +0200 +++ b/src/xs_length.c Mon Nov 19 20:32:18 2012 +0200 @@ -22,9 +22,6 @@ */ #include "xs_length.h" #include "xs_support.h" -#include -#include -#include /* Free memory allocated for given SLDB node diff -r 600964060bcc -r f8e1de328ac1 src/xs_stil.c --- a/src/xs_stil.c Mon Nov 19 18:28:52 2012 +0200 +++ b/src/xs_stil.c Mon Nov 19 20:32:18 2012 +0200 @@ -22,10 +22,6 @@ */ #include "xs_stil.h" #include "xs_support.h" -#include -#include -#include -#include /* Database handling functions diff -r 600964060bcc -r f8e1de328ac1 src/xs_support.c --- a/src/xs_support.c Mon Nov 19 18:28:52 2012 +0200 +++ b/src/xs_support.c Mon Nov 19 20:32:18 2012 +0200 @@ -25,12 +25,9 @@ -- */ #include "xs_support.h" -#include -#include #ifndef __AUDACIOUS_NEWVFS__ #include #include -#include #endif /* Error messages diff -r 600964060bcc -r f8e1de328ac1 src/xs_support.h --- a/src/xs_support.h Mon Nov 19 18:28:52 2012 +0200 +++ b/src/xs_support.h Mon Nov 19 20:32:18 2012 +0200 @@ -11,7 +11,16 @@ #include #include +#include +#ifdef HAVE_STDARG_H #include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif #ifdef AUDACIOUS_PLUGIN #include