[Commits] SDL: fix building SDL_audiotypecvt.c with gcc < 4.0

libsdl.org revision control commits-owner at libsdl.org
Tue Feb 13 13:29:58 PST 2018


details:   https://hg.libsdl.org/SDL/rev/96157e099383
changeset: 11873:96157e099383
user:      sezero <sezero at users.sourceforge.net>
date:      Mon Feb 12 10:47:00 2018 +0300
description:
fix building SDL_audiotypecvt.c with gcc < 4.0

diffstat:

 src/audio/SDL_audiotypecvt.c |  10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r e917e911dab6 -r 96157e099383 src/audio/SDL_audiotypecvt.c
--- a/src/audio/SDL_audiotypecvt.c	Mon Feb 12 17:00:00 2018 +0300
+++ b/src/audio/SDL_audiotypecvt.c	Mon Feb 12 10:47:00 2018 +0300
@@ -509,6 +509,16 @@
     }
 }
 
+#if defined(__GNUC__) && (__GNUC__ < 4)
+/* these were added as of gcc-4.0: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19418 */
+static inline __m128 _mm_castsi128_ps(__m128i __A) {
+  return (__m128) __A;
+}
+static inline __m128i _mm_castps_si128(__m128 __A) {
+  return (__m128i) __A;
+}
+#endif
+
 static void SDLCALL
 SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
 {


More information about the commits mailing list