diff --git a/reactos/drivers/bus/acpi/include/platform/types.h b/reactos/drivers/bus/acpi/include/platform/types.h index 58faac91fac..6326448d007 100644 --- a/reactos/drivers/bus/acpi/include/platform/types.h +++ b/reactos/drivers/bus/acpi/include/platform/types.h @@ -792,4 +792,5 @@ VOID #endif /* __INCLUDE_ACPI_TYPES_H */ -#endif \ No newline at end of file +#endif + diff --git a/reactos/drivers/bus/acpi/ospm/acpisys.c b/reactos/drivers/bus/acpi/ospm/acpisys.c index 182497ff39e..3d8a12ee0a4 100644 --- a/reactos/drivers/bus/acpi/ospm/acpisys.c +++ b/reactos/drivers/bus/acpi/ospm/acpisys.c @@ -1,4 +1,4 @@ -/* $Id: acpisys.c,v 1.4 2001/08/27 01:24:36 ekohl Exp $ +/* $Id: acpisys.c,v 1.5 2002/05/05 14:57:44 chorns Exp $ * * PROJECT: ReactOS ACPI bus driver * FILE: acpi/ospm/acpisys.c @@ -136,7 +136,7 @@ ACPIAddDevice( DeviceExtension->Pdo = PhysicalDeviceObject; - DeviceExtension->Ldo = + DeviceExtension->Common.Ldo = IoAttachDeviceToDeviceStack(Fdo, PhysicalDeviceObject); DeviceExtension->State = dsStopped; @@ -157,9 +157,9 @@ DriverEntry( { DbgPrint("Advanced Configuration and Power Interface Bus Driver\n"); - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = ACPIDispatchDeviceControl; - DriverObject->MajorFunction[IRP_MJ_PNP] = ACPIPnpControl; - DriverObject->MajorFunction[IRP_MJ_POWER] = ACPIPowerControl; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH) ACPIDispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_PNP] = (PDRIVER_DISPATCH) ACPIPnpControl; + DriverObject->MajorFunction[IRP_MJ_POWER] = (PDRIVER_DISPATCH) ACPIPowerControl; DriverObject->DriverExtension->AddDevice = ACPIAddDevice; return STATUS_SUCCESS; diff --git a/reactos/drivers/bus/acpi/ospm/fdo.c b/reactos/drivers/bus/acpi/ospm/fdo.c index 5df235e7a6a..6fc59852190 100644 --- a/reactos/drivers/bus/acpi/ospm/fdo.c +++ b/reactos/drivers/bus/acpi/ospm/fdo.c @@ -1,4 +1,4 @@ -/* $Id: fdo.c,v 1.1 2001/08/23 17:32:04 chorns Exp $ +/* $Id: fdo.c,v 1.2 2002/05/05 14:57:45 chorns Exp $ * * PROJECT: ReactOS ACPI bus driver * FILE: acpi/ospm/fdo.c @@ -87,11 +87,11 @@ FdoQueryBusRelations( Device->Pdo->Flags |= DO_BUS_ENUMERATED_DEVICE; - PdoDeviceExtension->DeviceObject = Device->Pdo; + PdoDeviceExtension->Common.DeviceObject = Device->Pdo; - PdoDeviceExtension->DevicePowerState = PowerDeviceD0; + PdoDeviceExtension->Common.DevicePowerState = PowerDeviceD0; - PdoDeviceExtension->Ldo = IoAttachDeviceToDeviceStack( + PdoDeviceExtension->Common.Ldo = IoAttachDeviceToDeviceStack( DeviceObject, Device->Pdo); diff --git a/reactos/drivers/bus/acpi/ospm/include/acpisys.h b/reactos/drivers/bus/acpi/ospm/include/acpisys.h index a63e73b7822..e8f4f85179a 100644 --- a/reactos/drivers/bus/acpi/ospm/include/acpisys.h +++ b/reactos/drivers/bus/acpi/ospm/include/acpisys.h @@ -41,7 +41,7 @@ typedef struct _COMMON_DEVICE_EXTENSION typedef struct _PDO_DEVICE_EXTENSION { // Common device data - COMMON_DEVICE_EXTENSION; + COMMON_DEVICE_EXTENSION Common; // Hardware IDs UNICODE_STRING HardwareIDs; // Compatible IDs @@ -51,7 +51,7 @@ typedef struct _PDO_DEVICE_EXTENSION typedef struct _FDO_DEVICE_EXTENSION { // Common device data - COMMON_DEVICE_EXTENSION; + COMMON_DEVICE_EXTENSION Common; // Physical Device Object PDEVICE_OBJECT Pdo; // Current state of the driver diff --git a/reactos/drivers/bus/pci/fdo.c b/reactos/drivers/bus/pci/fdo.c index 23f1dd7fbe2..8793b9700a2 100644 --- a/reactos/drivers/bus/pci/fdo.c +++ b/reactos/drivers/bus/pci/fdo.c @@ -1,4 +1,4 @@ -/* $Id: fdo.c,v 1.1 2001/09/16 13:18:24 chorns Exp $ +/* $Id: fdo.c,v 1.2 2002/05/05 14:57:45 chorns Exp $ * * PROJECT: ReactOS PCI bus driver * FILE: fdo.c @@ -195,11 +195,11 @@ FdoQueryBusRelations( RtlZeroMemory(PdoDeviceExtension, sizeof(PDO_DEVICE_EXTENSION)); - PdoDeviceExtension->IsFDO = FALSE; + PdoDeviceExtension->Common.IsFDO = FALSE; - PdoDeviceExtension->DeviceObject = Device->Pdo; + PdoDeviceExtension->Common.DeviceObject = Device->Pdo; - PdoDeviceExtension->DevicePowerState = PowerDeviceD0; + PdoDeviceExtension->Common.DevicePowerState = PowerDeviceD0; /* FIXME: Get device properties (Hardware IDs, etc.) */ diff --git a/reactos/drivers/bus/pci/pci.c b/reactos/drivers/bus/pci/pci.c index 57a8e23fb4c..89978385723 100644 --- a/reactos/drivers/bus/pci/pci.c +++ b/reactos/drivers/bus/pci/pci.c @@ -1,4 +1,4 @@ -/* $Id: pci.c,v 1.1 2001/09/16 13:18:24 chorns Exp $ +/* $Id: pci.c,v 1.2 2002/05/05 14:57:45 chorns Exp $ * * PROJECT: ReactOS PCI Bus driver * FILE: pci.c @@ -544,7 +544,7 @@ PciAddDevice( RtlZeroMemory(DeviceExtension, sizeof(FDO_DEVICE_EXTENSION)); - DeviceExtension->IsFDO = TRUE; + DeviceExtension->Common.IsFDO = TRUE; DeviceExtension->Ldo = IoAttachDeviceToDeviceStack(Fdo, PhysicalDeviceObject); @@ -569,9 +569,9 @@ DriverEntry( { DbgPrint("Peripheral Component Interconnect Bus Driver\n"); - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = PciDispatchDeviceControl; - DriverObject->MajorFunction[IRP_MJ_PNP] = PciPnpControl; - DriverObject->MajorFunction[IRP_MJ_POWER] = PciPowerControl; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = (PDRIVER_DISPATCH) PciDispatchDeviceControl; + DriverObject->MajorFunction[IRP_MJ_PNP] = (PDRIVER_DISPATCH) PciPnpControl; + DriverObject->MajorFunction[IRP_MJ_POWER] = (PDRIVER_DISPATCH) PciPowerControl; DriverObject->DriverExtension->AddDevice = PciAddDevice; return STATUS_SUCCESS; diff --git a/reactos/drivers/bus/pci/pci.h b/reactos/drivers/bus/pci/pci.h index a27c4addba5..f34012d0b66 100644 --- a/reactos/drivers/bus/pci/pci.h +++ b/reactos/drivers/bus/pci/pci.h @@ -1,4 +1,4 @@ -/* $Id: pci.h,v 1.1 2001/09/16 13:18:24 chorns Exp $ */ +/* $Id: pci.h,v 1.2 2002/05/05 14:57:45 chorns Exp $ */ #ifndef __PCI_H #define __PCI_H @@ -52,7 +52,7 @@ typedef struct _COMMON_DEVICE_EXTENSION typedef struct _PDO_DEVICE_EXTENSION { // Common device data - COMMON_DEVICE_EXTENSION; + COMMON_DEVICE_EXTENSION Common; // Device ID UNICODE_STRING DeviceID; // Instance ID @@ -71,7 +71,7 @@ typedef struct _PDO_DEVICE_EXTENSION typedef struct _FDO_DEVICE_EXTENSION { // Common device data - COMMON_DEVICE_EXTENSION; + COMMON_DEVICE_EXTENSION Common; // Physical Device Object PDEVICE_OBJECT Pdo; // Current state of the driver diff --git a/reactos/drivers/dd/vga/display/vgavideo/vgavideo.h b/reactos/drivers/dd/vga/display/vgavideo/vgavideo.h index 3c7a0d999a4..c3bb59d8c65 100644 --- a/reactos/drivers/dd/vga/display/vgavideo/vgavideo.h +++ b/reactos/drivers/dd/vga/display/vgavideo/vgavideo.h @@ -7,7 +7,8 @@ #define VGA_OR 16 #define VGA_XOR 24 -typedef struct { int quot, rem; } div_t; +//This is in mingw standard headers +//typedef struct { int quot, rem; } div_t; int maskbit[640], y80[480], xconv[640], bit8[640], startmasks[8], endmasks[8]; diff --git a/reactos/drivers/dd/vga/miniport/vgavideo.h b/reactos/drivers/dd/vga/miniport/vgavideo.h index af87ad72833..9fb566b61dc 100644 --- a/reactos/drivers/dd/vga/miniport/vgavideo.h +++ b/reactos/drivers/dd/vga/miniport/vgavideo.h @@ -6,7 +6,8 @@ #define VGA_OR 16 #define VGA_XOR 24 -typedef struct { int quot, rem; } div_t; +//This is in mingw standard headers +//typedef struct { int quot, rem; } div_t; int maskbit[640], y80[480], xconv[640], bit8[640], startmasks[8], endmasks[8]; diff --git a/reactos/hal/halx86/include/bus.h b/reactos/hal/halx86/include/bus.h index b8ed58d85ea..a2163d5e1f4 100644 --- a/reactos/hal/halx86/include/bus.h +++ b/reactos/hal/halx86/include/bus.h @@ -112,4 +112,5 @@ HalpSetCmosData(PBUS_HANDLER BusHandler, #endif /* __INTERNAL_HAL_BUS_H */ -/* EOF */ \ No newline at end of file +/* EOF */ + diff --git a/reactos/include/crtdll/errno.h b/reactos/include/crtdll/errno.h index 14b10b74a17..b4856dc3d34 100644 --- a/reactos/include/crtdll/errno.h +++ b/reactos/include/crtdll/errno.h @@ -18,9 +18,9 @@ * DISCLAMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * $Revision: 1.3 $ - * $Author: ariadne $ - * $Date: 1999/04/02 21:42:06 $ + * $Revision: 1.4 $ + * $Author: chorns $ + * $Date: 2002/05/05 14:57:38 $ * */ @@ -108,7 +108,9 @@ extern int* __imp__sys_nerr; #define sys_nerr (*__imp__sys_nerr) extern char** __imp__sys_errlist; +#ifndef sys_errlist #define sys_errlist (__imp__sys_errlist) +#endif #else /* CRTDLL run time library */ diff --git a/reactos/include/crtdll/mbstring.h b/reactos/include/crtdll/mbstring.h index cc49c6b7dfe..c0dd47453ea 100644 --- a/reactos/include/crtdll/mbstring.h +++ b/reactos/include/crtdll/mbstring.h @@ -19,7 +19,7 @@ unsigned int _mbbtombc(unsigned int c); unsigned int _mbctombb(unsigned int c); unsigned char * _mbscat(unsigned char *dst, const unsigned char *src); -unsigned char * _mbschr(const unsigned char *str, unsigned int c); +unsigned char * _mbschr(unsigned char *str, unsigned char* c); int _mbscmp(const unsigned char *, const unsigned char *); int _mbscoll(const unsigned char *, const unsigned char *); unsigned char * _mbscpy(unsigned char *, const unsigned char *); @@ -62,7 +62,7 @@ unsigned char * _mbsset(unsigned char *, unsigned int); size_t _mbsspn(const unsigned char *, const unsigned char *); unsigned char * _mbsstr(const unsigned char *, const unsigned char *); -unsigned char * _mbstok(unsigned char *, const unsigned char *); +unsigned char * _mbstok(unsigned char *, unsigned char *); unsigned char * _mbslwr(unsigned char *str); unsigned char * _mbsupr(unsigned char *str); diff --git a/reactos/include/ddk/iotypes.h b/reactos/include/ddk/iotypes.h index d1a359a46f2..dae1805a047 100644 --- a/reactos/include/ddk/iotypes.h +++ b/reactos/include/ddk/iotypes.h @@ -1,5 +1,5 @@ -/* $Id: iotypes.h,v 1.36 2002/04/10 09:55:10 ekohl Exp $ - * +/* $Id: iotypes.h,v 1.37 2002/05/05 14:57:38 chorns Exp $ + * */ #ifndef __INCLUDE_DDK_IOTYPES_H @@ -438,10 +438,10 @@ typedef struct __attribute__((packed)) _IO_STACK_LOCATION struct _DEVICE_OBJECT* DeviceObject; struct _FILE_OBJECT* FileObject; - + PIO_COMPLETION_ROUTINE CompletionRoutine; PVOID CompletionContext; - + } __attribute__((packed)) IO_STACK_LOCATION, *PIO_STACK_LOCATION; @@ -669,13 +669,6 @@ typedef struct _DEVICE_OBJECT PVOID Reserved; } DEVICE_OBJECT, *PDEVICE_OBJECT; -/* - * Dispatch routine type declaration - */ -typedef NTSTATUS STDCALL -(*PDRIVER_DISPATCH)(struct _DEVICE_OBJECT*, - IRP*); - /* * Fast i/o routine type declaration @@ -723,6 +716,13 @@ typedef struct _FAST_IO_DISPATCH { PFAST_IO_ROUTINE ReleaseForCcFlush; } FAST_IO_DISPATCH, *PFAST_IO_DISPATCH; +/* + * Dispatch routine type declaration + */ +typedef NTSTATUS STDCALL +(*PDRIVER_DISPATCH)(IN struct _DEVICE_OBJECT *DeviceObject, + IN struct _IRP *Irp); + /* * Dispatch routine type declaration */ @@ -755,7 +755,7 @@ struct _FAST_IO_DISPATCH_TABLE { ULONG Count; PFAST_IO_DISPATCH Dispatch; - + } FAST_IO_DISPATCH_TABLE, * PFAST_IO_DISPATCH_TABLE; #endif diff --git a/reactos/include/ddk/ntddk.h b/reactos/include/ddk/ntddk.h index a2b24e7c4f2..c982468f2fc 100644 --- a/reactos/include/ddk/ntddk.h +++ b/reactos/include/ddk/ntddk.h @@ -1,4 +1,4 @@ -/* $Id: ntddk.h,v 1.28 2002/04/26 13:05:09 ekohl Exp $ +/* $Id: ntddk.h,v 1.29 2002/05/05 14:57:38 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -23,7 +23,14 @@ extern "C" #define STATIC static - +#ifndef _GNU_H_WINDOWS_H +/* NASTY HACK! Our msvcrt are messed up, causing msvcrt.dll to crash when + * the headers are mixed with MinGW msvcrt headers. Not including stdlib.h + * seems to correct this. + */ +#include +#include +#endif #include #include #include diff --git a/reactos/include/msvcrt/errno.h b/reactos/include/msvcrt/errno.h index 01d49949451..04089258e09 100644 --- a/reactos/include/msvcrt/errno.h +++ b/reactos/include/msvcrt/errno.h @@ -1,4 +1,4 @@ -/* +/* * errno.h * * Error numbers and access to error reporting. @@ -18,9 +18,9 @@ * DISCLAMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * $Revision: 1.3 $ - * $Author: ekohl $ - * $Date: 2001/10/04 16:05:41 $ + * $Revision: 1.4 $ + * $Author: chorns $ + * $Date: 2002/05/05 14:57:39 $ * */ @@ -98,17 +98,20 @@ extern "C" { int* _errno(void); #define errno (*_errno()) -unsigned long* __doserrno(void); +int* __doserrno(void); #define _doserrno (*__doserrno()) /* One of the MSVCRTxx libraries */ extern int* __imp__sys_nerr; +#ifndef sys_nerr #define sys_nerr (*__imp__sys_nerr) +#endif extern char** __imp__sys_errlist; +#ifndef sys_errlist #define sys_errlist (__imp__sys_errlist) - +#endif #ifdef __cplusplus } diff --git a/reactos/include/msvcrt/internal/console.h b/reactos/include/msvcrt/internal/console.h index 0fc6c13a046..6855779a9e9 100644 --- a/reactos/include/msvcrt/internal/console.h +++ b/reactos/include/msvcrt/internal/console.h @@ -8,4 +8,5 @@ extern int ungot_char; #endif /* __MSVCRT_INTERNAL_CONSOLE_H */ -/* EOF */ \ No newline at end of file +/* EOF */ + diff --git a/reactos/include/msvcrt/internal/tls.h b/reactos/include/msvcrt/internal/tls.h index 38d7da32496..bbc21e99d5a 100644 --- a/reactos/include/msvcrt/internal/tls.h +++ b/reactos/include/msvcrt/internal/tls.h @@ -34,4 +34,5 @@ PTHREADDATA GetThreadData(void); #endif /* __MSVCRT_INTERNAL_TLS_H */ -/* EOF */ \ No newline at end of file +/* EOF */ + diff --git a/reactos/include/msvcrt/mbstring.h b/reactos/include/msvcrt/mbstring.h index 45d0c166777..a7bc5ba2af8 100644 --- a/reactos/include/msvcrt/mbstring.h +++ b/reactos/include/msvcrt/mbstring.h @@ -19,7 +19,7 @@ unsigned int _mbbtombc(unsigned int c); unsigned int _mbctombb(unsigned int c); unsigned char * _mbscat(unsigned char *dst, const unsigned char *src); -unsigned char * _mbschr(const unsigned char *str, unsigned int c); +unsigned char * _mbschr(unsigned char *str, unsigned char* c); int _mbscmp(const unsigned char *, const unsigned char *); int _mbscoll(const unsigned char *, const unsigned char *); unsigned char * _mbscpy(unsigned char *, const unsigned char *); @@ -62,7 +62,7 @@ unsigned char * _mbsset(unsigned char *, unsigned int); size_t _mbsspn(const unsigned char *, const unsigned char *); unsigned char * _mbsstr(const unsigned char *, const unsigned char *); -unsigned char * _mbstok(unsigned char *, const unsigned char *); +unsigned char * _mbstok(unsigned char *, unsigned char *); unsigned char * _mbslwr(unsigned char *str); unsigned char * _mbsupr(unsigned char *str); diff --git a/reactos/include/msvcrt/stdarg.h b/reactos/include/msvcrt/stdarg.h index b02299807e2..19f9d9ec4ba 100644 --- a/reactos/include/msvcrt/stdarg.h +++ b/reactos/include/msvcrt/stdarg.h @@ -26,9 +26,9 @@ * DISCLAMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * $Revision: 1.1 $ - * $Author: ekohl $ - * $Date: 2001/07/03 12:55:00 $ + * $Revision: 1.2 $ + * $Author: chorns $ + * $Date: 2002/05/05 14:57:39 $ * */ /* Appropriated for Reactos Crtdll by Ariadne */ @@ -72,8 +72,10 @@ typedef char* va_list; * pack shorts and such into a smaller argument list. Fortunately a * neatly arranged version is available through the use of __builtin_next_arg. */ +#ifndef va_start #define va_start(ap, pN) \ ((ap) = ((va_list) __builtin_next_arg(pN))) +#endif #else /* * For a simple minded compiler this should work (it works in GNU too for @@ -87,8 +89,10 @@ typedef char* va_list; /* * End processing of variable argument list. In this case we do nothing. */ +#ifndef va_end #define va_end(ap) ((void)0) - +#endif + /* * Increment ap to the next argument in the list while returing a @@ -98,10 +102,13 @@ typedef char* va_list; * increasing the alignment requirement. */ +#ifndef va_arg #define va_arg(ap, t) \ (((ap) = (ap) + __va_argsiz(t)), \ *((t*) (void*) ((ap) - __va_argsiz(t)))) - +#endif + #endif /* Not RC_INVOKED */ #endif /* not _STDARG_H_ */ + diff --git a/reactos/include/ntos/gditypes.h b/reactos/include/ntos/gditypes.h index e9691a9b722..180fd406cb2 100644 --- a/reactos/include/ntos/gditypes.h +++ b/reactos/include/ntos/gditypes.h @@ -88,4 +88,4 @@ typedef struct _devicemodeW #endif /* __INCLUDE_NTOS_GDITYPES_H */ -/* EOF */ \ No newline at end of file +/* EOF */ diff --git a/reactos/include/wine/debugtools.h b/reactos/include/wine/debugtools.h index 64fcf0416ea..06db79aa462 100644 --- a/reactos/include/wine/debugtools.h +++ b/reactos/include/wine/debugtools.h @@ -113,3 +113,4 @@ inline static const char *debugres_w( const WCHAR *s ) { return wine_dbgstr_wn( #define MESSAGE wine_dbg_printf #endif /* __WINE_DEBUGTOOLS_H */ + diff --git a/reactos/lib/advapi32/sec/misc.c b/reactos/lib/advapi32/sec/misc.c index 7b33d92b2be..9c6e602ce9d 100644 --- a/reactos/lib/advapi32/sec/misc.c +++ b/reactos/lib/advapi32/sec/misc.c @@ -108,4 +108,5 @@ RevertToSelf(VOID) return(TRUE); } -/* EOF */ \ No newline at end of file +/* EOF */ + diff --git a/reactos/lib/crtdll/float/copysign.c b/reactos/lib/crtdll/float/copysign.c index 4d02b38601f..a59c08aa97d 100644 --- a/reactos/lib/crtdll/float/copysign.c +++ b/reactos/lib/crtdll/float/copysign.c @@ -10,4 +10,4 @@ double _copysign (double __d, double __s) return __d; } - \ No newline at end of file + diff --git a/reactos/lib/crtdll/mbstring/ischira.c b/reactos/lib/crtdll/mbstring/ischira.c index 247e55a164e..87a22361875 100644 --- a/reactos/lib/crtdll/mbstring/ischira.c +++ b/reactos/lib/crtdll/mbstring/ischira.c @@ -29,4 +29,5 @@ unsigned int _mbctohira( unsigned int c ) unsigned int _mbctokata( unsigned int c ) { return c; -} \ No newline at end of file +} + diff --git a/reactos/lib/crtdll/mbstring/ismbal.c b/reactos/lib/crtdll/mbstring/ismbal.c index 9a6d52283cc..d62d5d1cabf 100644 --- a/reactos/lib/crtdll/mbstring/ismbal.c +++ b/reactos/lib/crtdll/mbstring/ismbal.c @@ -15,4 +15,5 @@ int _ismbbkalnum( unsigned int c ); int _ismbbalpha(unsigned char c) { return (isalpha(c) ||_ismbbkalnum(c)); -} \ No newline at end of file +} + diff --git a/reactos/lib/crtdll/mbstring/ismbaln.c b/reactos/lib/crtdll/mbstring/ismbaln.c index 4ba416d5d42..2c858734b40 100644 --- a/reactos/lib/crtdll/mbstring/ismbaln.c +++ b/reactos/lib/crtdll/mbstring/ismbaln.c @@ -6,4 +6,5 @@ int _ismbbkalnum( unsigned int c ); int _ismbbalnum(unsigned char c) { return (isalnum(c) || _ismbbkalnum(c)); -} \ No newline at end of file +} + diff --git a/reactos/lib/crtdll/mbstring/ismbpun.c b/reactos/lib/crtdll/mbstring/ismbpun.c index b8ec6f440b3..eb418e44190 100644 --- a/reactos/lib/crtdll/mbstring/ismbpun.c +++ b/reactos/lib/crtdll/mbstring/ismbpun.c @@ -10,4 +10,5 @@ int _ismbbpunct(unsigned char c) { // (0xA1 <= c <= 0xA6) return (ispunct(c) || _ismbbkana(c)); -} \ No newline at end of file +} + diff --git a/reactos/lib/crtdll/mbstring/mbstok.c b/reactos/lib/crtdll/mbstring/mbstok.c index cc2f0cbee4b..538b856ee3c 100644 --- a/reactos/lib/crtdll/mbstring/mbstok.c +++ b/reactos/lib/crtdll/mbstring/mbstok.c @@ -1,6 +1,6 @@ #include -unsigned char * _mbstok(unsigned char *s, const unsigned char *delim) +unsigned char * _mbstok(unsigned char *s, unsigned char *delim) { const char *spanp; int c, sc; diff --git a/reactos/lib/crtdll/search/lfind.c b/reactos/lib/crtdll/search/lfind.c index b1e76345a85..15697359e6c 100644 --- a/reactos/lib/crtdll/search/lfind.c +++ b/reactos/lib/crtdll/search/lfind.c @@ -14,4 +14,4 @@ void *_lfind(const void *key, const void *base, size_t *nelp, } return NULL; } - \ No newline at end of file + diff --git a/reactos/lib/crtdll/search/lsearch.c b/reactos/lib/crtdll/search/lsearch.c index 392cf92af27..f388d073b5f 100644 --- a/reactos/lib/crtdll/search/lsearch.c +++ b/reactos/lib/crtdll/search/lsearch.c @@ -12,4 +12,5 @@ void *_lsearch(const void *key, void *base, size_t *nelp, size_t width, memcpy( base + (*nelp*width), key, width ); (*nelp)++; return base ; -} \ No newline at end of file +} + diff --git a/reactos/lib/crtdll/stdio/vscanf.c b/reactos/lib/crtdll/stdio/vscanf.c index 288e365ec94..f7abe3851c7 100644 --- a/reactos/lib/crtdll/stdio/vscanf.c +++ b/reactos/lib/crtdll/stdio/vscanf.c @@ -32,4 +32,5 @@ __vscanf (const char *format, va_list arg) { return __vfscanf (stdin, format, arg); } -//weak_alias (__vscanf, vscanf) \ No newline at end of file +//weak_alias (__vscanf, vscanf) + diff --git a/reactos/lib/crtdll/stdio/vsscanf.c b/reactos/lib/crtdll/stdio/vsscanf.c index 9420a0ca783..e5f9719bb5b 100644 --- a/reactos/lib/crtdll/stdio/vsscanf.c +++ b/reactos/lib/crtdll/stdio/vsscanf.c @@ -54,4 +54,5 @@ __vsscanf (const char *s,const char *format,va_list arg) } -//weak_alias (__vsscanf, vsscanf) \ No newline at end of file +//weak_alias (__vsscanf, vsscanf) + diff --git a/reactos/lib/crtdll/stdlib/mbstowcs.c b/reactos/lib/crtdll/stdlib/mbstowcs.c index 6e0f5589791..bb459dcebb7 100644 --- a/reactos/lib/crtdll/stdlib/mbstowcs.c +++ b/reactos/lib/crtdll/stdlib/mbstowcs.c @@ -9,3 +9,4 @@ int mbtowc( wchar_t *wchar, const char *mbchar, size_t count ) { return 0; } + diff --git a/reactos/lib/crtdll/tchar/strspnp.c b/reactos/lib/crtdll/tchar/strspnp.c index 06b5626b31b..36567405219 100644 --- a/reactos/lib/crtdll/tchar/strspnp.c +++ b/reactos/lib/crtdll/tchar/strspnp.c @@ -5,4 +5,5 @@ char * _strspnp( const char * str1, const char * str2) { return NULL; -} \ No newline at end of file +} + diff --git a/reactos/lib/msvcrt/ctype/toupper.c b/reactos/lib/msvcrt/ctype/toupper.c index ae4c2e0f358..666cee28a79 100644 --- a/reactos/lib/msvcrt/ctype/toupper.c +++ b/reactos/lib/msvcrt/ctype/toupper.c @@ -32,4 +32,5 @@ wchar_t _towupper(wchar_t c) return (c + (L'A' - L'a')); return(c); } -*/ \ No newline at end of file +*/ + diff --git a/reactos/lib/msvcrt/except/xcptfil.c b/reactos/lib/msvcrt/except/xcptfil.c index f708d212f6b..0a4271aa9e2 100644 --- a/reactos/lib/msvcrt/except/xcptfil.c +++ b/reactos/lib/msvcrt/except/xcptfil.c @@ -7,4 +7,5 @@ _XcptFilter(DWORD ExceptionCode, { //fixme XcptFilter // return UnhandledExceptionFilter(ExceptionInfo); -} \ No newline at end of file +} + diff --git a/reactos/lib/msvcrt/float/copysign.c b/reactos/lib/msvcrt/float/copysign.c index 41762ad4804..1c488b4d4bf 100644 --- a/reactos/lib/msvcrt/float/copysign.c +++ b/reactos/lib/msvcrt/float/copysign.c @@ -10,3 +10,4 @@ double _copysign (double __d, double __s) return __d; } + diff --git a/reactos/lib/msvcrt/math/j0_y0.c b/reactos/lib/msvcrt/math/j0_y0.c index 5f63c53c3b5..db89a92acaa 100644 --- a/reactos/lib/msvcrt/math/j0_y0.c +++ b/reactos/lib/msvcrt/math/j0_y0.c @@ -8,4 +8,5 @@ double _j0(double x) double _y0(double x) { return x; -} \ No newline at end of file +} + diff --git a/reactos/lib/msvcrt/mbstring/ischira.c b/reactos/lib/msvcrt/mbstring/ischira.c index bb37baf683d..b27bf6ec9d1 100644 --- a/reactos/lib/msvcrt/mbstring/ischira.c +++ b/reactos/lib/msvcrt/mbstring/ischira.c @@ -30,3 +30,4 @@ unsigned int _mbctokata( unsigned int c ) { return c; } + diff --git a/reactos/lib/msvcrt/mbstring/ismbal.c b/reactos/lib/msvcrt/mbstring/ismbal.c index 9b3b65bf8ad..ee59df2ef98 100644 --- a/reactos/lib/msvcrt/mbstring/ismbal.c +++ b/reactos/lib/msvcrt/mbstring/ismbal.c @@ -14,3 +14,4 @@ int _ismbbalpha(unsigned char c) { return (isalpha(c) || _ismbbkalnum(c)); } + diff --git a/reactos/lib/msvcrt/mbstring/ismbaln.c b/reactos/lib/msvcrt/mbstring/ismbaln.c index 85c270192aa..a72f4d89a64 100644 --- a/reactos/lib/msvcrt/mbstring/ismbaln.c +++ b/reactos/lib/msvcrt/mbstring/ismbaln.c @@ -6,3 +6,4 @@ int _ismbbalnum(unsigned char c) { return (isalnum(c) || _ismbbkalnum(c)); } + diff --git a/reactos/lib/msvcrt/mbstring/ismbpun.c b/reactos/lib/msvcrt/mbstring/ismbpun.c index 8b6d673659c..171b1a40b45 100644 --- a/reactos/lib/msvcrt/mbstring/ismbpun.c +++ b/reactos/lib/msvcrt/mbstring/ismbpun.c @@ -11,3 +11,4 @@ int _ismbbpunct(unsigned char c) // (0xA1 <= c <= 0xA6) return (ispunct(c) || _ismbbkana(c)); } + diff --git a/reactos/lib/msvcrt/mbstring/mbstok.c b/reactos/lib/msvcrt/mbstring/mbstok.c index fcd2f6525cd..3c6809738ff 100644 --- a/reactos/lib/msvcrt/mbstring/mbstok.c +++ b/reactos/lib/msvcrt/mbstring/mbstok.c @@ -1,6 +1,6 @@ #include -unsigned char * _mbstok(unsigned char *s, const unsigned char *delim) +unsigned char * _mbstok(unsigned char *s, unsigned char *delim) { const char *spanp; int c, sc; diff --git a/reactos/lib/msvcrt/mbstring/mbsupr.c b/reactos/lib/msvcrt/mbstring/mbsupr.c index 3c937164b6f..8f8ac5b755f 100644 --- a/reactos/lib/msvcrt/mbstring/mbsupr.c +++ b/reactos/lib/msvcrt/mbstring/mbsupr.c @@ -47,4 +47,5 @@ unsigned char * _mbsupr(unsigned char *x) } } return x; -} \ No newline at end of file +} + diff --git a/reactos/lib/msvcrt/misc/dllmain.c b/reactos/lib/msvcrt/misc/dllmain.c index 64db216ac7a..870f5368213 100644 --- a/reactos/lib/msvcrt/misc/dllmain.c +++ b/reactos/lib/msvcrt/misc/dllmain.c @@ -1,5 +1,5 @@ -/* $Id: dllmain.c,v 1.12 2002/04/28 22:37:00 hbirr Exp $ - * +/* $Id: dllmain.c,v 1.13 2002/05/05 14:57:41 chorns Exp $ + * * ReactOS MSVCRT.DLL Compatibility Library */ #include diff --git a/reactos/lib/msvcrt/misc/tls.c b/reactos/lib/msvcrt/misc/tls.c index 80d86b77869..1e8a81b49ec 100644 --- a/reactos/lib/msvcrt/misc/tls.c +++ b/reactos/lib/msvcrt/misc/tls.c @@ -97,4 +97,5 @@ PTHREADDATA GetThreadData(void) return ThreadData; } -/* EOF */ \ No newline at end of file +/* EOF */ + diff --git a/reactos/lib/msvcrt/search/lfind.c b/reactos/lib/msvcrt/search/lfind.c index 6d0a7d8a8e3..210a14942f6 100644 --- a/reactos/lib/msvcrt/search/lfind.c +++ b/reactos/lib/msvcrt/search/lfind.c @@ -16,3 +16,4 @@ void *_lfind(const void *key, const void *base, size_t *nelp, } return NULL; } + diff --git a/reactos/lib/msvcrt/search/lsearch.c b/reactos/lib/msvcrt/search/lsearch.c index 950952245af..a1ada3f029d 100644 --- a/reactos/lib/msvcrt/search/lsearch.c +++ b/reactos/lib/msvcrt/search/lsearch.c @@ -14,3 +14,4 @@ void *_lsearch(const void *key, void *base, size_t *nelp, size_t width, (*nelp)++; return base; } + diff --git a/reactos/lib/msvcrt/stdio/vscanf.c b/reactos/lib/msvcrt/stdio/vscanf.c index 81e508f89a3..4c6b7968964 100644 --- a/reactos/lib/msvcrt/stdio/vscanf.c +++ b/reactos/lib/msvcrt/stdio/vscanf.c @@ -31,3 +31,4 @@ int __vscanf (const char *format, va_list arg) { return __vfscanf(stdin, format, arg); } + diff --git a/reactos/lib/msvcrt/stdio/vsscanf.c b/reactos/lib/msvcrt/stdio/vsscanf.c index 26f7908fe9a..42348a1a111 100644 --- a/reactos/lib/msvcrt/stdio/vsscanf.c +++ b/reactos/lib/msvcrt/stdio/vsscanf.c @@ -47,3 +47,4 @@ int __vsscanf(const char *s,const char *format,va_list arg) return __vfscanf(&f, format, arg); } + diff --git a/reactos/lib/msvcrt/stdlib/errno.c b/reactos/lib/msvcrt/stdlib/errno.c index a77dba0fa7d..598d665efcc 100644 --- a/reactos/lib/msvcrt/stdlib/errno.c +++ b/reactos/lib/msvcrt/stdlib/errno.c @@ -1,4 +1,4 @@ -/* $Id: errno.c,v 1.5 2001/10/04 16:06:36 ekohl Exp $ +/* $Id: errno.c,v 1.6 2002/05/05 14:57:42 chorns Exp $ * */ @@ -6,7 +6,7 @@ #include #include -unsigned long *__doserrno(void) +int* __doserrno(void) { return(&GetThreadData()->tdoserrno); } diff --git a/reactos/lib/ntdll/main/dllmain.c b/reactos/lib/ntdll/main/dllmain.c index 3b40ecaa27c..a1c5559b158 100644 --- a/reactos/lib/ntdll/main/dllmain.c +++ b/reactos/lib/ntdll/main/dllmain.c @@ -1,4 +1,4 @@ -/* $Id: dllmain.c,v 1.7 2000/06/29 23:35:28 dwelch Exp $ +/* $Id: dllmain.c,v 1.8 2002/05/05 14:57:42 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -13,8 +13,8 @@ #include #include -BOOL WINAPI DllMainCRTStartup(HINSTANCE hinstDll, - DWORD fdwReason, +BOOL WINAPI DllMainCRTStartup(HINSTANCE hinstDll, + DWORD fdwReason, LPVOID fImpLoad) { return TRUE; diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index 58646bff83e..399c319c9bf 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.67 2002/03/22 20:58:23 chorns Exp $ +# $Id: Makefile,v 1.68 2002/05/05 14:57:42 chorns Exp $ # # ReactOS Operating System # @@ -104,7 +104,6 @@ OBJECTS_RTL = \ rtl/timezone.o \ rtl/unicode.o \ rtl/wstring.o \ - rtl/bitops.o \ rtl/memcmp.o \ rtl/capture.o diff --git a/reactos/ntoskrnl/cc/view.c b/reactos/ntoskrnl/cc/view.c index 94b932035fa..ec985abfe35 100644 --- a/reactos/ntoskrnl/cc/view.c +++ b/reactos/ntoskrnl/cc/view.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: view.c,v 1.37 2002/02/08 02:57:06 chorns Exp $ +/* $Id: view.c,v 1.38 2002/05/05 14:57:42 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -32,7 +32,7 @@ * * This is not the NT implementation of a file cache nor anything much like * it. - * + * * The general procedure for a filesystem to implement a read or write * dispatch routine is as follows * @@ -62,6 +62,8 @@ #define NDEBUG #include +extern void * alloca(size_t); + /* GLOBALS *******************************************************************/ #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S)) @@ -76,7 +78,7 @@ static LIST_ENTRY CacheSegmentLRUListHead; static FAST_MUTEX ViewLock; -NTSTATUS STDCALL +NTSTATUS STDCALL CcRosInternalFreeCacheSegment(PBCB Bcb, PCACHE_SEGMENT CacheSeg); /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index b2f9fde4824..1ab4afea0bb 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.70 2002/03/16 19:57:26 ekohl Exp $ +/* $Id: registry.c,v 1.71 2002/05/05 14:57:43 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -599,19 +599,19 @@ CmiInitHives(BOOLEAN SetUpBoot) /* Connect the SOFTWARE hive */ Status = CmiInitializeHive(SOFTWARE_REG_FILE, REG_SOFTWARE_KEY_NAME, "Software", CmiMachineKey, SetUpBoot); - assert(NT_SUCCESS(Status)); + //assert(NT_SUCCESS(Status)); /* Connect the SAM hive */ Status = CmiInitializeHive(SAM_REG_FILE,REG_SAM_KEY_NAME, "Sam", CmiMachineKey, SetUpBoot); - assert(NT_SUCCESS(Status)); + //assert(NT_SUCCESS(Status)); /* Connect the SECURITY hive */ Status = CmiInitializeHive(SEC_REG_FILE, REG_SEC_KEY_NAME, "Security", CmiMachineKey, SetUpBoot); - assert(NT_SUCCESS(Status)); + //assert(NT_SUCCESS(Status)); /* Connect the DEFAULT hive */ Status = CmiInitializeHive(USER_REG_FILE, REG_USER_KEY_NAME, ".Default", CmiUserKey, SetUpBoot); - assert(NT_SUCCESS(Status)); + //assert(NT_SUCCESS(Status)); /* FIXME : initialize standards symbolic links */ diff --git a/reactos/ntoskrnl/dbg/kdb.c b/reactos/ntoskrnl/dbg/kdb.c index 69bd4bbf363..7638e5daea3 100644 --- a/reactos/ntoskrnl/dbg/kdb.c +++ b/reactos/ntoskrnl/dbg/kdb.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: kdb.c,v 1.5 2001/05/05 19:13:08 chorns Exp $ +/* $Id: kdb.c,v 1.6 2002/05/05 14:57:43 chorns Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/kdb.c @@ -94,7 +94,7 @@ struct * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. */ -static unsigned long +unsigned long strtoul(const char *nptr, char **endptr, int base) { const char *s = nptr; diff --git a/reactos/ntoskrnl/include/internal/se.h b/reactos/ntoskrnl/include/internal/se.h index 379aba54af1..abcc20d87dd 100644 --- a/reactos/ntoskrnl/include/internal/se.h +++ b/reactos/ntoskrnl/include/internal/se.h @@ -119,4 +119,4 @@ NTSTATUS SeCaptureLuidAndAttributesArray(PLUID_AND_ATTRIBUTES Src, #endif /* __NTOSKRNL_INCLUDE_INTERNAL_SE_H */ -/* EOF */ \ No newline at end of file +/* EOF */ diff --git a/reactos/ntoskrnl/io/arcname.c b/reactos/ntoskrnl/io/arcname.c index 8b9713c1f83..361f31dfc48 100644 --- a/reactos/ntoskrnl/io/arcname.c +++ b/reactos/ntoskrnl/io/arcname.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: arcname.c,v 1.2 2002/03/15 23:59:38 ekohl Exp $ +/* $Id: arcname.c,v 1.3 2002/05/05 14:57:43 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -309,4 +309,4 @@ IoCreateSystemRootLink(PCHAR ParameterLine) return(STATUS_SUCCESS); } -/* EOF */ \ No newline at end of file +/* EOF */ diff --git a/reactos/ntoskrnl/io/device.c b/reactos/ntoskrnl/io/device.c index 32cc75cf008..ff9b00c9c99 100644 --- a/reactos/ntoskrnl/io/device.c +++ b/reactos/ntoskrnl/io/device.c @@ -1,4 +1,4 @@ -/* $Id: device.c,v 1.39 2002/04/19 20:27:20 ekohl Exp $ +/* $Id: device.c,v 1.40 2002/05/05 14:57:43 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -228,7 +228,7 @@ IoGetAttachedDevice(PDEVICE_OBJECT DeviceObject) Current = Current->AttachedDevice; // DPRINT("Current %x\n",Current); } - + // DPRINT("IoGetAttachedDevice() = %x\n",DeviceObject); return(Current); } @@ -238,7 +238,7 @@ STDCALL IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject) { PDEVICE_OBJECT Current = DeviceObject; - + while (Current->AttachedDevice!=NULL) { Current = Current->AttachedDevice; @@ -256,7 +256,7 @@ IoAttachDeviceToDeviceStack(PDEVICE_OBJECT SourceDevice, DPRINT("IoAttachDeviceToDeviceStack(SourceDevice %x, TargetDevice %x)\n", SourceDevice,TargetDevice); - + AttachedDevice = IoGetAttachedDevice(TargetDevice); AttachedDevice->AttachedDevice = SourceDevice; SourceDevice->AttachedDevice = NULL; @@ -273,7 +273,6 @@ IoRegisterDriverReinitialization(PDRIVER_OBJECT DriverObject, UNIMPLEMENTED; } - NTSTATUS STDCALL IopDefaultDispatchFunction(PDEVICE_OBJECT DeviceObject, PIRP Irp) @@ -285,7 +284,6 @@ IopDefaultDispatchFunction(PDEVICE_OBJECT DeviceObject, return(STATUS_NOT_IMPLEMENTED); } - NTSTATUS IopCreateDriverObject(PDRIVER_OBJECT *DriverObject) { @@ -315,10 +313,10 @@ IopCreateDriverObject(PDRIVER_OBJECT *DriverObject) RtlZeroMemory(Object->DriverExtension, sizeof(DRIVER_EXTENSION)); Object->Type = InternalDriverType; - + for (i=0; i<=IRP_MJ_MAXIMUM_FUNCTION; i++) { - Object->MajorFunction[i] = IopDefaultDispatchFunction; + Object->MajorFunction[i] = (PDRIVER_DISPATCH) IopDefaultDispatchFunction; } *DriverObject = Object; diff --git a/reactos/ntoskrnl/io/pnproot.c b/reactos/ntoskrnl/io/pnproot.c index 1acb0a88432..8c9f5541c51 100644 --- a/reactos/ntoskrnl/io/pnproot.c +++ b/reactos/ntoskrnl/io/pnproot.c @@ -1,4 +1,4 @@ -/* $Id: pnproot.c,v 1.6 2001/09/16 13:19:32 chorns Exp $ +/* $Id: pnproot.c,v 1.7 2002/05/05 14:57:43 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -64,7 +64,7 @@ typedef struct _PNPROOT_COMMON_DEVICE_EXTENSION typedef struct _PNPROOT_PDO_DEVICE_EXTENSION { // Common device data - PNPROOT_COMMON_DEVICE_EXTENSION; + PNPROOT_COMMON_DEVICE_EXTENSION Common; // Device ID UNICODE_STRING DeviceID; // Instance ID @@ -75,7 +75,7 @@ typedef struct _PNPROOT_PDO_DEVICE_EXTENSION typedef struct _PNPROOT_FDO_DEVICE_EXTENSION { // Common device data - PNPROOT_COMMON_DEVICE_EXTENSION; + PNPROOT_COMMON_DEVICE_EXTENSION Common; // Physical Device Object PDEVICE_OBJECT Pdo; // Lower device object @@ -144,11 +144,11 @@ PnpRootCreateDevice( RtlZeroMemory(PdoDeviceExtension, sizeof(PNPROOT_PDO_DEVICE_EXTENSION)); - PdoDeviceExtension->IsFDO = FALSE; + PdoDeviceExtension->Common.IsFDO = FALSE; - PdoDeviceExtension->DeviceObject = Device->Pdo; + PdoDeviceExtension->Common.DeviceObject = Device->Pdo; - PdoDeviceExtension->DevicePowerState = PowerDeviceD0; + PdoDeviceExtension->Common.DevicePowerState = PowerDeviceD0; if (!IopCreateUnicodeString( &PdoDeviceExtension->DeviceID, @@ -648,11 +648,11 @@ PnpRootQueryBusRelations( RtlZeroMemory(PdoDeviceExtension, sizeof(PNPROOT_PDO_DEVICE_EXTENSION)); - PdoDeviceExtension->IsFDO = FALSE; + PdoDeviceExtension->Common.IsFDO = FALSE; - PdoDeviceExtension->DeviceObject = Device->Pdo; + PdoDeviceExtension->Common.DeviceObject = Device->Pdo; - PdoDeviceExtension->DevicePowerState = PowerDeviceD0; + PdoDeviceExtension->Common.DevicePowerState = PowerDeviceD0; if (!IopCreateUnicodeString( &PdoDeviceExtension->DeviceID, @@ -913,7 +913,7 @@ PnpRootAddDevice( RtlZeroMemory(DeviceExtension, sizeof(PNPROOT_FDO_DEVICE_EXTENSION)); - DeviceExtension->IsFDO = TRUE; + DeviceExtension->Common.IsFDO = TRUE; DeviceExtension->State = dsStopped; @@ -955,8 +955,8 @@ PnpRootDriverEntry( { DPRINT("Called\n"); - DriverObject->MajorFunction[IRP_MJ_PNP] = PnpRootPnpControl; - DriverObject->MajorFunction[IRP_MJ_POWER] = PnpRootPowerControl; + DriverObject->MajorFunction[IRP_MJ_PNP] = (PDRIVER_DISPATCH) PnpRootPnpControl; + DriverObject->MajorFunction[IRP_MJ_POWER] = (PDRIVER_DISPATCH) PnpRootPowerControl; DriverObject->DriverExtension->AddDevice = PnpRootAddDevice; return STATUS_SUCCESS; diff --git a/reactos/ntoskrnl/io/xhaldisp.c b/reactos/ntoskrnl/io/xhaldisp.c index a847773fb5c..a486bd36589 100644 --- a/reactos/ntoskrnl/io/xhaldisp.c +++ b/reactos/ntoskrnl/io/xhaldisp.c @@ -1,4 +1,4 @@ -/* $Id: xhaldisp.c,v 1.4 2001/06/08 15:11:04 ekohl Exp $ +/* $Id: xhaldisp.c,v 1.5 2002/05/05 14:57:43 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -20,18 +20,18 @@ HAL_DISPATCH EXPORTED HalDispatchTable = { HAL_DISPATCH_VERSION, - NULL, // HalQuerySystemInformation - NULL, // HalSetSystemInformation - NULL, // HalQueryBusSlots - NULL, // HalDeviceControl - xHalExamineMBR, - xHalIoAssignDriveLetters, - xHalIoReadPartitionTable, - xHalIoSetPartitionInformation, - xHalIoWritePartitionTable, - NULL, // HalReferenceHandlerForBus - NULL, // HalReferenceBusHandler - NULL // HalDereferenceBusHandler + (pHalQuerySystemInformation) NULL, // HalQuerySystemInformation + (pHalSetSystemInformation) NULL, // HalSetSystemInformation + (pHalQueryBusSlots) NULL, // HalQueryBusSlots + (pHalDeviceControl) NULL, // HalDeviceControl + (pHalExamineMBR) xHalExamineMBR, + (pHalIoAssignDriveLetters) xHalIoAssignDriveLetters, + (pHalIoReadPartitionTable) xHalIoReadPartitionTable, + (pHalIoSetPartitionInformation) xHalIoSetPartitionInformation, + (pHalIoWritePartitionTable) xHalIoWritePartitionTable, + (pHalHandlerForBus) NULL, // HalReferenceHandlerForBus + (pHalReferenceBusHandler) NULL, // HalReferenceBusHandler + (pHalReferenceBusHandler) NULL // HalDereferenceBusHandler }; diff --git a/reactos/ntoskrnl/kd/gdbstub.c b/reactos/ntoskrnl/kd/gdbstub.c index 6ac9125b425..4e99b1560aa 100644 --- a/reactos/ntoskrnl/kd/gdbstub.c +++ b/reactos/ntoskrnl/kd/gdbstub.c @@ -151,7 +151,7 @@ static CPU_REGISTER GspRegisters[NUMREGS] = { 4, FIELD_OFFSET (KTRAP_FRAME_X86, Gs) } }; -static CHAR GspThreadStates[THREAD_STATE_MAX] = +static PCHAR GspThreadStates[THREAD_STATE_MAX] = { "Invalid", /* THREAD_STATE_INVALID */ "Runnable", /* THREAD_STATE_RUNNABLE */ @@ -742,7 +742,7 @@ GspQuery(PCHAR Request) /* Get thread information */ if (GspFindThread (ptr, &ThreadInfo)) { - PCHAR String = &GspThreadStates[ThreadInfo->Tcb.State]; + PCHAR String = GspThreadStates[ThreadInfo->Tcb.State]; GspMem2Hex (String, &GspOutBuffer[0], strlen (String), FALSE); } } diff --git a/reactos/ntoskrnl/ke/i386/irqhand.s b/reactos/ntoskrnl/ke/i386/irqhand.s index 4694bbc9276..d54a97c3c82 100644 --- a/reactos/ntoskrnl/ke/i386/irqhand.s +++ b/reactos/ntoskrnl/ke/i386/irqhand.s @@ -401,4 +401,3 @@ _irq_handler_15: popa iret - \ No newline at end of file diff --git a/reactos/ntoskrnl/ke/i386/stkswitch.S b/reactos/ntoskrnl/ke/i386/stkswitch.S index d87aafd7a23..5d602d28f80 100644 --- a/reactos/ntoskrnl/ke/i386/stkswitch.S +++ b/reactos/ntoskrnl/ke/i386/stkswitch.S @@ -78,4 +78,4 @@ _KePushAndStackSwitchAndSysRet@28: call _KeLowerIrql@4 jmp KeReturnFromSystemCall - \ No newline at end of file + diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index 51176716fcf..782ea5e3ace 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: main.c,v 1.120 2002/05/02 23:45:33 dwelch Exp $ +/* $Id: main.c,v 1.121 2002/05/05 14:57:44 chorns Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/main.c @@ -202,7 +202,7 @@ VOID CreateDefaultRegistryForLegacyDriver( } #ifdef FULLREG DwordData = 0; - Length = Length = sizeof(DWORD); + Length = sizeof(DWORD); Status = RtlWriteRegistryValue( RTL_REGISTRY_HANDLE, (PWSTR)KeyHandle, diff --git a/reactos/ntoskrnl/rtl/bitops.c b/reactos/ntoskrnl/rtl/bitops.c deleted file mode 100644 index 7f2b3356e5d..00000000000 --- a/reactos/ntoskrnl/rtl/bitops.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * ReactOS kernel - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * Copyright 1992, Linus Torvalds. - */ -/* - * These have to be done with inline assembly: that way the bit-setting - * is guaranteed to be atomic. All bit operations return 0 if the bit - * was cleared before the operation and != 0 if it was not. - * - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). - */ - -#ifdef __SMP__ -#define LOCK_PREFIX "lock ; " -#else -#define LOCK_PREFIX "" -#endif - -/* - * Function prototypes to keep gcc -Wall happy - */ -extern void set_bit(int nr, volatile void * addr); -extern void clear_bit(int nr, volatile void * addr); -extern void change_bit(int nr, volatile void * addr); -extern int test_and_set_bit(int nr, volatile void * addr); -extern int test_and_clear_bit(int nr, volatile void * addr); -extern int test_and_change_bit(int nr, volatile void * addr); -extern int __constant_test_bit(int nr, const volatile void * addr); -extern int __test_bit(int nr, volatile void * addr); -extern int find_first_zero_bit(void * addr, unsigned size); -extern int find_next_zero_bit (void * addr, int size, int offset); -extern unsigned long ffz(unsigned long word); - -/* - * Some hacks to defeat gcc over-optimizations.. - */ -struct __dummy { unsigned long a[100]; }; -#define ADDR (*(volatile struct __dummy *) addr) -#define CONST_ADDR (*(volatile const struct __dummy *) addr) - -void set_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btsl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -void clear_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btrl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -void change_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btcl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -int test_and_set_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btsl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr)); - return oldbit; -} - -int test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr)); - return oldbit; -} - -int test_and_change_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btcl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr)); - return oldbit; -} - -/* - * This routine doesn't need to be atomic. - */ -int __constant_test_bit(int nr, const volatile void * addr) -{ - return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -} - -int test_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( - "btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (ADDR),"Ir" (nr)); - return oldbit; -} - -#if 0 -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - __constant_test_bit((nr),(addr)) : \ - __test_bit((nr),(addr))) -#endif - -/* - * Find-bit routines.. - */ -int find_first_zero_bit(void * addr, unsigned size) -{ - int d0, d1, d2; - int res; - - if (!size) - return 0; - __asm__("cld\n\t" - "movl $-1,%%eax\n\t" - "xorl %%edx,%%edx\n\t" - "repe; scasl\n\t" - "je 1f\n\t" - "xorl -4(%%edi),%%eax\n\t" - "subl $4,%%edi\n\t" - "bsfl %%eax,%%edx\n" - "1:\tsubl %%ebx,%%edi\n\t" - "shll $3,%%edi\n\t" - "addl %%edi,%%edx" - :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) - :"1" ((size + 31) >> 5), "2" (addr), "b" (addr)); - return res; -} - -int find_next_zero_bit (void * addr, int size, int offset) -{ - unsigned long * p = ((unsigned long *) addr) + (offset >> 5); - int set = 0, bit = offset & 31, res; - - if (bit) { - /* - * Look for zero in first byte - */ - __asm__("bsfl %1,%0\n\t" - "jne 1f\n\t" - "movl $32, %0\n" - "1:" - : "=r" (set) - : "r" (~(*p >> bit))); - if (set < (32 - bit)) - return set + offset; - set = 32 - bit; - p++; - } - /* - * No zero yet, search remaining full bytes for a zero - */ - res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr)); - return (offset + set + res); -} - -/* - * ffz = Find First Zero in word. Undefined if no zero exists, - * so code should check against ~0UL first.. - */ -unsigned long ffz(unsigned long word) -{ - __asm__("bsfl %1,%0" - :"=r" (word) - :"r" (~word)); - return word; -} diff --git a/reactos/ntoskrnl/rtl/timezone.c b/reactos/ntoskrnl/rtl/timezone.c index 1afd8747962..530ea3a6bce 100644 --- a/reactos/ntoskrnl/rtl/timezone.c +++ b/reactos/ntoskrnl/rtl/timezone.c @@ -1,4 +1,4 @@ -/* $Id: timezone.c,v 1.1 2001/06/01 17:13:24 ekohl Exp $ +/* $Id: timezone.c,v 1.2 2002/05/05 14:57:44 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -31,7 +31,7 @@ RtlQueryTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation) NTSTATUS Status; DPRINT("RtlQueryTimeZoneInformation()\n"); - + Status = RtlpGetRegistryHandle(RTL_REGISTRY_CONTROL, L"TimeZoneInformation", TRUE, @@ -64,7 +64,7 @@ RtlQueryTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation) QueryTable[2].Name = L"Standard Bias"; QueryTable[2].Flags = RTL_QUERY_REGISTRY_DIRECT; QueryTable[2].EntryContext = &TimeZoneInformation->StandardBias; - + QueryTable[3].Name = L"Standard Start"; QueryTable[3].Flags = RTL_QUERY_REGISTRY_DIRECT; QueryTable[3].EntryContext = &TimeZoneInformation->StandardDate; @@ -197,4 +197,4 @@ RtlSetTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation) return Status; } -/* EOF */ \ No newline at end of file +/* EOF */ diff --git a/reactos/rules.mak b/reactos/rules.mak index 80af5bf28ba..aea4839992a 100644 --- a/reactos/rules.mak +++ b/reactos/rules.mak @@ -20,27 +20,28 @@ endif # ifeq ($(HOST),mingw32-linux) NASM_FORMAT = win32 -#PREFIX = i586-mingw32- -PREFIX = /usr/mingw32-2.95.3-fc/bin/mingw32-pc- -EXE_POSTFIX := +PREFIX = i386-mingw32msv- +EXE_POSTFIX := EXE_PREFIX := ./ DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as NASM_CMD = nasm DOSCLI = FLOPPY_DIR = /mnt/floppy SEP := / +PIPE := endif ifeq ($(HOST),mingw32-windows) NASM_FORMAT = win32 -PREFIX = -EXE_PREFIX := +PREFIX = +EXE_PREFIX := EXE_POSTFIX := .exe DLLTOOL = $(PREFIX)dlltool --as=$(PREFIX)as NASM_CMD = nasmw DOSCLI = yes FLOPPY_DIR = A: SEP := \$(EMPTY_VAR) +PIPE := -pipe endif @@ -63,7 +64,7 @@ LD = $(PREFIX)ld NM = $(PREFIX)nm OBJCOPY = $(PREFIX)objcopy STRIP = $(PREFIX)strip -AS = $(PREFIX)gcc -c -x assembler-with-cpp +AS = $(PREFIX)gcc -c -x assembler-with-cpp CPP = $(PREFIX)cpp AR = $(PREFIX)ar RC = $(PREFIX)windres @@ -79,7 +80,15 @@ MC = $(TOOLS_PATH)/wmc/wmc # Maybe we can delete these soon -CFLAGS := $(CFLAGS) -I$(PATH_TO_TOP)/include -pipe -m386 + +ifeq ($(HOST),mingw32-linux) +CFLAGS := $(CFLAGS) -I$(PATH_TO_TOP)/include -march=i386 +endif + +ifeq ($(HOST),mingw32-windows) +CFLAGS := $(CFLAGS) -I$(PATH_TO_TOP)/include -pipe -march=i386 +endif + CXXFLAGS = $(CFLAGS) NFLAGS = -i$(PATH_TO_TOP)/include/ -f$(NASM_FORMAT) -d$(NASM_FORMAT) ASFLAGS := $(ASFLAGS) -I$(PATH_TO_TOP)/include -D__ASM__ diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index 453f49e7b60..e785179d4d8 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -1,4 +1,4 @@ -# $Id: helper.mk,v 1.12 2002/04/29 23:02:12 hyperion Exp $ +# $Id: helper.mk,v 1.13 2002/05/05 14:57:45 chorns Exp $ # # Helper makefile for ReactOS modules # Variables this makefile accepts: @@ -350,12 +350,12 @@ endif ifeq ($(MK_MODE),user) MK_DEFBASE := 0x400000 - MK_LIBS := $(addprefix $(SDK_PATH_LIB)/, $(MK_SDKLIBS) $(TARGET_SDKLIBS)) + MK_LIBS := $(addprefix $(SDK_PATH_LIB)/, $(MK_SDKLIBS) $(TARGET_SDKLIBS)) $(TARGET_LIBS) endif ifeq ($(MK_MODE),kernel) MK_DEFBASE := 0x10000 - MK_LIBS := $(addprefix $(DDK_PATH_LIB)/, $(MK_DDKLIBS) $(TARGET_DDKLIBS)) + MK_LIBS := $(addprefix $(DDK_PATH_LIB)/, $(MK_DDKLIBS) $(TARGET_DDKLIBS)) $(TARGET_LIBS) endif @@ -374,17 +374,16 @@ endif # include $(PATH_TO_TOP)/config - TARGET_CFLAGS += $(MK_CFLAGS) -TARGET_CFLAGS += -pipe -march=$(ARCH) +TARGET_CFLAGS += $(PIPE) -march=$(ARCH) TARGET_CPPFLAGS += $(MK_CPPFLAGS) -TARGET_CPPFLAGS += -pipe -march=$(ARCH) +TARGET_CPPFLAGS += $(PIPE) -march=$(ARCH) TARGET_RCFLAGS += $(MK_RCFLAGS) TARGET_ASFLAGS += $(MK_ASFLAGS) -TARGET_ASFLAGS += -pipe -march=$(ARCH) +TARGET_ASFLAGS += $(PIPE) -march=$(ARCH) TARGET_NFLAGS += $(MK_NFLAGS) @@ -397,7 +396,7 @@ MK_IMPLIB_FULLNAME := $(MK_BASENAME)$(MK_IMPLIB_EXT) MK_NOSTRIPNAME := $(MK_BASENAME).nostrip$(MK_EXT) # We don't want to link header files -MK_OBJECTS := $(filter-out %.h,$(TARGET_OBJECTS)) +MK_OBJECTS := $(filter-out %.h,$(TARGET_OBJECTS)) MK_STRIPPED_OBJECT := $(MK_BASENAME).stripped.o ifeq ($(MK_IMPLIBONLY),yes) @@ -417,7 +416,7 @@ else # MK_IMPLIBONLY all: $(MK_FULLNAME) $(MK_NOSTRIPNAME) - + ifeq ($(MK_IMPLIB),yes) MK_EXTRACMD := --def $(MK_EDFNAME) @@ -551,7 +550,7 @@ ifeq ($(MK_IMPLIB),yes) endif # Be carefull not to clean non-object files -MK_CLEANFILES := $(filter %.o,$(MK_OBJECTS)) +MK_CLEANFILES := $(filter %.o,$(MK_OBJECTS)) clean: - $(RM) *.o $(MK_BASENAME).sym $(MK_BASENAME).a $(TARGET_PATH)/$(MK_RES_BASE).coff \