- Fix gcc compilation issues
- Fix most ld linking issues.
Modified: trunk/reactos/subsys/csr/csr.xml
Modified: trunk/reactos/subsys/csr/csrsrv/api.c
Modified: trunk/reactos/subsys/csr/csrsrv/csrsrv.def
Modified: trunk/reactos/subsys/csr/csrsrv/csrsrv.xml
Modified: trunk/reactos/subsys/csr/csrsrv/init.c
Modified: trunk/reactos/subsys/csr/csrsrv/srv.h
Modified: trunk/reactos/subsys/csr/main.c
_____
Modified: trunk/reactos/subsys/csr/csr.xml
--- trunk/reactos/subsys/csr/csr.xml 2005-10-02 08:33:38 UTC (rev
18204)
+++ trunk/reactos/subsys/csr/csr.xml 2005-10-02 08:40:49 UTC (rev
18205)
@@ -6,8 +6,6 @@
<library>ntdll</library>
<library>csrsrv</library>
<file>main.c</file>
- <file>args.c</file>
- <file>csr.rc</file>
</module>
<directory name="csrsrv">
<xi:include href="csrsrv/csrsrv.xml" />
_____
Modified: trunk/reactos/subsys/csr/csrsrv/api.c
--- trunk/reactos/subsys/csr/csrsrv/api.c 2005-10-02 08:33:38 UTC
(rev 18204)
+++ trunk/reactos/subsys/csr/csrsrv/api.c 2005-10-02 08:40:49 UTC
(rev 18205)
@@ -62,7 +62,7 @@
0,
0,
0,
- CsrApiRequestThread,
+ (PVOID)CsrApiRequestThread,
NULL,
&hThread,
&ClientId);
@@ -550,7 +550,7 @@
{
/* Get the information and check if it matches our
thread */
ClientDiedMsg = (PCLIENT_DIED_MSG)&ReceiveMsg;
- if (ClientDiedMsg->CreateTime.QuadPart =
CsrThread->CreateTime.QuadPart)
+ if (ClientDiedMsg->CreateTime.QuadPart ==
CsrThread->CreateTime.QuadPart)
{
/* Reference the thread */
CsrThread->ReferenceCount++;
_____
Modified: trunk/reactos/subsys/csr/csrsrv/csrsrv.def
--- trunk/reactos/subsys/csr/csrsrv/csrsrv.def 2005-10-02 08:33:38 UTC
(rev 18204)
+++ trunk/reactos/subsys/csr/csrsrv/csrsrv.def 2005-10-02 08:40:49 UTC
(rev 18205)
@@ -1,38 +1,38 @@
LIBRARY CSRSRV
EXPORTS
-CsrAddStaticServerThread
-CsrCallServerFromServer
-CsrConnectToUser
-CsrCreateProcess
-CsrCreateRemoteThread
-CsrCreateThread
-CsrCreateWait
-CsrDebugProcess
-CsrDebugProcessStop
-CsrDereferenceProcess
-CsrDereferenceThread
-CsrDereferenceWait
-CsrDestroyProcess
-CsrDestroyThread
-CsrExecServerThread
-CsrGetProcessLuid
-CsrImpersonateClient
-CsrLockProcessByClientId
-CsrLockThreadByClientId
-CsrMoveSatisfiedWait
-CsrNotifyWait
-CsrPopulateDosDevices
-CsrQueryApiPort
-CsrReferenceThread
-CsrRevertToSelf
-CsrServerInitialization
-CsrSetBackgroundPriority
-CsrSetCallingSpooler
-CsrSetForegroundPriority
-CsrShutdownProcesses
-CsrUnhandledExceptionFilter
-CsrUnlockProcess
-CsrUnlockThread
-CsrValidateMessageBuffer
-CsrValidateMessageString
+CsrAddStaticServerThread@12
+CsrCallServerFromServer@8
+CsrConnectToUser@0
+CsrCreateProcess@24
+CsrCreateRemoteThread@8
+CsrCreateThread@12
+CsrCreateWait@24
+CsrDebugProcess@4
+CsrDebugProcessStop@4
+CsrDereferenceProcess@4
+CsrDereferenceThread@4
+CsrDereferenceWait@4
+CsrDestroyProcess@8
+CsrDestroyThread@4
+CsrExecServerThread@8
+CsrGetProcessLuid@8
+CsrImpersonateClient@4
+CsrLockProcessByClientId@8
+CsrLockThreadByClientId@8
+CsrMoveSatisfiedWait@8
+CsrNotifyWait@16
+CsrPopulateDosDevices@0
+CsrQueryApiPort@0
+CsrReferenceThread@4
+CsrRevertToSelf@0
+CsrServerInitialization@8
+CsrSetBackgroundPriority@4
+CsrSetCallingSpooler@4
+CsrSetForegroundPriority@4
+CsrShutdownProcesses@8
+CsrUnhandledExceptionFilter@8
+CsrUnlockProcess@4
+CsrUnlockThread@4
+CsrValidateMessageBuffer@16
+CsrValidateMessageString@8
_____
Modified: trunk/reactos/subsys/csr/csrsrv/csrsrv.xml
--- trunk/reactos/subsys/csr/csrsrv/csrsrv.xml 2005-10-02 08:33:38 UTC
(rev 18204)
+++ trunk/reactos/subsys/csr/csrsrv/csrsrv.xml 2005-10-02 08:40:49 UTC
(rev 18205)
@@ -5,13 +5,14 @@
<define name="_DISABLE_TIDENTS" />
<define name="__USE_W32API" />
<library>ntdll</library>
- <file>debug.c</file>
- <file>dllmain.c</file>
+ <library>pseh</library>
+ <library>intrlck</library>
+ <file>api.c</file>
<file>init.c</file>
<file>process.c</file>
<file>server.c</file>
<file>session.c</file>
<file>thread.c</file>
<file>wait.c</file>
- <file>csrsrv.rc</file>
+ <pch>srv.h</pch>
</module>
_____
Modified: trunk/reactos/subsys/csr/csrsrv/init.c
--- trunk/reactos/subsys/csr/csrsrv/init.c 2005-10-02 08:33:38 UTC
(rev 18204)
+++ trunk/reactos/subsys/csr/csrsrv/init.c 2005-10-02 08:40:49 UTC
(rev 18205)
@@ -362,7 +362,7 @@
NTAPI
CsrCreateLocalSystemSD(OUT PSECURITY_DESCRIPTOR *LocalSystemSd)
{
- SID_IDENTIFIER_AUTHORITY NtSidAuthority = SECURITY_NT_AUTHORITY;
+ SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY};
PSID SystemSid;
ULONG SidLength;
PSECURITY_DESCRIPTOR SecurityDescriptor;
@@ -460,9 +460,9 @@
NTAPI
CsrGetDosDevicesSd(OUT PSECURITY_DESCRIPTOR DosDevicesSd)
{
- SID_IDENTIFIER_AUTHORITY WorldAuthority =
SECURITY_WORLD_SID_AUTHORITY;
- SID_IDENTIFIER_AUTHORITY CreatorAuthority =
SECURITY_CREATOR_SID_AUTHORITY;
- SID_IDENTIFIER_AUTHORITY NtSidAuthority = SECURITY_NT_AUTHORITY;
+ SID_IDENTIFIER_AUTHORITY WorldAuthority =
{SECURITY_WORLD_SID_AUTHORITY};
+ SID_IDENTIFIER_AUTHORITY CreatorAuthority =
{SECURITY_CREATOR_SID_AUTHORITY};
+ SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY};
PSID WorldSid, CreatorSid, AdminSid, SystemSid;
UCHAR KeyValueBuffer[0x40];
PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo;
@@ -589,7 +589,7 @@
SystemSid);
/* Get the ACE back */
- Status = RtlGetAce(Dacl, 0, (PACE*)&Ace);
+ Status = RtlGetAce(Dacl, 0, (PVOID*)&Ace);
/* Add some flags to it for the Admin SID */
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE |
CONTAINER_INHERIT_ACE);
@@ -601,7 +601,7 @@
AdminSid);
/* Get the ACE back */
- Status = RtlGetAce(Dacl, 1, (PACE*)&Ace);
+ Status = RtlGetAce(Dacl, 1, (PVOID*)&Ace);
/* Add some flags to it for the Creator SID */
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE |
CONTAINER_INHERIT_ACE);
@@ -613,7 +613,7 @@
CreatorSid);
/* Get the ACE back */
- Status = RtlGetAce(Dacl, 2, (PACE*)&Ace);
+ Status = RtlGetAce(Dacl, 2, (PVOID*)&Ace);
/* Add some flags to it for the SD */
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE |
CONTAINER_INHERIT_ACE |
@@ -662,7 +662,7 @@
WorldSid);
/* Get the ACE back */
- Status = RtlGetAce(Dacl, 2, (PACE*)&Ace);
+ Status = RtlGetAce(Dacl, 2, (PVOID*)&Ace);
/* Add some flags to it for the SD */
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE |
CONTAINER_INHERIT_ACE |
_____
Modified: trunk/reactos/subsys/csr/csrsrv/srv.h
--- trunk/reactos/subsys/csr/csrsrv/srv.h 2005-10-02 08:33:38 UTC
(rev 18204)
+++ trunk/reactos/subsys/csr/csrsrv/srv.h 2005-10-02 08:40:49 UTC
(rev 18205)
@@ -5,7 +5,9 @@
#define NTOS_MODE_USER
#include <stdio.h>
#include <windows.h>
+#include <winnt.h>
#include <ndk/ntndk.h>
+#include <helper.h>
/* CSR Header */
#include <csr/server.h>
@@ -82,6 +84,13 @@
NTSTATUS
NTAPI
+CsrServerInitialization(
+ ULONG ArgumentCount,
+ PCHAR Arguments[]
+);
+
+NTSTATUS
+NTAPI
CsrCreateSessionObjectDirectory(IN ULONG SessionId);
NTSTATUS
_____
Modified: trunk/reactos/subsys/csr/main.c
--- trunk/reactos/subsys/csr/main.c 2005-10-02 08:33:38 UTC (rev
18204)
+++ trunk/reactos/subsys/csr/main.c 2005-10-02 08:40:49 UTC (rev
18205)
@@ -31,6 +31,7 @@
#include <windows.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
+#include <csr/server.h>
#define NDEBUG
#include <debug.h>
@@ -50,12 +51,18 @@
sizeof(DefaultHardErrorMode));
}
+/*
+ * Note: Standard entrypoint for Native C Programs.
+ * The OS backend (NtProcessStartup) which calls this routine is
+ * implemented in a CRT-like static library (much like mainCRTStartup).
+ * Do NOT manually add the NtProcessStartup entrypoint or anything
else.
+ */
int
_cdecl
-main(int argc,
- char *argv[],
- char *envp[],
- int DebugFlag)
+_main(int argc,
+ char *argv[],
+ char *envp[],
+ int DebugFlag)
{
KPRIORITY BasePriority = (8 + 1) + 4;
NTSTATUS Status;