changeset 1197:bb5ace455586

Fixed compiling with gcc 4, patch applied from Gentoo Bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=87809
author Sam Lantinga <slouken@libsdl.org>
date Thu, 08 Dec 2005 14:41:49 +0000
parents b81f54c3963f
children b616ac4f39d1
files src/hermes/HeadMMX.h src/hermes/HeadX86.h
diffstat 2 files changed, 47 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/src/hermes/HeadMMX.h	Thu Dec 08 14:21:17 2005 +0000
+++ b/src/hermes/HeadMMX.h	Thu Dec 08 14:41:49 2005 +0000
@@ -50,21 +50,19 @@
   extern "C" {   
   #endif
 
-  void ConvertMMX(HermesConverterInterface *) __attribute__ ((alias ("_ConvertMMX")));
-#if 0
-  void ClearMMX_32(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_32")));
-  void ClearMMX_24(HermesClearInterface *)  __attribute__ ((alias ("_ClearMMX_24")));
-  void ClearMMX_16(HermesClearInterface *)  __attribute__ ((alias ("_ClearMMX_16")));
-  void ClearMMX_8(HermesClearInterface *)  __attribute__ ((alias ("_ClearMMX_8")));
+  extern void _ConvertMMX(HermesConverterInterface *);
+  extern void _ConvertMMXpII32_24RGB888();
+  extern void _ConvertMMXpII32_16RGB565();
+  extern void _ConvertMMXpII32_16BGR565();
+  extern void _ConvertMMXpII32_16RGB555();
+  extern void _ConvertMMXpII32_16BGR555();
 
-  void ConvertMMXp32_16RGB555() __attribute__ ((alias ("_ConvertMMXp32_16RGB555")));
-#endif
-
-  void ConvertMMXpII32_24RGB888() __attribute__ ((alias ("_ConvertMMXpII32_24RGB888")));
-  void ConvertMMXpII32_16RGB565() __attribute__ ((alias ("_ConvertMMXpII32_16RGB565")));
-  void ConvertMMXpII32_16BGR565() __attribute__ ((alias ("_ConvertMMXpII32_16BGR565")));
-  void ConvertMMXpII32_16RGB555() __attribute__ ((alias ("_ConvertMMXpII32_16RGB555")));
-  void ConvertMMXpII32_16BGR555() __attribute__ ((alias ("_ConvertMMXpII32_16BGR555")));
+  #define ConvertMMX _ConvertMMX
+  #define ConvertMMXpII32_24RGB888 _ConvertMMXpII32_24RGB888
+  #define ConvertMMXpII32_16RGB565 _ConvertMMXpII32_16RGB565
+  #define ConvertMMXpII32_16BGR565 _ConvertMMXpII32_16BGR565
+  #define ConvertMMXpII32_16RGB555 _ConvertMMXpII32_16RGB555
+  #define ConvertMMXpII32_16BGR555 _ConvertMMXpII32_16BGR555
 
   #ifdef __cplusplus
   }
--- a/src/hermes/HeadX86.h	Thu Dec 08 14:21:17 2005 +0000
+++ b/src/hermes/HeadX86.h	Thu Dec 08 14:41:49 2005 +0000
@@ -79,56 +79,47 @@
   extern "C" {
   #endif
 
-  int Hermes_X86_CPU() __attribute__ ((alias ("_Hermes_X86_CPU")));
-
-  void ConvertX86(HermesConverterInterface *) __attribute__ ((alias ("_ConvertX86")));
+  extern int _Hermes_X86_CPU();
 
-#if 0
-  void ClearX86_32(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_32")));
-  void ClearX86_24(HermesClearInterface *)  __attribute__ ((alias ("_ClearX86_24")));
-  void ClearX86_16(HermesClearInterface *)  __attribute__ ((alias ("_ClearX86_16")));
-  void ClearX86_8(HermesClearInterface *)  __attribute__ ((alias ("_ClearX86_8")));
-#endif
+  extern void _ConvertX86(HermesConverterInterface *);
 
-  void ConvertX86p32_32BGR888() __attribute__ ((alias ("_ConvertX86p32_32BGR888")));
-  void ConvertX86p32_32RGBA888() __attribute__ ((alias ("_ConvertX86p32_32RGBA888")));
-  void ConvertX86p32_32BGRA888() __attribute__ ((alias ("_ConvertX86p32_32BGRA888")));
-  void ConvertX86p32_24RGB888() __attribute__ ((alias ("_ConvertX86p32_24RGB888")));
-  void ConvertX86p32_24BGR888() __attribute__ ((alias ("_ConvertX86p32_24BGR888")));
-  void ConvertX86p32_16RGB565() __attribute__ ((alias ("_ConvertX86p32_16RGB565")));
-  void ConvertX86p32_16BGR565() __attribute__ ((alias ("_ConvertX86p32_16BGR565")));
-  void ConvertX86p32_16RGB555() __attribute__ ((alias ("_ConvertX86p32_16RGB555")));
-  void ConvertX86p32_16BGR555() __attribute__ ((alias ("_ConvertX86p32_16BGR555")));
-  void ConvertX86p32_8RGB332() __attribute__ ((alias ("_ConvertX86p32_8RGB332")));
+  extern void _ConvertX86p32_32BGR888();
+  extern void _ConvertX86p32_32RGBA888();
+  extern void _ConvertX86p32_32BGRA888();
+  extern void _ConvertX86p32_24RGB888();
+  extern void _ConvertX86p32_24BGR888();
+  extern void _ConvertX86p32_16RGB565();
+  extern void _ConvertX86p32_16BGR565();
+  extern void _ConvertX86p32_16RGB555();
+  extern void _ConvertX86p32_16BGR555();
+  extern void _ConvertX86p32_8RGB332();
+
+  extern void _ConvertX86p16_16BGR565();
+  extern void _ConvertX86p16_16RGB555();
+  extern void _ConvertX86p16_16BGR555();
+  extern void _ConvertX86p16_8RGB332();
+
 
-#if 0
-  void ConvertX86p16_32RGB888() __attribute__ ((alias ("_ConvertX86p16_32RGB888")));
-  void ConvertX86p16_32BGR888() __attribute__ ((alias ("_ConvertX86p16_32BGR888")));
-  void ConvertX86p16_32RGBA888() __attribute__ ((alias ("_ConvertX86p16_32RGBA888")));
-  void ConvertX86p16_32BGRA888() __attribute__ ((alias ("_ConvertX86p16_32BGRA888")));
-  void ConvertX86p16_24RGB888() __attribute__ ((alias ("_ConvertX86p16_24RGB888")));
-  void ConvertX86p16_24BGR888() __attribute__ ((alias ("_ConvertX86p16_24BGR888")));
-#endif
-  void ConvertX86p16_16BGR565() __attribute__ ((alias ("_ConvertX86p16_16BGR565")));
-  void ConvertX86p16_16RGB555() __attribute__ ((alias ("_ConvertX86p16_16RGB555")));
-  void ConvertX86p16_16BGR555() __attribute__ ((alias ("_ConvertX86p16_16BGR555")));
-  void ConvertX86p16_8RGB332() __attribute__ ((alias ("_ConvertX86p16_8RGB332")));
+  #define Hermes_X86_CPU _Hermes_X86_CPU
+
+  #define ConvertX86 _ConvertX86
 
-#if 0
-  void CopyX86p_4byte() __attribute__ ((alias ("_CopyX86p_4byte")));
-  void CopyX86p_3byte() __attribute__ ((alias ("_CopyX86p_3byte")));
-  void CopyX86p_2byte() __attribute__ ((alias ("_CopyX86p_2byte")));
-  void CopyX86p_1byte() __attribute__ ((alias ("_CopyX86p_1byte")));
+  #define ConvertX86p32_32BGR888 _ConvertX86p32_32BGR888
+  #define ConvertX86p32_32RGBA888 _ConvertX86p32_32RGBA888
+  #define ConvertX86p32_32BGRA888 _ConvertX86p32_32BGRA888
+  #define ConvertX86p32_24RGB888 _ConvertX86p32_24RGB888
+  #define ConvertX86p32_24BGR888 _ConvertX86p32_24BGR888
+  #define ConvertX86p32_16RGB565 _ConvertX86p32_16RGB565
+  #define ConvertX86p32_16BGR565 _ConvertX86p32_16BGR565
+  #define ConvertX86p32_16RGB555 _ConvertX86p32_16RGB555
+  #define ConvertX86p32_16BGR555 _ConvertX86p32_16BGR555
+  #define ConvertX86p32_8RGB332 _ConvertX86p32_8RGB332
 
-  void ConvertX86pI8_32() __attribute__ ((alias ("_ConvertX86pI8_32")));
-  void ConvertX86pI8_24() __attribute__ ((alias ("_ConvertX86pI8_24")));
-  void ConvertX86pI8_16() __attribute__ ((alias ("_ConvertX86pI8_16")));
+  #define ConvertX86p16_16BGR565 _ConvertX86p16_16BGR565
+  #define ConvertX86p16_16RGB555 _ConvertX86p16_16RGB555
+  #define ConvertX86p16_16BGR555 _ConvertX86p16_16BGR555
+  #define ConvertX86p16_8RGB332 _ConvertX86p16_8RGB332
 
-  extern int ConvertX86p16_32RGB888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32RGB888_LUT_X86")));
-  extern int ConvertX86p16_32BGR888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32BGR888_LUT_X86")));
-  extern int ConvertX86p16_32RGBA888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32RGBA888_LUT_X86")));
-  extern int ConvertX86p16_32BGRA888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32BGRA888_LUT_X86")));
-#endif
 
   #ifdef __cplusplus
   }