mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 22:02:37 +00:00
* Reduce difference to the cmake branch, MSVC fixes.
svn path=/trunk/; revision=51702
This commit is contained in:
parent
9d49f811fd
commit
2bad78f216
11 changed files with 57 additions and 20 deletions
|
@ -191,13 +191,16 @@ static LPWSTR RemoveQuotes(LPWSTR str)
|
||||||
int
|
int
|
||||||
wmain(VOID)
|
wmain(VOID)
|
||||||
{
|
{
|
||||||
|
WCHAR *pArgStart;
|
||||||
|
WCHAR *pArgEnd;
|
||||||
|
HMODULE hKernel32;
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
/* Get the full command line using GetCommandLine(). We can't just use argv,
|
/* Get the full command line using GetCommandLine(). We can't just use argv,
|
||||||
* because then a parameter like "gotoroot=cd \" wouldn't be passed completely. */
|
* because then a parameter like "gotoroot=cd \" wouldn't be passed completely. */
|
||||||
WCHAR *pArgStart;
|
pArgEnd = GetCommandLine();
|
||||||
WCHAR *pArgEnd = GetCommandLine();
|
hKernel32 = LoadLibraryW(L"kernel32.dll");
|
||||||
HMODULE hKernel32 = LoadLibraryW(L"kernel32.dll");
|
|
||||||
|
|
||||||
/* Get function pointers */
|
/* Get function pointers */
|
||||||
pGetConsoleCommandHistoryW = (GetConsoleCommandHistoryW_t)GetProcAddress( hKernel32, "GetConsoleCommandHistoryW");
|
pGetConsoleCommandHistoryW = (GetConsoleCommandHistoryW_t)GetProcAddress( hKernel32, "GetConsoleCommandHistoryW");
|
||||||
|
|
|
@ -462,7 +462,7 @@ WndProc_wave( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
|
||||||
|
|
||||||
x = ( i * samples ) / WAVEBAR_CX;
|
x = ( i * samples ) / WAVEBAR_CX;
|
||||||
|
|
||||||
line_h = ( abs(AUD_OUT->nsample( x )) * max_h ) / AUD_OUT->samplevalue_max();
|
line_h = ( AUD_OUT->nsample( x ) * max_h ) / AUD_OUT->samplevalue_max();
|
||||||
|
|
||||||
|
|
||||||
if ( line_h )
|
if ( line_h )
|
||||||
|
|
|
@ -54,6 +54,17 @@ VOID BootMain(LPSTR CmdLine)
|
||||||
RunLoader();
|
RunLoader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
long _ftol2(double f)
|
||||||
|
{
|
||||||
|
return _ftol(f);
|
||||||
|
}
|
||||||
|
long _ftol2_sse(double f)
|
||||||
|
{
|
||||||
|
return _ftol(f);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// We need to emulate these, because the original ones don't work in freeldr
|
// We need to emulate these, because the original ones don't work in freeldr
|
||||||
int __cdecl wctomb(char *mbchar, wchar_t wchar)
|
int __cdecl wctomb(char *mbchar, wchar_t wchar)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6577,7 +6577,7 @@ static void halve1DimagePackedPixel(int components,
|
||||||
* Contributed by Gerk Huisma <gerk@five-d.demon.nl>.
|
* Contributed by Gerk Huisma <gerk@five-d.demon.nl>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef WINAPI void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
|
typedef void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
|
||||||
GLenum internalFormat,
|
GLenum internalFormat,
|
||||||
GLsizei width, GLsizei height,
|
GLsizei width, GLsizei height,
|
||||||
GLsizei depth, GLint border,
|
GLsizei depth, GLint border,
|
||||||
|
|
|
@ -88,7 +88,10 @@ HRESULT WINAPI CreateTextServices(IUnknown * pUnkOuter,
|
||||||
ITextImpl->lpVtbl = &textservices_Vtbl;
|
ITextImpl->lpVtbl = &textservices_Vtbl;
|
||||||
ITextImpl->editor = ME_MakeEditor(pITextHost, FALSE);
|
ITextImpl->editor = ME_MakeEditor(pITextHost, FALSE);
|
||||||
ITextImpl->editor->exStyleFlags = 0;
|
ITextImpl->editor->exStyleFlags = 0;
|
||||||
ITextImpl->editor->rcFormat = (RECT){0,0,0,0};
|
ITextImpl->editor->rcFormat.left = 0;
|
||||||
|
ITextImpl->editor->rcFormat.top = 0;
|
||||||
|
ITextImpl->editor->rcFormat.right = 0;
|
||||||
|
ITextImpl->editor->rcFormat.bottom = 0;
|
||||||
ME_HandleMessage(ITextImpl->editor, WM_CREATE, 0, 0, TRUE, &hres);
|
ME_HandleMessage(ITextImpl->editor, WM_CREATE, 0, 0, TRUE, &hres);
|
||||||
|
|
||||||
if (pUnkOuter)
|
if (pUnkOuter)
|
||||||
|
|
|
@ -187,9 +187,13 @@ static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWor
|
||||||
/* strdup on the process heap */
|
/* strdup on the process heap */
|
||||||
static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str)
|
static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str)
|
||||||
{
|
{
|
||||||
|
INT len;
|
||||||
|
LPWSTR p;
|
||||||
|
|
||||||
assert(str);
|
assert(str);
|
||||||
INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
|
|
||||||
LPWSTR p = HeapAlloc( heap, flags, len*sizeof (WCHAR) );
|
len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
|
||||||
|
p = HeapAlloc( heap, flags, len*sizeof (WCHAR) );
|
||||||
if( !p )
|
if( !p )
|
||||||
return p;
|
return p;
|
||||||
MultiByteToWideChar( CP_ACP, 0, str, -1, p, len );
|
MultiByteToWideChar( CP_ACP, 0, str, -1, p, len );
|
||||||
|
|
|
@ -21,7 +21,14 @@ NmiClearFlag(VOID)
|
||||||
{
|
{
|
||||||
((PCHAR)&KiBugCheckData[4])[0] -= (NmiBegin[3] | NmiBegin[7]);
|
((PCHAR)&KiBugCheckData[4])[0] -= (NmiBegin[3] | NmiBegin[7]);
|
||||||
((PCHAR)&KiBugCheckData[4])[3] |= 1;
|
((PCHAR)&KiBugCheckData[4])[3] |= 1;
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
rcr KiBugCheckData[4], 8
|
||||||
|
}
|
||||||
|
#else
|
||||||
__asm__("rcrl %b[shift], %k[retval]" : [retval] "=rm" (KiBugCheckData[4]) : "[retval]" (KiBugCheckData[4]), [shift] "Nc" (8));
|
__asm__("rcrl %b[shift], %k[retval]" : [retval] "=rm" (KiBugCheckData[4]) : "[retval]" (KiBugCheckData[4]), [shift] "Nc" (8));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
|
|
@ -67,6 +67,8 @@ AcpiOsRemoveInterruptHandler (
|
||||||
ACPI_STATUS
|
ACPI_STATUS
|
||||||
AcpiOsInitialize (void)
|
AcpiOsInitialize (void)
|
||||||
{
|
{
|
||||||
|
UINT32 i;
|
||||||
|
|
||||||
DPRINT("AcpiOsInitialize called\n");
|
DPRINT("AcpiOsInitialize called\n");
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
@ -75,8 +77,6 @@ AcpiOsInitialize (void)
|
||||||
AcpiDbgLayer = 0xFFFFFFFF;
|
AcpiDbgLayer = 0xFFFFFFFF;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UINT32 i;
|
|
||||||
|
|
||||||
for (i = 0; i < NUM_SEMAPHORES; i++)
|
for (i = 0; i < NUM_SEMAPHORES; i++)
|
||||||
{
|
{
|
||||||
AcpiGbl_Semaphores[i].OsHandle = NULL;
|
AcpiGbl_Semaphores[i].OsHandle = NULL;
|
||||||
|
@ -209,10 +209,11 @@ void *
|
||||||
AcpiOsAcquireObject (
|
AcpiOsAcquireObject (
|
||||||
ACPI_CACHE_T *Cache)
|
ACPI_CACHE_T *Cache)
|
||||||
{
|
{
|
||||||
|
void* ptr;
|
||||||
PNPAGED_LOOKASIDE_LIST List = (PNPAGED_LOOKASIDE_LIST)Cache;
|
PNPAGED_LOOKASIDE_LIST List = (PNPAGED_LOOKASIDE_LIST)Cache;
|
||||||
|
|
||||||
DPRINT("AcpiOsAcquireObject from %p\n", Cache);
|
DPRINT("AcpiOsAcquireObject from %p\n", Cache);
|
||||||
void* ptr =
|
ptr = ExAllocateFromNPagedLookasideList(List);
|
||||||
ExAllocateFromNPagedLookasideList(List);
|
|
||||||
ASSERT(ptr);
|
ASSERT(ptr);
|
||||||
|
|
||||||
RtlZeroMemory(ptr,List->L.Size);
|
RtlZeroMemory(ptr,List->L.Size);
|
||||||
|
@ -692,8 +693,10 @@ AcpiOsExecute (
|
||||||
UINT64
|
UINT64
|
||||||
AcpiOsGetTimer (void)
|
AcpiOsGetTimer (void)
|
||||||
{
|
{
|
||||||
DPRINT("AcpiOsGetTimer\n");
|
|
||||||
LARGE_INTEGER Timer;
|
LARGE_INTEGER Timer;
|
||||||
|
|
||||||
|
DPRINT("AcpiOsGetTimer\n");
|
||||||
|
|
||||||
KeQueryTickCount(&Timer);
|
KeQueryTickCount(&Timer);
|
||||||
|
|
||||||
return Timer.QuadPart;
|
return Timer.QuadPart;
|
||||||
|
@ -758,9 +761,10 @@ ACPI_PHYSICAL_ADDRESS
|
||||||
AcpiOsGetRootPointer (
|
AcpiOsGetRootPointer (
|
||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
DPRINT("AcpiOsGetRootPointer\n");
|
|
||||||
ACPI_PHYSICAL_ADDRESS pa = 0;
|
ACPI_PHYSICAL_ADDRESS pa = 0;
|
||||||
|
|
||||||
|
DPRINT("AcpiOsGetRootPointer\n");
|
||||||
|
|
||||||
AcpiFindRootPointer(&pa);
|
AcpiFindRootPointer(&pa);
|
||||||
return pa;
|
return pa;
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,6 +368,8 @@ PdoDispatchPnp(
|
||||||
PIO_STACK_LOCATION Stack;
|
PIO_STACK_LOCATION Stack;
|
||||||
ULONG_PTR Information = Irp->IoStatus.Information;
|
ULONG_PTR Information = Irp->IoStatus.Information;
|
||||||
NTSTATUS Status = Irp->IoStatus.Status;
|
NTSTATUS Status = Irp->IoStatus.Status;
|
||||||
|
PDEVICE_CAPABILITIES DeviceCapabilities;
|
||||||
|
ULONG i;
|
||||||
|
|
||||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
MinorFunction = Stack->MinorFunction;
|
MinorFunction = Stack->MinorFunction;
|
||||||
|
@ -513,8 +515,6 @@ PdoDispatchPnp(
|
||||||
case IRP_MN_QUERY_CAPABILITIES:
|
case IRP_MN_QUERY_CAPABILITIES:
|
||||||
{
|
{
|
||||||
DPRINT("Ehci: PDO Query Capabilities\n");
|
DPRINT("Ehci: PDO Query Capabilities\n");
|
||||||
PDEVICE_CAPABILITIES DeviceCapabilities;
|
|
||||||
ULONG i;
|
|
||||||
|
|
||||||
DeviceCapabilities = (PDEVICE_CAPABILITIES)Stack->Parameters.DeviceCapabilities.Capabilities;
|
DeviceCapabilities = (PDEVICE_CAPABILITIES)Stack->Parameters.DeviceCapabilities.Capabilities;
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,11 @@ int bcmp(const void *b1, const void *b2, size_t len)
|
||||||
return RtlCompareMemory(b1, b2, len);
|
return RtlCompareMemory(b1, b2, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
|
||||||
int memcmp(const void *b1, const void *b2, size_t len)
|
int memcmp(const void *b1, const void *b2, size_t len)
|
||||||
{
|
{
|
||||||
return RtlCompareMemory(b1, b2, len);
|
return RtlCompareMemory(b1, b2, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -129,9 +129,10 @@ int OskitTCPSocket( void *context,
|
||||||
int proto )
|
int proto )
|
||||||
{
|
{
|
||||||
struct socket *so;
|
struct socket *so;
|
||||||
|
int error ;
|
||||||
|
|
||||||
OSKLock();
|
OSKLock();
|
||||||
int error = socreate(domain, &so, type, proto);
|
error = socreate(domain, &so, type, proto);
|
||||||
if( !error ) {
|
if( !error ) {
|
||||||
so->so_connection = context;
|
so->so_connection = context;
|
||||||
InitializeSocketFlags(so);
|
InitializeSocketFlags(so);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue