Sync to trunk head (r47736)

svn path=/branches/reactos-yarotows/; revision=47746
This commit is contained in:
Timo Kreuzer 2010-06-10 20:57:03 +00:00
commit 5f2d67cb35
862 changed files with 85731 additions and 54875 deletions

View file

@ -21,24 +21,32 @@
#include <math.h>
double ldexp (double __x, int __y);
double ldexp (double __x, int __y)
double ldexp (double value, int exp)
{
register double __val;
register double result;
#ifdef __GNUC__
__asm __volatile__
("fscale"
: "=t" (__val) : "0" (__x), "u" ((double) __y));
#if defined(__clang__)
asm ("fild %[exp]\n"
"fscale\n"
"fstp %%st(1)\n"
: [result] "=t" (result)
: [value] "0" (value), [exp] "m" (exp));
#else
register double __dy = (double)__y;
asm ("fscale"
: "=t" (result)
: "0" (value), "u" ((double)exp)
: "1");
#endif
#else /* !__GNUC__ */
register double __dy = (double)exp;
__asm
{
fld __dy
fld __x
fld value
fscale
fstp __val
fstp result
}
#endif /*__GNUC__*/
return __val;
#endif /* !__GNUC__ */
return result;
}

View file

@ -22,7 +22,7 @@ int __argc = 0;
extern wchar_t **__winitenv;
char* strndup(char* name, size_t len)
char* strndup(char const* name, size_t len)
{
char *s = malloc(len + 1);
if (s != NULL)

View file

@ -35,11 +35,14 @@ int system(const char *command)
// system should return 0 if command is null and the shell is found
if (command == NULL) {
if (szComSpec == NULL)
return 0;
else
return -1;
}
if (szComSpec == NULL)
return 0;
else
return 1;
}
if (szComSpec == NULL)
return -1;
// should return 127 or 0 ( MS ) if the shell is not found
// __set_errno(ENOENT);

View file

@ -42,7 +42,7 @@ __p_sig_fn_t signal(int sig, __p_sig_fn_t func)
}
// check with IsBadCodePtr
if ( func < (__p_sig_fn_t)4096 && func != SIG_DFL && func != SIG_IGN)
if ( (uintptr_t)func < 4096 && func != SIG_DFL && func != SIG_IGN)
{
__set_errno(EINVAL);
return SIG_ERR;

View file

@ -47,7 +47,7 @@ size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count)
}
Status = RtlMultiByteToUnicodeN (wcstr,
count,
count * sizeof(WCHAR),
&Size,
mbstr,
Length);

View file

@ -1,14 +1,14 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/crt/??????
* PURPOSE: Unknown
* FILE: lib/crt/strset.c
* PURPOSE: Implementation of _strnset and _strset
* PROGRAMER: Unknown
* UPDATE HISTORY:
* 25/11/05: Added license header
*/
#if defined(__GNUC__)
#if defined(__GNUC__) && !defined(__clang__)
#define __int64 long long
#endif