[ros-diffs] [tkreuzer] 47453: - partly revert r47442 and apply a working fix by guarding some prototypes of functions that exist as intrinsics in #ifdefs, so we don't use them for gcc/clang - remove duplicated prototypes, when an inline function exists already

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sun May 30 20:46:03 CEST 2010


Author: tkreuzer
Date: Sun May 30 20:46:02 2010
New Revision: 47453

URL: http://svn.reactos.org/svn/reactos?rev=47453&view=rev
Log:
- partly revert r47442 and apply a working fix by guarding some prototypes of functions that exist as intrinsics in #ifdefs, so we don't use them for gcc/clang
- remove duplicated prototypes, when an inline function exists already

Modified:
    trunk/reactos/include/crt/math.h
    trunk/reactos/include/crt/mingw32/intrin_x86.h
    trunk/reactos/include/crt/stdlib.h

Modified: trunk/reactos/include/crt/math.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/math.h?rev=47453&r1=47452&r2=47453&view=diff
==============================================================================
--- trunk/reactos/include/crt/math.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/math.h [iso-8859-1] Sun May 30 20:46:02 2010
@@ -435,8 +435,6 @@
     return res;
   }
 
-  extern long double __cdecl modfl (long double, long double*);
-
   /* 7.12.6.13 */
   extern double __cdecl scalbn (double, int);
   extern float __cdecl scalbnf (float, int);
@@ -458,7 +456,6 @@
   extern long double __cdecl expl(long double);
   extern long double expm1l(long double);
   extern long double __cdecl coshl(long double);
-  extern long double __cdecl fabsl (long double);
   extern long double __cdecl acosl(long double);
   extern long double __cdecl asinl(long double);
   extern long double __cdecl atanl(long double);

Modified: trunk/reactos/include/crt/mingw32/intrin_x86.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin_x86.h?rev=47453&r1=47452&r2=47453&view=diff
==============================================================================
--- trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] Sun May 30 20:46:02 2010
@@ -879,14 +879,14 @@
 	return retval;
 }
 
-__INTRIN_INLINE unsigned int __cdecl _rotl(unsigned int value, int shift)
+__INTRIN_INLINE unsigned int _rotl(unsigned int value, int shift)
 {
 	unsigned long retval;
 	__asm__("roll %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
 	return retval;
 }
 
-__INTRIN_INLINE unsigned int __cdecl _rotr(unsigned int value, int shift)
+__INTRIN_INLINE unsigned int _rotr(unsigned int value, int shift)
 {
 	unsigned long retval;
 	__asm__("rorl %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
@@ -956,14 +956,14 @@
 	return retval;
 }
 
-__INTRIN_INLINE unsigned short __cdecl _byteswap_ushort(unsigned short value)
+__INTRIN_INLINE unsigned short _byteswap_ushort(unsigned short value)
 {
 	unsigned short retval;
 	__asm__("rorw $8, %w[retval]" : [retval] "=rm" (retval) : "[retval]" (value));
 	return retval;
 }
 
-__INTRIN_INLINE unsigned long __cdecl _byteswap_ulong(unsigned long value)
+__INTRIN_INLINE unsigned long _byteswap_ulong(unsigned long value)
 {
 	unsigned long retval;
 	__asm__("bswapl %[retval]" : [retval] "=r" (retval) : "[retval]" (value));
@@ -971,7 +971,7 @@
 }
 
 #ifdef _M_AMD64
-__INTRIN_INLINE unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 value)
+__INTRIN_INLINE unsigned __int64 _byteswap_uint64(unsigned __int64 value)
 {
 	unsigned __int64 retval;
 	__asm__("bswapq %[retval]" : [retval] "=r" (retval) : "[retval]" (value));

Modified: trunk/reactos/include/crt/stdlib.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdlib.h?rev=47453&r1=47452&r2=47453&view=diff
==============================================================================
--- trunk/reactos/include/crt/stdlib.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/stdlib.h [iso-8859-1] Sun May 30 20:46:02 2010
@@ -345,11 +345,15 @@
   void *__cdecl bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
   void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
 #endif
+
+#if !defined(__GNUC__) && !defined(__clang)
   unsigned short __cdecl _byteswap_ushort(unsigned short _Short);
-  /*unsigned long __cdecl _byteswap_ulong (unsigned long _Long); */
+  unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
 #if _INTEGRAL_MAX_BITS >= 64
   __MINGW_EXTENSION unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 _Int64);
 #endif
+#endif
+
   div_t __cdecl div(int _Numerator,int _Denominator);
   char *__cdecl getenv(const char *_VarName);
   _CRTIMP char *__cdecl _itoa(int _Value,char *_Dest,int _Radix);
@@ -478,6 +482,7 @@
   void __cdecl perror(const char *_ErrMsg);
 #endif
   _CRTIMP int __cdecl _putenv(const char *_EnvString);
+#if !defined(__GNUC__) && !defined(__clang)
   unsigned int __cdecl _rotl(unsigned int _Val,int _Shift);
 #if _INTEGRAL_MAX_BITS >= 64
   __MINGW_EXTENSION unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
@@ -485,6 +490,7 @@
   unsigned int __cdecl _rotr(unsigned int _Val,int _Shift);
 #if _INTEGRAL_MAX_BITS >= 64
   __MINGW_EXTENSION unsigned __int64 __cdecl _rotr64(unsigned __int64 _Val,int _Shift);
+#endif
 #endif
   _CRTIMP void __cdecl _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath);
   _CRTIMP void __cdecl _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext);




More information about the Ros-diffs mailing list