From martin at martin.st Fri Nov 3 10:03:52 2017 From: martin at martin.st (Martin Storsjo) Date: Fri, 3 Nov 2017 12:03:52 +0200 Subject: [Speex-dev] [PATCH] Check for _WIN32 instead of WIN32 in preprocessor checks Message-ID: <20171103100352.14732-1-martin@martin.st> _WIN32 is always defined by the compiler automatically when targeting that platform, while WIN32 only is defined automatically in some configurations, and e.g. in MSVC only ever is defined in project files (if at all). Some other checks in the codebase already check for both WIN32 and _WIN32; those are left untouched. --- include/speex/speex.h | 2 +- libspeex/stack_alloc.h | 2 +- src/skeleton.h | 2 +- tmv/config.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/speex/speex.h b/include/speex/speex.h index 28c4b44d..34919e2f 100644 --- a/include/speex/speex.h +++ b/include/speex/speex.h @@ -412,7 +412,7 @@ extern const SpeexMode * const speex_mode_list[SPEEX_NB_MODES]; /** Obtain one of the modes available */ const SpeexMode * speex_lib_get_mode (int mode); -#ifndef WIN32 +#ifndef _WIN32 /* We actually override the function in the narrowband case so that we can avoid linking in the wideband stuff */ #define speex_lib_get_mode(mode) ((mode)==SPEEX_MODEID_NB ? &speex_nb_mode : speex_lib_get_mode (mode)) #endif diff --git a/libspeex/stack_alloc.h b/libspeex/stack_alloc.h index 5264e666..f6eb3f6e 100644 --- a/libspeex/stack_alloc.h +++ b/libspeex/stack_alloc.h @@ -36,7 +36,7 @@ #define STACK_ALLOC_H #ifdef USE_ALLOCA -# ifdef WIN32 +# ifdef _WIN32 # include # else # ifdef HAVE_ALLOCA_H diff --git a/src/skeleton.h b/src/skeleton.h index f07d7a3e..1559f8f5 100644 --- a/src/skeleton.h +++ b/src/skeleton.h @@ -10,7 +10,7 @@ extern "C" { #endif -#ifdef WIN32 +#ifdef _WIN32 #define snprintf _snprintf #endif diff --git a/tmv/config.h b/tmv/config.h index ea7abe1d..df61d4d0 100644 --- a/tmv/config.h +++ b/tmv/config.h @@ -4,7 +4,7 @@ #define USE_COMPACT_KISS_FFT //#define USE_KISS_FFT -#ifdef WIN32 +#ifdef _WIN32 //#define FIXED_POINT -- 2.13.6 (Apple Git-96) From martin at martin.st Fri Nov 3 10:11:13 2017 From: martin at martin.st (Martin Storsjo) Date: Fri, 3 Nov 2017 12:11:13 +0200 Subject: [Speex-dev] [PATCH] Add a (void) parameter list to a function declaration Message-ID: <20171103101113.31449-1-martin@martin.st> This fixes warnings in calling code about "this function declaration is not a prototype". --- include/speex/speex_stereo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/speex/speex_stereo.h b/include/speex/speex_stereo.h index 5844f5a1..12af2bbf 100644 --- a/include/speex/speex_stereo.h +++ b/include/speex/speex_stereo.h @@ -61,7 +61,7 @@ typedef struct SpeexStereoState { #define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0} /** Initialise/create a stereo stereo state */ -SpeexStereoState *speex_stereo_state_init(); +SpeexStereoState *speex_stereo_state_init(void); /** Reset/re-initialise an already allocated stereo state */ void speex_stereo_state_reset(SpeexStereoState *stereo); -- 2.13.6 (Apple Git-96) From tmatth at videolan.org Fri Nov 3 14:51:25 2017 From: tmatth at videolan.org (Tristan Matthews) Date: Fri, 3 Nov 2017 10:51:25 -0400 Subject: [Speex-dev] [PATCH] Add a (void) parameter list to a function declaration In-Reply-To: <20171103101113.31449-1-martin@martin.st> References: <20171103101113.31449-1-martin@martin.st> Message-ID: On Fri, Nov 3, 2017 at 6:11 AM, Martin Storsjo wrote: > This fixes warnings in calling code about "this function declaration > is not a prototype". Applied, thanks. Best, Tristan > --- > include/speex/speex_stereo.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/speex/speex_stereo.h b/include/speex/speex_stereo.h > index 5844f5a1..12af2bbf 100644 > --- a/include/speex/speex_stereo.h > +++ b/include/speex/speex_stereo.h > @@ -61,7 +61,7 @@ typedef struct SpeexStereoState { > #define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0} > > /** Initialise/create a stereo stereo state */ > -SpeexStereoState *speex_stereo_state_init(); > +SpeexStereoState *speex_stereo_state_init(void); > > /** Reset/re-initialise an already allocated stereo state */ > void speex_stereo_state_reset(SpeexStereoState *stereo); > -- > 2.13.6 (Apple Git-96) > > _______________________________________________ > Speex-dev mailing list > Speex-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev From tmatth at videolan.org Fri Nov 3 14:51:48 2017 From: tmatth at videolan.org (Tristan Matthews) Date: Fri, 3 Nov 2017 10:51:48 -0400 Subject: [Speex-dev] [PATCH] Check for _WIN32 instead of WIN32 in preprocessor checks In-Reply-To: <20171103100352.14732-1-martin@martin.st> References: <20171103100352.14732-1-martin@martin.st> Message-ID: On Fri, Nov 3, 2017 at 6:03 AM, Martin Storsjo wrote: > _WIN32 is always defined by the compiler automatically when targeting > that platform, while WIN32 only is defined automatically in some > configurations, and e.g. in MSVC only ever is defined in project files > (if at all). > > Some other checks in the codebase already check for both WIN32 and > _WIN32; those are left untouched. Applied, thanks. Best, Tristan > --- > include/speex/speex.h | 2 +- > libspeex/stack_alloc.h | 2 +- > src/skeleton.h | 2 +- > tmv/config.h | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/speex/speex.h b/include/speex/speex.h > index 28c4b44d..34919e2f 100644 > --- a/include/speex/speex.h > +++ b/include/speex/speex.h > @@ -412,7 +412,7 @@ extern const SpeexMode * const speex_mode_list[SPEEX_NB_MODES]; > /** Obtain one of the modes available */ > const SpeexMode * speex_lib_get_mode (int mode); > > -#ifndef WIN32 > +#ifndef _WIN32 > /* We actually override the function in the narrowband case so that we can avoid linking in the wideband stuff */ > #define speex_lib_get_mode(mode) ((mode)==SPEEX_MODEID_NB ? &speex_nb_mode : speex_lib_get_mode (mode)) > #endif > diff --git a/libspeex/stack_alloc.h b/libspeex/stack_alloc.h > index 5264e666..f6eb3f6e 100644 > --- a/libspeex/stack_alloc.h > +++ b/libspeex/stack_alloc.h > @@ -36,7 +36,7 @@ > #define STACK_ALLOC_H > > #ifdef USE_ALLOCA > -# ifdef WIN32 > +# ifdef _WIN32 > # include > # else > # ifdef HAVE_ALLOCA_H > diff --git a/src/skeleton.h b/src/skeleton.h > index f07d7a3e..1559f8f5 100644 > --- a/src/skeleton.h > +++ b/src/skeleton.h > @@ -10,7 +10,7 @@ > extern "C" { > #endif > > -#ifdef WIN32 > +#ifdef _WIN32 > #define snprintf _snprintf > #endif > > diff --git a/tmv/config.h b/tmv/config.h > index ea7abe1d..df61d4d0 100644 > --- a/tmv/config.h > +++ b/tmv/config.h > @@ -4,7 +4,7 @@ > #define USE_COMPACT_KISS_FFT > //#define USE_KISS_FFT > > -#ifdef WIN32 > +#ifdef _WIN32 > > //#define FIXED_POINT > > -- > 2.13.6 (Apple Git-96) > > _______________________________________________ > Speex-dev mailing list > Speex-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev