mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +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
|
@ -10,7 +10,7 @@ WCHAR szStringBuf[MAX_STRING];
|
|||
LPWSTR pszExeName = L"cmd.exe";
|
||||
|
||||
/* Function pointers */
|
||||
typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD nBufferLength, LPWSTR sExeName);
|
||||
typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD nBufferLength, LPWSTR sExeName);
|
||||
typedef DWORD (WINAPI *GetConsoleCommandHistoryLengthW_t) (LPWSTR sExeName);
|
||||
typedef BOOL (WINAPI *SetConsoleNumberOfCommandsW_t)(DWORD nNumber, LPWSTR sExeName);
|
||||
typedef VOID (WINAPI *ExpungeConsoleCommandHistoryW_t)(LPWSTR sExeName);
|
||||
|
@ -142,7 +142,7 @@ static VOID ReadFromFile(LPWSTR param)
|
|||
return;
|
||||
}
|
||||
|
||||
while ( fgetws(line, MAX_PATH, fp) != NULL)
|
||||
while ( fgetws(line, MAX_PATH, fp) != NULL)
|
||||
{
|
||||
/* Remove newline character */
|
||||
WCHAR *end = &line[wcslen(line) - 1];
|
||||
|
@ -191,13 +191,16 @@ static LPWSTR RemoveQuotes(LPWSTR str)
|
|||
int
|
||||
wmain(VOID)
|
||||
{
|
||||
setlocale(LC_ALL, "");
|
||||
WCHAR *pArgStart;
|
||||
WCHAR *pArgEnd;
|
||||
HMODULE hKernel32;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
/* 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. */
|
||||
WCHAR *pArgStart;
|
||||
WCHAR *pArgEnd = GetCommandLine();
|
||||
HMODULE hKernel32 = LoadLibraryW(L"kernel32.dll");
|
||||
pArgEnd = GetCommandLine();
|
||||
hKernel32 = LoadLibraryW(L"kernel32.dll");
|
||||
|
||||
/* Get function pointers */
|
||||
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;
|
||||
|
||||
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 )
|
||||
|
|
|
@ -54,6 +54,17 @@ VOID BootMain(LPSTR CmdLine)
|
|||
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
|
||||
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>.
|
||||
*/
|
||||
|
||||
typedef WINAPI void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
|
||||
typedef void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
|
||||
GLenum internalFormat,
|
||||
GLsizei width, GLsizei height,
|
||||
GLsizei depth, GLint border,
|
||||
|
|
|
@ -88,7 +88,10 @@ HRESULT WINAPI CreateTextServices(IUnknown * pUnkOuter,
|
|||
ITextImpl->lpVtbl = &textservices_Vtbl;
|
||||
ITextImpl->editor = ME_MakeEditor(pITextHost, FALSE);
|
||||
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);
|
||||
|
||||
if (pUnkOuter)
|
||||
|
|
|
@ -187,9 +187,13 @@ static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWor
|
|||
/* strdup on the process heap */
|
||||
static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str)
|
||||
{
|
||||
INT len;
|
||||
LPWSTR p;
|
||||
|
||||
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 )
|
||||
return p;
|
||||
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])[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));
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
|
|
|
@ -67,6 +67,8 @@ AcpiOsRemoveInterruptHandler (
|
|||
ACPI_STATUS
|
||||
AcpiOsInitialize (void)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
DPRINT("AcpiOsInitialize called\n");
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
@ -75,8 +77,6 @@ AcpiOsInitialize (void)
|
|||
AcpiDbgLayer = 0xFFFFFFFF;
|
||||
#endif
|
||||
|
||||
UINT32 i;
|
||||
|
||||
for (i = 0; i < NUM_SEMAPHORES; i++)
|
||||
{
|
||||
AcpiGbl_Semaphores[i].OsHandle = NULL;
|
||||
|
@ -209,10 +209,11 @@ void *
|
|||
AcpiOsAcquireObject (
|
||||
ACPI_CACHE_T *Cache)
|
||||
{
|
||||
void* ptr;
|
||||
PNPAGED_LOOKASIDE_LIST List = (PNPAGED_LOOKASIDE_LIST)Cache;
|
||||
|
||||
DPRINT("AcpiOsAcquireObject from %p\n", Cache);
|
||||
void* ptr =
|
||||
ExAllocateFromNPagedLookasideList(List);
|
||||
ptr = ExAllocateFromNPagedLookasideList(List);
|
||||
ASSERT(ptr);
|
||||
|
||||
RtlZeroMemory(ptr,List->L.Size);
|
||||
|
@ -692,8 +693,10 @@ AcpiOsExecute (
|
|||
UINT64
|
||||
AcpiOsGetTimer (void)
|
||||
{
|
||||
DPRINT("AcpiOsGetTimer\n");
|
||||
LARGE_INTEGER Timer;
|
||||
|
||||
DPRINT("AcpiOsGetTimer\n");
|
||||
|
||||
KeQueryTickCount(&Timer);
|
||||
|
||||
return Timer.QuadPart;
|
||||
|
@ -758,9 +761,10 @@ ACPI_PHYSICAL_ADDRESS
|
|||
AcpiOsGetRootPointer (
|
||||
void)
|
||||
{
|
||||
DPRINT("AcpiOsGetRootPointer\n");
|
||||
ACPI_PHYSICAL_ADDRESS pa = 0;
|
||||
|
||||
DPRINT("AcpiOsGetRootPointer\n");
|
||||
|
||||
AcpiFindRootPointer(&pa);
|
||||
return pa;
|
||||
}
|
||||
|
|
|
@ -368,6 +368,8 @@ PdoDispatchPnp(
|
|||
PIO_STACK_LOCATION Stack;
|
||||
ULONG_PTR Information = Irp->IoStatus.Information;
|
||||
NTSTATUS Status = Irp->IoStatus.Status;
|
||||
PDEVICE_CAPABILITIES DeviceCapabilities;
|
||||
ULONG i;
|
||||
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
MinorFunction = Stack->MinorFunction;
|
||||
|
@ -513,8 +515,6 @@ PdoDispatchPnp(
|
|||
case IRP_MN_QUERY_CAPABILITIES:
|
||||
{
|
||||
DPRINT("Ehci: PDO Query Capabilities\n");
|
||||
PDEVICE_CAPABILITIES DeviceCapabilities;
|
||||
ULONG i;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
|
||||
int memcmp(const void *b1, const void *b2, size_t len)
|
||||
{
|
||||
return RtlCompareMemory(b1, b2, len);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -129,9 +129,10 @@ int OskitTCPSocket( void *context,
|
|||
int proto )
|
||||
{
|
||||
struct socket *so;
|
||||
int error ;
|
||||
|
||||
OSKLock();
|
||||
int error = socreate(domain, &so, type, proto);
|
||||
error = socreate(domain, &so, type, proto);
|
||||
if( !error ) {
|
||||
so->so_connection = context;
|
||||
InitializeSocketFlags(so);
|
||||
|
|
Loading…
Reference in a new issue