Minor changes for making apps/baresh compile (tough it doesn't work yet).

svn path=/trunk/; revision=2647
This commit is contained in:
Emanuele Aliberti 2002-02-24 22:14:05 +00:00
parent 20037ec24c
commit 21a85d799e
5 changed files with 73 additions and 6 deletions

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.2 2002/02/20 09:17:56 hyperion Exp $
# $Id: Makefile,v 1.3 2002/02/24 22:14:05 ea Exp $
PATH_TO_TOP = ../../../..
@ -6,6 +6,8 @@ TARGET_TYPE = dynlink
TARGET_NAME = psxdll
TARGET_LIBPATH = $(PATH_TO_TOP)/dk/psx/lib
TARGET_LFLAGS = -nostartfiles
TARGET_SDKLIBS = ntdll.a
@ -14,7 +16,15 @@ TARGET_BASE = 0x68EB0000
TARGET_ENTRY = _DllMain@12
TARGET_CFLAGS = -W -nostdinc -nostdlib -fno-builtin -I$(PATH_TO_TOP)/subsys/psx/include -D__PSXDLL__ -D__PSX_DEBUG_WANT_ALL__
TARGET_CFLAGS =\
-W \
-nostdinc \
-nostdlib \
-fno-builtin \
-I$(PATH_TO_TOP)/subsys/psx/include \
-I$(PATH_TO_TOP)/include \
-D__PSXDLL__ \
-D__PSX_DEBUG_WANT_ALL__
TARGET_OBJECTS = $(TARGET_NAME).o
@ -25,10 +35,12 @@ include $(TOOLS_PATH)/helper.mk
OBJECTS_MISC = \
misc/main.o \
misc/init.o \
misc/heap.o \
misc/interlock.o \
misc/safeobj.o \
misc/path.o \
misc/fdtable.o
misc/path.o \
misc/fdtable.o
OBJECTS_DIRENT = \
dirent/opendir.o \

View file

@ -0,0 +1,17 @@
/* $Id: heap.c,v 1.1 2002/02/24 22:14:05 ea Exp $
*
* FILE: reactos/subsys/psx/lib/psxdll/misc/heap.c
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS POSIX+ Subsystem
* PURPOSE: Support routines for crt0.c
* UPDATE HISTORY:
* 2001-05-06
*/
#define NTOS_MODE_USER
#include <ntos.h>
#include <napi/teb.h>
HANDLE STDCALL GetProcessHeap (VOID)
{
return (HANDLE)NtCurrentPeb()->ProcessHeap;
}
/* EOF */

View file

@ -0,0 +1,27 @@
/* $Id: init.c,v 1.1 2002/02/24 22:14:05 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS POSIX+ Subsystem
* FILE: reactos/subsys/psx/lib/psxdll/misc/init.c
* PURPOSE: Client initialization
* PROGRAMMER: Emanuele Aliberti
* UPDATE HISTORY:
* 2001-05-06
*/
#define NTOS_MODE_USER
#include <ntos.h>
/* DLL GLOBALS */
int * errno = NULL;
char *** _environ = NULL;
/*
* Called by startup code in crt0.o, where real
* errno and _environ are actually defined.
*/
VOID STDCALL __PdxInitializeData (int * errno_arg, char *** environ_arg)
{
errno = errno_arg;
_environ = environ_arg;
}
/* EOF */

View file

@ -1,4 +1,4 @@
; $Id: psxdll.def,v 1.2 2002/02/20 09:17:56 hyperion Exp $
; $Id: psxdll.def,v 1.3 2002/02/24 22:14:05 ea Exp $
;
; ReactOS POSIX+ Client Library
;
@ -6,6 +6,12 @@
LIBRARY PSXDLL.DLL
EXPORTS
;misc/init
__PdxInitializeData@8
;misc/heap
GetProcessHeap@0
;dirent
opendir
readdir

View file

@ -1,4 +1,4 @@
; $Id: psxdll.edf,v 1.2 2002/02/20 09:17:56 hyperion Exp $
; $Id: psxdll.edf,v 1.3 2002/02/24 22:14:05 ea Exp $
;
; ReactOS POSIX+ Client Library
;
@ -6,6 +6,11 @@
LIBRARY PSXDLL.DLL
EXPORTS
;misc/init
__PdxInitializeData=__PdxInitializeData@8
;misc/heap
GetProcessHeap=GetProcessHeap@0
;dirent
opendir=opendir
readdir=readdir