mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Fixed warnings and errors so ReactOS can be compiled with GCC 3.2.
Removed unused ntoskrnl/rtl/bitops.c svn path=/trunk/; revision=2908
This commit is contained in:
parent
b0188a2a7a
commit
9ee98eeca9
69 changed files with 218 additions and 365 deletions
|
@ -792,4 +792,5 @@ VOID
|
|||
|
||||
#endif /* __INCLUDE_ACPI_TYPES_H */
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.) */
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -112,4 +112,5 @@ HalpSetCmosData(PBUS_HANDLER BusHandler,
|
|||
|
||||
#endif /* __INTERNAL_HAL_BUS_H */
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <ntos/types.h>
|
||||
#include <ntos/time.h>
|
||||
#include <ntos/cdrom.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
|
||||
}
|
||||
|
|
|
@ -8,4 +8,5 @@ extern int ungot_char;
|
|||
|
||||
#endif /* __MSVCRT_INTERNAL_CONSOLE_H */
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
||||
|
|
|
@ -34,4 +34,5 @@ PTHREADDATA GetThreadData(void);
|
|||
|
||||
#endif /* __MSVCRT_INTERNAL_TLS_H */
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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_ */
|
||||
|
||||
|
|
|
@ -88,4 +88,4 @@ typedef struct _devicemodeW
|
|||
|
||||
#endif /* __INCLUDE_NTOS_GDITYPES_H */
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -108,4 +108,5 @@ RevertToSelf(VOID)
|
|||
return(TRUE);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@ double _copysign (double __d, double __s)
|
|||
|
||||
return __d;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,4 +29,5 @@ unsigned int _mbctohira( unsigned int c )
|
|||
unsigned int _mbctokata( unsigned int c )
|
||||
{
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,4 +15,5 @@ int _ismbbkalnum( unsigned int c );
|
|||
int _ismbbalpha(unsigned char c)
|
||||
{
|
||||
return (isalpha(c) ||_ismbbkalnum(c));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,4 +6,5 @@ int _ismbbkalnum( unsigned int c );
|
|||
int _ismbbalnum(unsigned char c)
|
||||
{
|
||||
return (isalnum(c) || _ismbbkalnum(c));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,4 +10,5 @@ int _ismbbpunct(unsigned char c)
|
|||
{
|
||||
// (0xA1 <= c <= 0xA6)
|
||||
return (ispunct(c) || _ismbbkana(c));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <crtdll/mbstring.h>
|
||||
|
||||
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;
|
||||
|
|
|
@ -14,4 +14,4 @@ void *_lfind(const void *key, const void *base, size_t *nelp,
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,4 +32,5 @@ __vscanf (const char *format, va_list arg)
|
|||
{
|
||||
return __vfscanf (stdin, format, arg);
|
||||
}
|
||||
//weak_alias (__vscanf, vscanf)
|
||||
//weak_alias (__vscanf, vscanf)
|
||||
|
||||
|
|
|
@ -54,4 +54,5 @@ __vsscanf (const char *s,const char *format,va_list arg)
|
|||
}
|
||||
|
||||
|
||||
//weak_alias (__vsscanf, vsscanf)
|
||||
//weak_alias (__vsscanf, vsscanf)
|
||||
|
||||
|
|
|
@ -9,3 +9,4 @@ int mbtowc( wchar_t *wchar, const char *mbchar, size_t count )
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,4 +5,5 @@
|
|||
char * _strspnp( const char * str1, const char * str2)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,4 +32,5 @@ wchar_t _towupper(wchar_t c)
|
|||
return (c + (L'A' - L'a'));
|
||||
return(c);
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
|
|
|
@ -7,4 +7,5 @@ _XcptFilter(DWORD ExceptionCode,
|
|||
{
|
||||
//fixme XcptFilter
|
||||
// return UnhandledExceptionFilter(ExceptionInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,3 +10,4 @@ double _copysign (double __d, double __s)
|
|||
|
||||
return __d;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@ double _j0(double x)
|
|||
double _y0(double x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,3 +30,4 @@ unsigned int _mbctokata( unsigned int c )
|
|||
{
|
||||
return c;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,3 +14,4 @@ int _ismbbalpha(unsigned char c)
|
|||
{
|
||||
return (isalpha(c) || _ismbbkalnum(c));
|
||||
}
|
||||
|
||||
|
|
|
@ -6,3 +6,4 @@ int _ismbbalnum(unsigned char c)
|
|||
{
|
||||
return (isalnum(c) || _ismbbkalnum(c));
|
||||
}
|
||||
|
||||
|
|
|
@ -11,3 +11,4 @@ int _ismbbpunct(unsigned char c)
|
|||
// (0xA1 <= c <= 0xA6)
|
||||
return (ispunct(c) || _ismbbkana(c));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <msvcrt/mbstring.h>
|
||||
|
||||
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;
|
||||
|
|
|
@ -47,4 +47,5 @@ unsigned char * _mbsupr(unsigned char *x)
|
|||
}
|
||||
}
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <windows.h>
|
||||
|
|
|
@ -97,4 +97,5 @@ PTHREADDATA GetThreadData(void)
|
|||
return ThreadData;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
||||
|
|
|
@ -16,3 +16,4 @@ void *_lfind(const void *key, const void *base, size_t *nelp,
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,3 +14,4 @@ void *_lsearch(const void *key, void *base, size_t *nelp, size_t width,
|
|||
(*nelp)++;
|
||||
return base;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,3 +31,4 @@ int __vscanf (const char *format, va_list arg)
|
|||
{
|
||||
return __vfscanf(stdin, format, arg);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,3 +47,4 @@ int __vsscanf(const char *s,const char *format,va_list arg)
|
|||
|
||||
return __vfscanf(&f, format, arg);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <msvcrt/internal/tls.h>
|
||||
#include <msvcrt/internal/file.h>
|
||||
|
||||
unsigned long *__doserrno(void)
|
||||
int* __doserrno(void)
|
||||
{
|
||||
return(&GetThreadData()->tdoserrno);
|
||||
}
|
||||
|
|
|
@ -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 <ntdll/ntdll.h>
|
||||
#include <windows.h>
|
||||
|
||||
BOOL WINAPI DllMainCRTStartup(HINSTANCE hinstDll,
|
||||
DWORD fdwReason,
|
||||
BOOL WINAPI DllMainCRTStartup(HINSTANCE hinstDll,
|
||||
DWORD fdwReason,
|
||||
LPVOID fImpLoad)
|
||||
{
|
||||
return TRUE;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 <internal/debug.h>
|
||||
|
||||
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 *****************************************************************/
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -119,4 +119,4 @@ NTSTATUS SeCaptureLuidAndAttributesArray(PLUID_AND_ATTRIBUTES Src,
|
|||
|
||||
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_SE_H */
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
|
|
@ -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 */
|
||||
/* EOF */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -401,4 +401,3 @@ _irq_handler_15:
|
|||
popa
|
||||
iret
|
||||
|
||||
|
|
@ -78,4 +78,4 @@ _KePushAndStackSwitchAndSysRet@28:
|
|||
call _KeLowerIrql@4
|
||||
|
||||
jmp KeReturnFromSystemCall
|
||||
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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 */
|
||||
/* EOF */
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue