- 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

svn path=/trunk/; revision=47453
This commit is contained in:
Timo Kreuzer 2010-05-30 18:46:02 +00:00
parent cbb1f9480b
commit b99bfa42f2
3 changed files with 12 additions and 9 deletions

View file

@ -435,8 +435,6 @@ __CRT_INLINE int isinf (double d) {
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 @@ __CRT_INLINE int isinf (double d) {
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);

View file

@ -879,14 +879,14 @@ __INTRIN_INLINE unsigned short _rotl16(unsigned short value, unsigned char shift
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 @@ __INTRIN_INLINE unsigned long long __ull_rshift(const unsigned long long Mask, i
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 @@ __INTRIN_INLINE unsigned long __cdecl _byteswap_ulong(unsigned long value)
}
#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));

View file

@ -345,11 +345,15 @@ extern "C" {
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 @@ extern "C" {
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 @@ extern "C" {
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);