Little changes in the psxdll library.

svn path=/trunk/; revision=694
This commit is contained in:
Emanuele Aliberti 1999-10-12 21:19:40 +00:00
parent 74031c2379
commit 81a9f1c4b0
11 changed files with 116 additions and 26 deletions

View file

@ -15,7 +15,7 @@ include rules.mak
# Required to run the system
#
COMPONENTS = iface_native ntoskrnl
DLLS = ntdll kernel32 crtdll fmifs gdi32
DLLS = ntdll kernel32 crtdll fmifs gdi32 psxdll
#DLLS = advapi32 mingw32 user32
SUBSYS = smss win32k
#SUBSYS = csrss

View file

@ -1,6 +1,6 @@
#ifndef _INC_REACTOS_CONFIG_H
#define _INC_REACTOS_CONFIG_H
/* $Id: config.h,v 1.1 1999/08/29 07:01:32 ea Exp $ */
/* $Id: config.h,v 1.2 1999/10/12 21:17:03 ea Exp $ */
/* ReactOS global configuration options */
#define CONFIG_PROCESSOR_FAMILY_I386 "i386"
@ -15,6 +15,10 @@
*/
#define CONFIG_PROCESSOR_FAMILY CONFIG_PROCESSOR_FAMILY_I586
#define CONFIG_ARCHITECTURE CONFIG_ARCHITECTURE_IBMPC
/*
* Hardware page size
*/
#define CONFIG_MEMORY_PAGE_SIZE 4096
/*
* Use __fastcall calling conventions when needed
* in system components that require it.

View file

@ -1,8 +1,8 @@
; $Id: ntdll.def,v 1.15 1999/09/12 22:06:26 ea Exp $
; $Id: ntdll.def,v 1.16 1999/10/12 21:17:04 ea Exp $
;
; ReactOS Operating System
;
LIBRARY ntdll
LIBRARY ntdll.dll
EXPORTS
InitializeObjectAttributes

View file

@ -1,8 +1,8 @@
; $Id: ntdll.edf,v 1.6 1999/09/12 22:06:26 ea Exp $
; $Id: ntdll.edf,v 1.7 1999/10/12 21:17:04 ea Exp $
;
; ReactOS Operating System
;
LIBRARY ntdll
LIBRARY ntdll.dll
EXPORTS
InitializeObjectAttributes

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.23 1999/09/04 18:35:48 ekohl Exp $
# $Id: makefile,v 1.24 1999/10/12 21:17:03 ea Exp $
#
# ReactOS Operating System
#
@ -65,7 +65,7 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) def/ntdll.def def/ntdll.edf
$(OBJECTS) \
-o $(TARGET).o
$(DLLTOOL) \
--dllname $(TARGET).dll \
--dllname $(TARGET) \
--def def/$(TARGET).def \
--kill-at \
--output-lib $(TARGET).a
@ -77,7 +77,7 @@ $(TARGET).dll: $(DLLMAIN) $(OBJECTS) def/ntdll.def def/ntdll.edf
$(TARGET).o
- $(RM) junk.tmp
$(DLLTOOL) \
--dllname $(TARGET).dll \
--dllname $(TARGET) \
--base-file base.tmp \
--output-exp temp.exp \
--def def/$(TARGET).edf

View file

@ -0,0 +1,24 @@
/* $Id: exit.c,v 1.1 1999/10/12 21:19:40 ea Exp $
*
* reactos/lib/psxdll/libc/stdlib/exit.c
*
* POSIX+ Subsystem client shared library
*/
#define NTOS_MODE_USER
#include <ntos.h>
void
_exit (
int code
)
{
/* FIXME: call atexit registered functions */
NtTerminateProcess (
NtCurrentProcess(),
code
);
}
/* EOF */

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 1999/09/12 21:54:16 ea Exp $
# $Id: makefile,v 1.2 1999/10/12 21:17:04 ea Exp $
#
# ReactOS psxdll.dll makefile
#
@ -19,11 +19,15 @@ BASE_CFLAGS = -I../../include
all: $(DLLTARGET)
OBJECTS_LIBC_STDLIB = libc/stdlib/exit.o
OBJECTS_LIBC = $(OBJECTS_LIBC_STDLIB)
OBJECTS_MISC = misc/dllmain.o misc/special.o misc/heap.o misc/rtl.o
OBJECTS_RESOURCE = $(TARGETNAME).coff
OBJECTS = $(OBJECTS_MISC) $(OBJECTS_RESOURCE)
OBJECTS = $(OBJECTS_LIBC) $(OBJECTS_LIBM) $(OBJECTS_MISC) $(OBJECTS_RESOURCE)
DEFS=$(TARGETNAME).def $(TARGETNAME).edf

View file

@ -1,22 +1,79 @@
/* $Id: dllmain.c,v 1.1 1999/09/12 21:54:16 ea Exp $
/* $Id: dllmain.c,v 1.2 1999/10/12 21:17:05 ea Exp $
*
* reactos/subsys/psxdll/dllmain.c
*
* ReactOS Operating System
* - POSIX+ client side DLL (ReactOS POSIX+ Subsystem)
*/
#include <windows.h>
#define NTOS_MODE_USER
#include <ntos.h>
#include <reactos/config.h>
BOOL
WINAPI
DllMain (
HINSTANCE hinstDll,
DWORD fdwReason,
LPVOID fImpLoad
)
/* --- Data --- */
PVOID
__PdxHeap = NULL;
HANDLE
__PdxApiPort = INVALID_HANDLE_VALUE;
HINSTANCE
__PdxModuleHandle;
/* --- Internal functions --- */
BOOLEAN
__PdxConnectToPsxSs (VOID)
{
/* FIXME: Connect to psxss.exe */
/* FIXME: call NtConnectPort(); */
return TRUE;
}
/* --- Library entry point --- */
BOOL
WINAPI
DllMain (
HINSTANCE hInstDll,
DWORD fdwReason,
LPVOID fImpLoad
)
{
if (DLL_PROCESS_ATTACH == fdwReason)
{
/*
* Save the module handle.
*/
__PdxModuleHandle = hInstDll;
/*
* Create a heap for the client process.
* Initially its size is the same as the
* memory page size; it is growable and
* grows 512 bytes a time.
*/
__PdxHeap = RtlCreateHeap (
3, /* Flags */
NULL, /* Base address */
CONFIG_MEMORY_PAGE_SIZE, /* Initial size */
512, /* Maximum size/grow by */
0, /* unknown */
NULL /* PHEAP_DEFINITION */
);
/*
* Connect to the POSIX+ subsystem
* process (psxss.exe).
*/
if (FALSE == __PdxConnectToPsxSs())
{
return FALSE;
}
}
return TRUE;
}
/* EOF */

View file

@ -1,10 +1,11 @@
/* $Id: special.c,v 1.1 1999/09/12 21:54:16 ea Exp $
/* $Id: special.c,v 1.2 1999/10/12 21:17:05 ea Exp $
*
* reactos/subsys/psxdll/misc/special.c
*
* ReactOS Operating System
* - POSIX+ client side DLL (ReactOS POSIX+ Subsystem)
*/
#define NTOS_MODE_USER
#include <ntos.h>

View file

@ -1,4 +1,4 @@
; $Id: psxdll.def,v 1.2 1999/09/12 21:54:16 ea Exp $
; $Id: psxdll.def,v 1.3 1999/10/12 21:17:04 ea Exp $
;
; psxdll.def
;
@ -41,7 +41,7 @@ RtlZeroMemory@8
__PdxGetCmdLine@0
__PdxInitializeData@8
;__findenv
;_exit
_exit
;_fdptcheck
;_sigjmp_store_mask
;accept

View file

@ -1,4 +1,4 @@
; $Id: psxdll.edf,v 1.1 1999/09/12 21:54:16 ea Exp $
; $Id: psxdll.edf,v 1.2 1999/10/12 21:17:04 ea Exp $
;
; psxdll.edf
;
@ -41,7 +41,7 @@ RtlZeroMemory=RtlZeroMemory@8
__PdxGetCmdLine=__PdxGetCmdLine@0
__PdxInitializeData=__PdxInitializeData@8
;__findenv
;_exit
_exit
;_fdptcheck
;_sigjmp_store_mask
;accept