Author: sginsberg
Date: Sun Jan 18 09:59:21 2009
New Revision: 38898
URL:
http://svn.reactos.org/svn/reactos?rev=38898&view=rev
Log:
- Fix WINEVENTPROC -- it is stdcall, not cdecl!
- Correct the way FONTENUMPROC is defined, and type-cast accordingly in gdi32
- PSECURITY_DESCRIPTOR is an opaque pointer -- use PISECURITY_DESCRIPTOR instead where
necessary
- raddr2line: Fix a warning under Linux host
Modified:
trunk/reactos/base/system/services/rpcserver.c
trunk/reactos/dll/win32/advapi32/token/token.c
trunk/reactos/dll/win32/gdi32/objects/font.c
trunk/reactos/include/psdk/winable.h
trunk/reactos/include/psdk/wingdi.h
trunk/reactos/include/psdk/winnt.h
trunk/reactos/include/psdk/winuser.h
trunk/reactos/lib/rtl/bootdata.c
trunk/reactos/lib/rtl/debug.c
trunk/reactos/lib/rtl/sd.c
trunk/reactos/tools/raddr2line.c
Modified: trunk/reactos/base/system/services/rpcserver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
==============================================================================
--- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -851,11 +851,11 @@
DesiredAccess |= WRITE_OWNER;
if ((dwSecurityInformation & OWNER_SECURITY_INFORMATION) &&
- (((PSECURITY_DESCRIPTOR)lpSecurityDescriptor)->Owner == NULL))
+ (((PISECURITY_DESCRIPTOR)lpSecurityDescriptor)->Owner == NULL))
return ERROR_INVALID_PARAMETER;
if ((dwSecurityInformation & GROUP_SECURITY_INFORMATION) &&
- (((PSECURITY_DESCRIPTOR)lpSecurityDescriptor)->Group == NULL))
+ (((PISECURITY_DESCRIPTOR)lpSecurityDescriptor)->Group == NULL))
return ERROR_INVALID_PARAMETER;
if (!RtlAreAllAccessesGranted(hSvc->Handle.DesiredAccess,
Modified: trunk/reactos/dll/win32/advapi32/token/token.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/token/t…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/token/token.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/token/token.c [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -339,7 +339,7 @@
IN PSID SidToCheck,
OUT PBOOL IsMember)
{
- PSECURITY_DESCRIPTOR SecurityDescriptor = NULL;
+ PISECURITY_DESCRIPTOR SecurityDescriptor = NULL;
ACCESS_MASK GrantedAccess;
struct
{
Modified: trunk/reactos/dll/win32/gdi32/objects/font.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/fo…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/font.c [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -325,8 +325,8 @@
if (Unicode)
{
Ret = ((FONTENUMPROCW) EnumProc)(
- &Info[i].EnumLogFontEx,
- &Info[i].NewTextMetricEx,
+ (VOID*)&Info[i].EnumLogFontEx,
+ (VOID*)&Info[i].NewTextMetricEx,
Info[i].FontType, lParam);
}
else
@@ -341,8 +341,8 @@
NewTextMetricExW2A(&NewTextMetricExA,
&Info[i].NewTextMetricEx);
Ret = ((FONTENUMPROCA) EnumProc)(
- &EnumLogFontExA,
- &NewTextMetricExA,
+ (VOID*)&EnumLogFontExA,
+ (VOID*)&NewTextMetricExA,
Info[i].FontType, lParam);
}
}
@@ -1903,8 +1903,8 @@
{
PNTMW_INTERNAL pNtmwi = (PNTMW_INTERNAL)((ULONG_PTR)pEfdw +
pEfdw->ulNtmwiOffset);
- ret = lpEnumFontFamExProcW(&pEfdw->elfexdv.elfEnumLogfontEx,
- &pNtmwi->ntmw,
+ ret = lpEnumFontFamExProcW((VOID*)&pEfdw->elfexdv.elfEnumLogfontEx,
+ (VOID*)&pNtmwi->ntmw,
pEfdw->dwFontType,
lParam);
Modified: trunk/reactos/include/psdk/winable.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winable.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winable.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winable.h [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -65,7 +65,7 @@
} INPUT,*PINPUT,*LPINPUT;
#endif /* (_WIN32_WINNT < 0x0403) */
#if (WINVER < 0x0500)
-typedef VOID (*WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
+typedef VOID (CALLBACK* WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
typedef struct tagGUITHREADINFO {
DWORD cbSize;
DWORD flags;
Modified: trunk/reactos/include/psdk/wingdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wingdi.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/wingdi.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/wingdi.h [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -2697,23 +2697,62 @@
} ENUMTEXTMETRICW, *PENUMTEXTMETRICW, *LPENUMTEXTMETRICW;
+#if defined(STRICT)
+
+#if !defined(NOTEXTMETRIC)
+
+typedef int (CALLBACK *OLDFONTENUMPROCA)(CONST LOGFONTA *, CONST TEXTMETRICA *, DWORD,
LPARAM);
+typedef int (CALLBACK *OLDFONTENUMPROCW)(CONST LOGFONTW *, CONST TEXTMETRICW *, DWORD,
LPARAM);
+
+#else
+
+typedef int (CALLBACK* OLDFONTENUMPROCA)(CONST LOGFONTA *, CONST VOID *, DWORD, LPARAM);
+typedef int (CALLBACK* OLDFONTENUMPROCW)(CONST LOGFONTW *, CONST VOID *, DWORD, LPARAM);
+
+#endif
+
+#ifdef UNICODE
+#define OLDFONTENUMPROC OLDFONTENUMPROCW
+#else
+#define OLDFONTENUMPROC OLDFONTENUMPROCA
+#endif
+
+typedef OLDFONTENUMPROCA FONTENUMPROCA;
+typedef OLDFONTENUMPROCW FONTENUMPROCW;
+
+#ifdef UNICODE
+typedef FONTENUMPROCW FONTENUMPROC;
+#else
+typedef FONTENUMPROCA FONTENUMPROC;
+#endif
+
+typedef INT (CALLBACK *GOBJENUMPROC)(LPVOID, LPARAM);
+typedef VOID (CALLBACK *LINEDDAPROC)(INT, INT, LPARAM);
+
+#else // defined(STRICT)
+
+typedef FARPROC OLDFONTENUMPROC;
+typedef FARPROC FONTENUMPROCA;
+typedef FARPROC FONTENUMPROCW;
+
+#ifdef UNICODE
+typedef FONTENUMPROCW FONTENUMPROC;
+#else
+typedef FONTENUMPROCA FONTENUMPROC;
+#endif
+
+typedef FARPROC GOBJENUMPROC;
+typedef FARPROC LINEDDAPROC;
+
+#endif
+
typedef BOOL (CALLBACK *ABORTPROC)(HDC,int);
+
typedef int (CALLBACK *MFENUMPROC)(HDC,HANDLETABLE*,METARECORD*,int,LPARAM);
typedef int (CALLBACK *ENHMFENUMPROC)(HDC,HANDLETABLE*,const ENHMETARECORD*,int,LPARAM);
-typedef int (CALLBACK
*OLDFONTENUMPROCA)(ENUMLOGFONTEXA*,NEWTEXTMETRICEXA*,DWORD,LPARAM);
-typedef int (CALLBACK
*OLDFONTENUMPROCW)(ENUMLOGFONTEXW*,NEWTEXTMETRICEXW*,DWORD,LPARAM);
-typedef OLDFONTENUMPROCA FONTENUMPROCA;
-typedef OLDFONTENUMPROCW FONTENUMPROCW;
-#ifdef UNICODE
-#define OLDFONTENUMPROC OLDFONTENUMPROCW
-#else
-#define OLDFONTENUMPROC OLDFONTENUMPROCA
-#endif
typedef int (CALLBACK *ICMENUMPROCA)(LPSTR,LPARAM);
typedef int (CALLBACK *ICMENUMPROCW)(LPWSTR,LPARAM);
-typedef void (CALLBACK *GOBJENUMPROC)(LPVOID,LPARAM);
-typedef void (CALLBACK *LINEDDAPROC)(int,int,LPARAM);
typedef UINT (CALLBACK
*LPFNDEVMODE)(HWND,HMODULE,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,UINT);
typedef DWORD (CALLBACK *LPFNDEVCAPS)(LPSTR,LPSTR,UINT,LPSTR,LPDEVMODEA);
@@ -3114,7 +3153,6 @@
typedef LOGFONTW LOGFONT,*PLOGFONT,*LPLOGFONT;
typedef TEXTMETRICW TEXTMETRIC,*PTEXTMETRIC,*LPTEXTMETRIC;
#define ICMENUMPROC ICMENUMPROCW
-#define FONTENUMPROC FONTENUMPROCW
typedef DEVMODEW DEVMODE,*PDEVMODE,*LPDEVMODE;
typedef ENUMLOGFONTEXDVW ENUMLOGFONTEXDV;
typedef PENUMLOGFONTEXDVW PENUMLOGFONTEXDV;
@@ -3196,7 +3234,6 @@
typedef LOGFONTA LOGFONT,*PLOGFONT,*LPLOGFONT;
typedef TEXTMETRICA TEXTMETRIC,*PTEXTMETRIC,*LPTEXTMETRIC;
#define ICMENUMPROC ICMENUMPROCA
-#define FONTENUMPROC FONTENUMPROCA
typedef DEVMODEA DEVMODE,*PDEVMODE,*LPDEVMODE;
typedef ENUMLOGFONTEXDVA ENUMLOGFONTEXDV;
typedef PENUMLOGFONTEXDVA PENUMLOGFONTEXDV;
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=3…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -3025,7 +3025,8 @@
PSID Group;
PACL Sacl;
PACL Dacl;
-} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
+} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
+typedef PVOID PSECURITY_DESCRIPTOR;
#endif
typedef struct _SECURITY_DESCRIPTOR_RELATIVE {
BYTE Revision;
Modified: trunk/reactos/include/psdk/winuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winuser.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winuser.h [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -3525,7 +3525,7 @@
HWND hwndCaret;
RECT rcCaret;
} GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO;
-typedef VOID (*WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
+typedef VOID (CALLBACK *WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
#endif /* (WINVER >= 0x0500) */
#if (_WIN32_WINNT >= 0x0501)
typedef struct {
Modified: trunk/reactos/lib/rtl/bootdata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/bootdata.c?rev=388…
==============================================================================
--- trunk/reactos/lib/rtl/bootdata.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/bootdata.c [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -17,7 +17,7 @@
static SID_IDENTIFIER_AUTHORITY LocalSystemAuthority = {SECURITY_NT_AUTHORITY};
static NTSTATUS
-RtlpSysVolCreateSecurityDescriptor(OUT PSECURITY_DESCRIPTOR *SecurityDescriptor,
+RtlpSysVolCreateSecurityDescriptor(OUT PISECURITY_DESCRIPTOR *SecurityDescriptor,
OUT PSID *SystemSid)
{
PSECURITY_DESCRIPTOR AbsSD = NULL;
Modified: trunk/reactos/lib/rtl/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=38898&…
==============================================================================
--- trunk/reactos/lib/rtl/debug.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/debug.c [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Run-Time Library
- * FILE: ntoskrnl/rtl/dbgprint.c
+ * FILE: lib/rtl/debug.c
* PURPOSE: Debug Print and Prompt routines
* PROGRAMMERS: Alex Ionescu (alex(a)relsoft.net)
* Royce Mitchel III
@@ -203,19 +203,19 @@
DbgPrint(PCCH Format,
...)
{
- ULONG n;
+ ULONG n;
va_list ap;
/* Call the internal routine that also handles ControlC */
va_start(ap, Format);
n = vDbgPrintExWithPrefixInternal("",
- -1,
- DPFLTR_ERROR_LEVEL,
- Format,
- ap,
- TRUE);
+ -1,
+ DPFLTR_ERROR_LEVEL,
+ Format,
+ ap,
+ TRUE);
va_end(ap);
- return n;
+ return n;
}
/*
@@ -228,19 +228,19 @@
IN PCCH Format,
...)
{
- ULONG n;
+ ULONG n;
va_list ap;
/* Call the internal routine that also handles ControlC */
va_start(ap, Format);
n = vDbgPrintExWithPrefixInternal("",
- ComponentId,
- Level,
- Format,
- ap,
- TRUE);
+ ComponentId,
+ Level,
+ Format,
+ ap,
+ TRUE);
va_end(ap);
- return n;
+ return n;
}
/*
@@ -251,19 +251,19 @@
DbgPrintReturnControlC(PCH Format,
...)
{
- ULONG n;
+ ULONG n;
va_list ap;
/* Call the internal routine that also handles ControlC */
va_start(ap, Format);
n = vDbgPrintExWithPrefixInternal("",
- -1,
- DPFLTR_ERROR_LEVEL,
- Format,
- ap,
- FALSE);
+ -1,
+ DPFLTR_ERROR_LEVEL,
+ Format,
+ ap,
+ FALSE);
va_end(ap);
- return n;
+ return n;
}
/*
@@ -369,5 +369,3 @@
/* Load the symbols */
DebugService2(Name, &SymbolInfo, BREAKPOINT_UNLOAD_SYMBOLS);
}
-
-/* EOF */
Modified: trunk/reactos/lib/rtl/sd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sd.c?rev=38898&…
==============================================================================
--- trunk/reactos/lib/rtl/sd.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/sd.c [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -1018,7 +1018,7 @@
* @implemented
*/
BOOLEAN NTAPI
-RtlValidRelativeSecurityDescriptor(IN PISECURITY_DESCRIPTOR SecurityDescriptorInput,
+RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInput,
IN ULONG SecurityDescriptorLength,
IN SECURITY_INFORMATION RequiredInformation)
{
@@ -1027,7 +1027,7 @@
PAGED_CODE_RTL();
if (SecurityDescriptorLength < sizeof(SECURITY_DESCRIPTOR_RELATIVE) ||
- SecurityDescriptorInput->Revision != SECURITY_DESCRIPTOR_REVISION1 ||
+ pSD->Revision != SECURITY_DESCRIPTOR_REVISION1 ||
!(pSD->Control & SE_SELF_RELATIVE))
{
return FALSE;
Modified: trunk/reactos/tools/raddr2line.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/raddr2line.c?rev=388…
==============================================================================
--- trunk/reactos/tools/raddr2line.c [iso-8859-1] (original)
+++ trunk/reactos/tools/raddr2line.c [iso-8859-1] Sun Jan 18 09:59:21 2009
@@ -85,9 +85,9 @@
else
{
PROSSYM_ENTRY e = &Entries[i];
- printf ( "%s:%lu (%s)\n",
+ printf ( "%s:%u (%s)\n",
&Strings[e->FileOffset],
- e->SourceLine,
+ (unsigned int)e->SourceLine,
&Strings[e->FunctionOffset] );
return 0;
}