2006-01-31 Leif Ekblad <leif@rdos.net>
* configure.host: RDOS support added * libc/include/sys/config.h: Ditto. * libc/sys/rdos/Makefile.am, libc/sys/rdos/Makefile.in: New files. * libc/sys/rdos/aclocal.m4, libc/sys/rdos/chown.c: Ditto. * libc/sys/rdos/close.c, libc/sys/rdos/config.h: Ditto. * libc/sys/rdos/configure, libc/sys/rdos/configure.in: Ditto. * libc/sys/rdos/crt0.S, libc/sys/rdos/execve.c: Ditto. * libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c: Ditto. * libc/sys/rdos/getenv.c, libc/sys/rdos/getpid.c: Ditto. * libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c: Ditto. * libc/sys/rdos/kill.c, libc/sys/rdos/link.c: Ditto. * libc/sys/rdos/lseek.c, libc/sys/rdos/open.c: Ditto. * libc/sys/rdos/rdos.S, libc/sys/rdos/rdos.h: Ditto. * libc/sys/rdos/rdoshelp.c, libc/sys/rdos/read.c: Ditto. * libc/sys/rdos/readlink.c, libc/sys/rdos/sbrk.c: Ditto. * libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c: Ditto. * libc/sys/rdos/times.c, libc/sys/rdos/unlink.c: Ditto. * libc/sys/rdos/user.def, libc/sys/rdos/wait.c: Ditto. * libc/sys/rdos/write.c: Ditto.
This commit is contained in:
parent
63a149a18f
commit
d968b3c86f
|
@ -1,3 +1,25 @@
|
||||||
|
2006-01-31 Leif Ekblad <leif@rdos.net>
|
||||||
|
|
||||||
|
* configure.host: RDOS support added
|
||||||
|
* libc/include/sys/config.h: Ditto.
|
||||||
|
* libc/sys/rdos/Makefile.am, libc/sys/rdos/Makefile.in: New files.
|
||||||
|
* libc/sys/rdos/aclocal.m4, libc/sys/rdos/chown.c: Ditto.
|
||||||
|
* libc/sys/rdos/close.c, libc/sys/rdos/config.h: Ditto.
|
||||||
|
* libc/sys/rdos/configure, libc/sys/rdos/configure.in: Ditto.
|
||||||
|
* libc/sys/rdos/crt0.S, libc/sys/rdos/execve.c: Ditto.
|
||||||
|
* libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c: Ditto.
|
||||||
|
* libc/sys/rdos/getenv.c, libc/sys/rdos/getpid.c: Ditto.
|
||||||
|
* libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c: Ditto.
|
||||||
|
* libc/sys/rdos/kill.c, libc/sys/rdos/link.c: Ditto.
|
||||||
|
* libc/sys/rdos/lseek.c, libc/sys/rdos/open.c: Ditto.
|
||||||
|
* libc/sys/rdos/rdos.S, libc/sys/rdos/rdos.h: Ditto.
|
||||||
|
* libc/sys/rdos/rdoshelp.c, libc/sys/rdos/read.c: Ditto.
|
||||||
|
* libc/sys/rdos/readlink.c, libc/sys/rdos/sbrk.c: Ditto.
|
||||||
|
* libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c: Ditto.
|
||||||
|
* libc/sys/rdos/times.c, libc/sys/rdos/unlink.c: Ditto.
|
||||||
|
* libc/sys/rdos/user.def, libc/sys/rdos/wait.c: Ditto.
|
||||||
|
* libc/sys/rdos/write.c: Ditto.
|
||||||
|
|
||||||
2006-01-24 Jeff Johnston <jjohnstn@redhat.com>
|
2006-01-24 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* acinclude.m4: Add nodefine to AM_INIT_AUTOMAKE macro invocation
|
* acinclude.m4: Add nodefine to AM_INIT_AUTOMAKE macro invocation
|
||||||
|
|
|
@ -362,6 +362,10 @@ case "${host}" in
|
||||||
h8500-*-elf*)
|
h8500-*-elf*)
|
||||||
sys_dir=h8500hms
|
sys_dir=h8500hms
|
||||||
;;
|
;;
|
||||||
|
i[34567]86-*-rdos*)
|
||||||
|
sys_dir=rdos
|
||||||
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
||||||
|
;;
|
||||||
i[34567]86-*-sco*)
|
i[34567]86-*-sco*)
|
||||||
sys_dir=sysvi386
|
sys_dir=sysvi386
|
||||||
unix_dir=unix
|
unix_dir=unix
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* in other words, go32 */
|
/* in other words, go32 */
|
||||||
#define _FLOAT_RET double
|
#define _FLOAT_RET double
|
||||||
#endif
|
#endif
|
||||||
#ifdef __linux__
|
#if defined(__linux__) || defined(__RDOS__)
|
||||||
/* we want the reentrancy structure to be returned by a function */
|
/* we want the reentrancy structure to be returned by a function */
|
||||||
#define __DYNAMIC_REENT__
|
#define __DYNAMIC_REENT__
|
||||||
#define HAVE_GETDATE
|
#define HAVE_GETDATE
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
## Process this file with automake to generate Makefile.in
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = cygnus
|
||||||
|
|
||||||
|
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||||
|
|
||||||
|
noinst_LIBRARIES = lib.a
|
||||||
|
|
||||||
|
lib_a_SOURCES = chown.c close.c execve.c fork.c fstat.c getenv.c \
|
||||||
|
getpid.c gettod.c isatty.c kill.c link.c lseek.c open.c rdoshelp.c \
|
||||||
|
rdos.S read.c readlink.c sbrk.c stat.c symlink.c times.c unlink.c \
|
||||||
|
wait.c write.c
|
||||||
|
|
||||||
|
all: crt0.o
|
||||||
|
|
||||||
|
ACLOCAL_AMFLAGS = -I ../../..
|
||||||
|
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
|
@ -0,0 +1,376 @@
|
||||||
|
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
|
SHELL = @SHELL@
|
||||||
|
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
|
bindir = @bindir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
datadir = @datadir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
libdir = @libdir@
|
||||||
|
infodir = @infodir@
|
||||||
|
mandir = @mandir@
|
||||||
|
includedir = @includedir@
|
||||||
|
oldincludedir = /usr/include
|
||||||
|
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
|
||||||
|
top_builddir = .
|
||||||
|
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
transform = @program_transform_name@
|
||||||
|
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_triplet = @build@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
target_triplet = @target@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
CC = @CC@
|
||||||
|
CPP = @CPP@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXCPP = @CXXCPP@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
GCJ = @GCJ@
|
||||||
|
GCJFLAGS = @GCJFLAGS@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
aext = @aext@
|
||||||
|
libm_machine_dir = @libm_machine_dir@
|
||||||
|
machine_dir = @machine_dir@
|
||||||
|
newlib_basedir = @newlib_basedir@
|
||||||
|
oext = @oext@
|
||||||
|
sys_dir = @sys_dir@
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = cygnus
|
||||||
|
|
||||||
|
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||||
|
|
||||||
|
noinst_LIBRARIES = lib.a
|
||||||
|
|
||||||
|
lib_a_SOURCES = chown.c close.c execve.c fork.c fstat.c getenv.c getpid.c gettod.c isatty.c kill.c link.c lseek.c open.c rdoshelp.c rdos.S read.c readlink.c sbrk.c stat.c symlink.c times.c unlink.c wait.c write.c
|
||||||
|
|
||||||
|
|
||||||
|
ACLOCAL_AMFLAGS = -I ../../..
|
||||||
|
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
LIBRARIES = $(noinst_LIBRARIES)
|
||||||
|
|
||||||
|
|
||||||
|
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
lib_a_LIBADD =
|
||||||
|
lib_a_OBJECTS = chown.$(OBJEXT) close.$(OBJEXT) execve.$(OBJEXT) \
|
||||||
|
fork.$(OBJEXT) fstat.$(OBJEXT) getenv.$(OBJEXT) getpid.$(OBJEXT) \
|
||||||
|
gettod.$(OBJEXT) isatty.$(OBJEXT) kill.$(OBJEXT) link.$(OBJEXT) \
|
||||||
|
lseek.$(OBJEXT) open.$(OBJEXT) rdoshelp.$(OBJEXT) rdos.$(OBJEXT) \
|
||||||
|
read.$(OBJEXT) readlink.$(OBJEXT) sbrk.$(OBJEXT) stat.$(OBJEXT) \
|
||||||
|
symlink.$(OBJEXT) times.$(OBJEXT) unlink.$(OBJEXT) wait.$(OBJEXT) \
|
||||||
|
write.$(OBJEXT)
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
CCLD = $(CC)
|
||||||
|
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||||
|
DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
|
||||||
|
|
||||||
|
|
||||||
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
|
TAR = tar
|
||||||
|
GZIP_ENV = --best
|
||||||
|
SOURCES = $(lib_a_SOURCES)
|
||||||
|
OBJECTS = $(lib_a_OBJECTS)
|
||||||
|
|
||||||
|
all: all-redirect
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .S .c .lo .o .obj .s
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||||
|
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||||
|
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
cd $(top_builddir) \
|
||||||
|
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
|
||||||
|
../../../acinclude.m4 ../../../aclocal.m4 \
|
||||||
|
../../../libtool.m4
|
||||||
|
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
|
|
||||||
|
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
$(SHELL) ./config.status --recheck
|
||||||
|
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||||
|
cd $(srcdir) && $(AUTOCONF)
|
||||||
|
|
||||||
|
mostlyclean-noinstLIBRARIES:
|
||||||
|
|
||||||
|
clean-noinstLIBRARIES:
|
||||||
|
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||||
|
|
||||||
|
distclean-noinstLIBRARIES:
|
||||||
|
|
||||||
|
maintainer-clean-noinstLIBRARIES:
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(COMPILE) -c $<
|
||||||
|
|
||||||
|
# FIXME: We should only use cygpath when building on Windows,
|
||||||
|
# and only if it is available.
|
||||||
|
.c.obj:
|
||||||
|
$(COMPILE) -c `cygpath -w $<`
|
||||||
|
|
||||||
|
.s.o:
|
||||||
|
$(COMPILE) -c $<
|
||||||
|
|
||||||
|
.S.o:
|
||||||
|
$(COMPILE) -c $<
|
||||||
|
|
||||||
|
mostlyclean-compile:
|
||||||
|
-rm -f *.o core *.core
|
||||||
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
|
clean-compile:
|
||||||
|
|
||||||
|
distclean-compile:
|
||||||
|
-rm -f *.tab.c
|
||||||
|
|
||||||
|
maintainer-clean-compile:
|
||||||
|
|
||||||
|
.c.lo:
|
||||||
|
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||||
|
|
||||||
|
.s.lo:
|
||||||
|
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||||
|
|
||||||
|
.S.lo:
|
||||||
|
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
distclean-libtool:
|
||||||
|
|
||||||
|
maintainer-clean-libtool:
|
||||||
|
|
||||||
|
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
|
||||||
|
-rm -f lib.a
|
||||||
|
$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||||
|
$(RANLIB) lib.a
|
||||||
|
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS)'; \
|
||||||
|
unique=`for i in $$list; do echo $$i; done | \
|
||||||
|
awk ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
here=`pwd` && cd $(srcdir) \
|
||||||
|
&& mkid -f$$here/ID $$unique $(LISP)
|
||||||
|
|
||||||
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS)'; \
|
||||||
|
unique=`for i in $$list; do echo $$i; done | \
|
||||||
|
awk ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||||
|
|| (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
|
||||||
|
|
||||||
|
mostlyclean-tags:
|
||||||
|
|
||||||
|
clean-tags:
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID
|
||||||
|
|
||||||
|
maintainer-clean-tags:
|
||||||
|
|
||||||
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
|
top_distdir = $(distdir)
|
||||||
|
|
||||||
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
|
# it guarantees that the distribution is self-contained by making another
|
||||||
|
# tarfile.
|
||||||
|
distcheck: dist
|
||||||
|
-rm -rf $(distdir)
|
||||||
|
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||||
|
mkdir $(distdir)/=build
|
||||||
|
mkdir $(distdir)/=inst
|
||||||
|
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||||
|
cd $(distdir)/=build \
|
||||||
|
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||||
|
-rm -rf $(distdir)
|
||||||
|
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||||
|
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||||
|
echo "$$dashes"; \
|
||||||
|
echo "$$banner"; \
|
||||||
|
echo "$$dashes"
|
||||||
|
dist: distdir
|
||||||
|
-chmod -R a+r $(distdir)
|
||||||
|
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||||
|
-rm -rf $(distdir)
|
||||||
|
dist-all: distdir
|
||||||
|
-chmod -R a+r $(distdir)
|
||||||
|
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||||
|
-rm -rf $(distdir)
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
-rm -rf $(distdir)
|
||||||
|
mkdir $(distdir)
|
||||||
|
-chmod 777 $(distdir)
|
||||||
|
@for file in $(DISTFILES); do \
|
||||||
|
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
info-am:
|
||||||
|
info: info-am
|
||||||
|
dvi-am:
|
||||||
|
dvi: dvi-am
|
||||||
|
check-am:
|
||||||
|
check: check-am
|
||||||
|
installcheck-am:
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-info-am:
|
||||||
|
install-info: install-info-am
|
||||||
|
install-exec-am:
|
||||||
|
install-exec: install-exec-am
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
install-data: install-data-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
install: install-am
|
||||||
|
uninstall-am:
|
||||||
|
uninstall: uninstall-am
|
||||||
|
all-am: Makefile $(LIBRARIES)
|
||||||
|
all-redirect: all-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||||
|
installdirs:
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||||
|
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||||
|
mostlyclean-libtool mostlyclean-tags \
|
||||||
|
mostlyclean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
clean-am: clean-noinstLIBRARIES clean-compile clean-libtool clean-tags \
|
||||||
|
clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
distclean-am: distclean-noinstLIBRARIES distclean-compile \
|
||||||
|
distclean-libtool distclean-tags distclean-generic \
|
||||||
|
clean-am
|
||||||
|
-rm -f libtool
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f config.status
|
||||||
|
|
||||||
|
maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
|
||||||
|
maintainer-clean-compile maintainer-clean-libtool \
|
||||||
|
maintainer-clean-tags maintainer-clean-generic \
|
||||||
|
distclean-am
|
||||||
|
@echo "This command is intended for maintainers to use;"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f config.status
|
||||||
|
|
||||||
|
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
|
||||||
|
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
|
||||||
|
mostlyclean-compile distclean-compile clean-compile \
|
||||||
|
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
||||||
|
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
|
||||||
|
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||||
|
dvi-am dvi check check-am installcheck-am installcheck install-info-am \
|
||||||
|
install-info install-exec-am install-exec install-data-am install-data \
|
||||||
|
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||||
|
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||||
|
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||||
|
|
||||||
|
|
||||||
|
all: crt0.o
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,11 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
int chown(const char *path, uid_t owner, gid_t group)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# close.c
|
||||||
|
# close function implementation
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include "rdos.h"
|
||||||
|
|
||||||
|
int close(int fildes)
|
||||||
|
{
|
||||||
|
RdosCloseFile(fildes);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
/* Place holder for future configuration information. */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,12 @@
|
||||||
|
dnl This is the newlib/libc/sys/rdos configure.in file.
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.5)
|
||||||
|
AC_INIT(close.c)
|
||||||
|
|
||||||
|
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
||||||
|
AC_CONFIG_AUX_DIR(../../../..)
|
||||||
|
|
||||||
|
NEWLIB_CONFIGURE(../../..)
|
||||||
|
|
||||||
|
AC_OUTPUT(Makefile)
|
|
@ -0,0 +1,406 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# crt0.S
|
||||||
|
# GCC startupcode for RDOS
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include "user.def"
|
||||||
|
|
||||||
|
KEY_ENTRIES = 256
|
||||||
|
|
||||||
|
.macro UserGate nr
|
||||||
|
.byte 0x9A
|
||||||
|
.long \nr
|
||||||
|
.word 2
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.data
|
||||||
|
.align 8
|
||||||
|
|
||||||
|
_key_section:
|
||||||
|
.word 0
|
||||||
|
|
||||||
|
_key_ref_arr:
|
||||||
|
.long 0
|
||||||
|
|
||||||
|
_key_dtor_arr:
|
||||||
|
.long 0
|
||||||
|
|
||||||
|
.text
|
||||||
|
.align 4
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : _start
|
||||||
|
#
|
||||||
|
# Purpose....: GCC startup-code
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
.global _start
|
||||||
|
|
||||||
|
_start:
|
||||||
|
call get_impure_data_size
|
||||||
|
movl %eax,%ecx
|
||||||
|
UserGate allocate_app_mem_nr
|
||||||
|
|
||||||
|
xorl %eax,%eax
|
||||||
|
.byte 0x64
|
||||||
|
movl %edx,(%eax)
|
||||||
|
movl %edx,%edi
|
||||||
|
rep
|
||||||
|
stosb
|
||||||
|
pushl %edx
|
||||||
|
|
||||||
|
movl $(4 * KEY_ENTRIES),%eax
|
||||||
|
movl %eax,%ecx
|
||||||
|
UserGate allocate_app_mem_nr
|
||||||
|
movl $4,%eax
|
||||||
|
.byte 0x64
|
||||||
|
movl %edx,(%eax)
|
||||||
|
movl %edx,%edi
|
||||||
|
xorl %eax,%eax
|
||||||
|
rep
|
||||||
|
stosb
|
||||||
|
|
||||||
|
movl $(4 * KEY_ENTRIES),%eax
|
||||||
|
movl %eax,%ecx
|
||||||
|
UserGate allocate_app_mem_nr
|
||||||
|
movl %edx,_key_ref_arr
|
||||||
|
movl %edx,%edi
|
||||||
|
xorl %eax,%eax
|
||||||
|
rep
|
||||||
|
stosb
|
||||||
|
|
||||||
|
movl $(4 * KEY_ENTRIES),%eax
|
||||||
|
movl %eax,%ecx
|
||||||
|
UserGate allocate_app_mem_nr
|
||||||
|
movl %edx,_key_dtor_arr
|
||||||
|
movl %edx,%edi
|
||||||
|
xorl %eax,%eax
|
||||||
|
rep
|
||||||
|
stosb
|
||||||
|
|
||||||
|
UserGate create_user_section_nr
|
||||||
|
movw %bx,_key_section
|
||||||
|
|
||||||
|
call __init_rdos
|
||||||
|
add $4, %esp
|
||||||
|
|
||||||
|
movl $0x1000,%eax
|
||||||
|
UserGate allocate_app_mem_nr
|
||||||
|
|
||||||
|
pushl %edx
|
||||||
|
UserGate get_cmd_line_nr
|
||||||
|
|
||||||
|
xorl %ecx,%ecx
|
||||||
|
xorb %ah,%ah
|
||||||
|
|
||||||
|
arg_loop:
|
||||||
|
movl %edi,(%edx)
|
||||||
|
addl $4,%edx
|
||||||
|
movb (%edi),%al
|
||||||
|
orb %al,%al
|
||||||
|
je arg_done
|
||||||
|
|
||||||
|
arg_scan:
|
||||||
|
movb (%edi),%al
|
||||||
|
orb %al,%al
|
||||||
|
je next_arg
|
||||||
|
|
||||||
|
cmpb $0x22,%al
|
||||||
|
jne arg_no_quote
|
||||||
|
|
||||||
|
xorb $1,%ah
|
||||||
|
jmp arg_scan_next
|
||||||
|
|
||||||
|
arg_no_quote:
|
||||||
|
orb %ah,%ah
|
||||||
|
jnz arg_scan_next
|
||||||
|
|
||||||
|
cmpb $0x20,%al
|
||||||
|
je next_arg
|
||||||
|
|
||||||
|
cmpb $0x8,%al
|
||||||
|
je next_arg
|
||||||
|
|
||||||
|
arg_scan_next:
|
||||||
|
incl %edi
|
||||||
|
jmp arg_scan
|
||||||
|
|
||||||
|
next_arg:
|
||||||
|
incl %ecx
|
||||||
|
|
||||||
|
to_next_arg:
|
||||||
|
orb %al,%al
|
||||||
|
je arg_done
|
||||||
|
|
||||||
|
xorb %al,%al
|
||||||
|
movb %al,(%edi)
|
||||||
|
incl %edi
|
||||||
|
movb (%edi),%al
|
||||||
|
cmpb $0x20,%al
|
||||||
|
je to_next_arg
|
||||||
|
|
||||||
|
cmpb $0x8,%al
|
||||||
|
je to_next_arg
|
||||||
|
|
||||||
|
jmp arg_loop
|
||||||
|
|
||||||
|
arg_done:
|
||||||
|
int $3
|
||||||
|
pushl %ecx
|
||||||
|
call main
|
||||||
|
add $8, %esp
|
||||||
|
|
||||||
|
pushl %eax
|
||||||
|
call exit
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : _exit
|
||||||
|
#
|
||||||
|
# Purpose....: GCC exit-code
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
.global _exit
|
||||||
|
|
||||||
|
_exit:
|
||||||
|
pushl %ebp
|
||||||
|
movl %esp,%ebp
|
||||||
|
movl 8(%ebp),%eax
|
||||||
|
UserGate unload_exe_nr
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __getreent
|
||||||
|
#
|
||||||
|
# Purpose....: ?
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
.global __getreent
|
||||||
|
|
||||||
|
__getreent:
|
||||||
|
xorl %eax,%eax
|
||||||
|
.byte 0x64
|
||||||
|
movl (%eax),%eax
|
||||||
|
ret
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_key_create
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_key_create
|
||||||
|
#
|
||||||
|
# Parameters.: dtor
|
||||||
|
#
|
||||||
|
# Returns....: Key index
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
.global __rdos_thread_key_create
|
||||||
|
|
||||||
|
__rdos_thread_key_create:
|
||||||
|
int $3
|
||||||
|
pushl %ebp
|
||||||
|
movl %esp,%ebp
|
||||||
|
pushl %ebx
|
||||||
|
pushl %ecx
|
||||||
|
|
||||||
|
mov _key_section,%bx
|
||||||
|
UserGate enter_user_section_nr
|
||||||
|
|
||||||
|
movl _key_ref_arr,%ebx
|
||||||
|
movl KEY_ENTRIES,%ecx
|
||||||
|
|
||||||
|
rtkc_scan_loop:
|
||||||
|
movl (%ebx), %eax
|
||||||
|
orl %eax, %eax
|
||||||
|
jz rtkc_entry_found
|
||||||
|
|
||||||
|
add $4, %ebx
|
||||||
|
loop rtkc_scan_loop
|
||||||
|
|
||||||
|
movl $-1, %eax
|
||||||
|
jmp rtkc_leave
|
||||||
|
|
||||||
|
rtkc_entry_found:
|
||||||
|
movb $255,3(%ebx)
|
||||||
|
subl _key_ref_arr,%ebx
|
||||||
|
addl _key_dtor_arr,%ebx
|
||||||
|
movl 8(%ebp),%eax
|
||||||
|
movl %eax,(%ebx)
|
||||||
|
subl _key_dtor_arr,%ebx
|
||||||
|
movl %ebx,%eax
|
||||||
|
|
||||||
|
rtkc_leave:
|
||||||
|
mov _key_section, %bx
|
||||||
|
UserGate leave_user_section_nr
|
||||||
|
|
||||||
|
popl %ecx
|
||||||
|
popl %ebx
|
||||||
|
leave
|
||||||
|
ret
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_key_delete
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_key_delete
|
||||||
|
#
|
||||||
|
# Parameters.: index
|
||||||
|
#
|
||||||
|
# Returns....: result
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
.global __rdos_thread_key_delete
|
||||||
|
|
||||||
|
__rdos_thread_key_delete:
|
||||||
|
int $3
|
||||||
|
pushl %ebp
|
||||||
|
movl %esp,%ebp
|
||||||
|
pushl %ebx
|
||||||
|
|
||||||
|
mov _key_section,%bx
|
||||||
|
UserGate enter_user_section_nr
|
||||||
|
|
||||||
|
movl 8(%ebp),%ebx
|
||||||
|
testb $3,%bl
|
||||||
|
jnz rtkd_fail
|
||||||
|
|
||||||
|
cmpl $(4 * KEY_ENTRIES),%ebx
|
||||||
|
jae rtkd_fail
|
||||||
|
|
||||||
|
addl _key_ref_arr,%ebx
|
||||||
|
movb $0,3(%ebx)
|
||||||
|
mov (%ebx),%eax
|
||||||
|
orl %eax,%eax
|
||||||
|
jz rtkd_ok
|
||||||
|
|
||||||
|
subl _key_ref_arr,%ebx
|
||||||
|
movl $0,(%ebx)
|
||||||
|
jmp rtkd_ok
|
||||||
|
|
||||||
|
rtkd_fail:
|
||||||
|
movl $1,%eax
|
||||||
|
jmp rtkd_leave
|
||||||
|
|
||||||
|
rtkd_ok:
|
||||||
|
xorl %eax,%eax
|
||||||
|
|
||||||
|
rtkd_leave:
|
||||||
|
mov _key_section, %bx
|
||||||
|
UserGate leave_user_section_nr
|
||||||
|
|
||||||
|
popl %ebx
|
||||||
|
leave
|
||||||
|
ret
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_getspecific
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_getspecific
|
||||||
|
#
|
||||||
|
# Parameters.: index
|
||||||
|
#
|
||||||
|
# Returns....: value
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
.global __rdos_thread_getspecific
|
||||||
|
|
||||||
|
__rdos_thread_getspecific:
|
||||||
|
int $3
|
||||||
|
pushl %ebp
|
||||||
|
movl %esp,%ebp
|
||||||
|
pushl %ebx
|
||||||
|
|
||||||
|
movl 8(%ebp),%ebx
|
||||||
|
testb $3,%bl
|
||||||
|
jnz rtg_fail
|
||||||
|
|
||||||
|
cmpl $(4 * KEY_ENTRIES),%ebx
|
||||||
|
jae rtg_fail
|
||||||
|
|
||||||
|
movl $4,%eax
|
||||||
|
.byte 0x64
|
||||||
|
movl (%eax),%eax
|
||||||
|
addl %eax,%ebx
|
||||||
|
movl (%ebx),%eax
|
||||||
|
jmp rtg_done
|
||||||
|
|
||||||
|
rtg_fail:
|
||||||
|
xorl %eax,%eax
|
||||||
|
|
||||||
|
rtg_done:
|
||||||
|
popl %ebx
|
||||||
|
leave
|
||||||
|
ret
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_setspecific
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_setspecific
|
||||||
|
#
|
||||||
|
# Parameters.: index
|
||||||
|
# value
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
.global __rdos_thread_setspecific
|
||||||
|
|
||||||
|
__rdos_thread_setspecific:
|
||||||
|
int $3
|
||||||
|
pushl %ebp
|
||||||
|
movl %esp,%ebp
|
||||||
|
pushl %ebx
|
||||||
|
pushl %ecx
|
||||||
|
|
||||||
|
movl 8(%ebp),%ebx
|
||||||
|
testb $3,%bl
|
||||||
|
jnz rts_fail
|
||||||
|
|
||||||
|
cmpl $(4 * KEY_ENTRIES),%ebx
|
||||||
|
jae rts_fail
|
||||||
|
|
||||||
|
movl $4,%eax
|
||||||
|
.byte 0x64
|
||||||
|
movl (%eax),%eax
|
||||||
|
addl %eax,%ebx
|
||||||
|
|
||||||
|
movl 12(%ebp),%eax
|
||||||
|
movl %eax,(%ebx)
|
||||||
|
xorl %eax,%eax
|
||||||
|
jmp rts_done
|
||||||
|
|
||||||
|
rts_fail:
|
||||||
|
movl $1,%eax
|
||||||
|
|
||||||
|
rts_done:
|
||||||
|
popl %ebx
|
||||||
|
leave
|
||||||
|
ret
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int execve( char *name, char **argv, char **env)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int fork()
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# fstat.c
|
||||||
|
# fstat function implementation
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int fstat(int fd, struct stat *st)
|
||||||
|
{
|
||||||
|
if (fd < 3)
|
||||||
|
{
|
||||||
|
st->st_mode = S_IFCHR;
|
||||||
|
st->st_blksize = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# getenv.c
|
||||||
|
# getenv function implementation
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
FUNCTION
|
||||||
|
<<getenv>>---look up environment variable
|
||||||
|
|
||||||
|
INDEX
|
||||||
|
getenv
|
||||||
|
INDEX
|
||||||
|
environ
|
||||||
|
|
||||||
|
ANSI_SYNOPSIS
|
||||||
|
#include <stdlib.h>
|
||||||
|
char *getenv(const char *<[name]>);
|
||||||
|
|
||||||
|
TRAD_SYNOPSIS
|
||||||
|
#include <stdlib.h>
|
||||||
|
char *getenv(<[name]>)
|
||||||
|
char *<[name]>;
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
<<getenv>> searches the list of environment variable names and values
|
||||||
|
(using the global pointer ``<<char **environ>>'') for a variable whose
|
||||||
|
name matches the string at <[name]>. If a variable name matches,
|
||||||
|
<<getenv>> returns a pointer to the associated value.
|
||||||
|
|
||||||
|
RETURNS
|
||||||
|
A pointer to the (string) value of the environment variable, or
|
||||||
|
<<NULL>> if there is no such environment variable.
|
||||||
|
|
||||||
|
PORTABILITY
|
||||||
|
<<getenv>> is ANSI, but the rules for properly forming names of environment
|
||||||
|
variables vary from one system to another.
|
||||||
|
|
||||||
|
This function is not thread-safe, but does it need to be??
|
||||||
|
There is an reentrant class that should be used if reentrance is required
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <rdos.h>
|
||||||
|
|
||||||
|
static char envbuf[256];
|
||||||
|
|
||||||
|
char *getenv(const char *name)
|
||||||
|
{
|
||||||
|
int handle;
|
||||||
|
char *ptr = 0;
|
||||||
|
|
||||||
|
handle = RdosOpenSysEnv();
|
||||||
|
if (handle)
|
||||||
|
{
|
||||||
|
if (RdosFindEnvVar(handle, name, envbuf))
|
||||||
|
ptr = envbuf;
|
||||||
|
}
|
||||||
|
RdosCloseEnv(handle);
|
||||||
|
return ptr;
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int getpid()
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/times.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
struct timeval;
|
||||||
|
struct timezone;
|
||||||
|
|
||||||
|
int gettimeofday(struct timeval *ptimeval, struct timezone *ptimezone)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int isatty(int file)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int kill(int pid, int sig)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int link(char *existing, char *new)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# lseek.c
|
||||||
|
# lseek function implementation
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <rdos.h>
|
||||||
|
|
||||||
|
off_t lseek(int file, off_t pos, int whence)
|
||||||
|
{
|
||||||
|
off_t temp;
|
||||||
|
|
||||||
|
switch (whence)
|
||||||
|
{
|
||||||
|
case SEEK_CUR:
|
||||||
|
temp = RdosGetFilePos(file);
|
||||||
|
temp += pos;
|
||||||
|
RdosSetFilePos(file, temp);
|
||||||
|
return temp;
|
||||||
|
|
||||||
|
case SEEK_SET:
|
||||||
|
RdosSetFilePos(file, pos);
|
||||||
|
return pos;
|
||||||
|
|
||||||
|
case SEEK_END:
|
||||||
|
temp = RdosGetFilePos(file);
|
||||||
|
temp += pos;
|
||||||
|
RdosSetFilePos(file, temp);
|
||||||
|
return temp;
|
||||||
|
|
||||||
|
default:
|
||||||
|
errno = EINVAL;
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# open.c
|
||||||
|
# open function implementation
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include "rdos.h"
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int open(const char *file, int flags, ...)
|
||||||
|
{
|
||||||
|
int handle;
|
||||||
|
int pos;
|
||||||
|
|
||||||
|
if (flags & O_CREAT)
|
||||||
|
handle = RdosCreateFile(file, flags);
|
||||||
|
else
|
||||||
|
handle = RdosOpenFile(file, flags);
|
||||||
|
|
||||||
|
if (handle >= 0)
|
||||||
|
{
|
||||||
|
if (flags & O_APPEND)
|
||||||
|
{
|
||||||
|
pos = RdosGetFileSize(handle);
|
||||||
|
RdosSetFilePos(handle, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flags & O_TRUNC)
|
||||||
|
RdosSetFileSize(handle, 0);
|
||||||
|
|
||||||
|
return handle;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,344 @@
|
||||||
|
|
||||||
|
#ifndef _RDOS_H
|
||||||
|
#define _RDOS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//#undef WIN32
|
||||||
|
|
||||||
|
#define FILE_ATTRIBUTE_READONLY 0x1
|
||||||
|
#define FILE_ATTRIBUTE_HIDDEN 0x2
|
||||||
|
#define FILE_ATTRIBUTE_SYSTEM 0x4
|
||||||
|
#define FILE_ATTRIBUTE_DIRECTORY 0x10
|
||||||
|
#define FILE_ATTRIBUTE_ARCHIVE 0x20
|
||||||
|
#define FILE_ATTRIBUTE_NORMAL 0x80
|
||||||
|
|
||||||
|
#define LGOP_NULL 0
|
||||||
|
#define LGOP_NONE 1
|
||||||
|
#define LGOP_OR 2
|
||||||
|
#define LGOP_AND 3
|
||||||
|
#define LGOP_XOR 4
|
||||||
|
#define LGOP_INVERT 5
|
||||||
|
#define LGOP_INVERT_OR 6
|
||||||
|
#define LGOP_INVERT_AND 7
|
||||||
|
#define LGOP_INVERT_XOR 8
|
||||||
|
#define LGOP_ADD 9
|
||||||
|
#define LGOP_SUBTRACT 10
|
||||||
|
#define LGOP_MULTIPLY 11
|
||||||
|
|
||||||
|
#define getred(pgc) (((pgc)>>16)&0xFF)
|
||||||
|
#define getgreen(pgc) (((pgc)>>8)&0xFF)
|
||||||
|
#define getblue(pgc) ((pgc)&0xFF)
|
||||||
|
#define mkcolor(r,g,b) (((r)<<16)|((g)<<8)|(b))
|
||||||
|
|
||||||
|
typedef struct ThreadState
|
||||||
|
{
|
||||||
|
short int ID;
|
||||||
|
char Name[32];
|
||||||
|
unsigned long MsbTime;
|
||||||
|
unsigned long LsbTime;
|
||||||
|
char List[32];
|
||||||
|
long Offset;
|
||||||
|
short int Sel;
|
||||||
|
} ThreadState;
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define __stdcall
|
||||||
|
#else
|
||||||
|
#if (sizeof(int) == 2)
|
||||||
|
#define __stdcall
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
short int __stdcall RdosSwapShort(short int val);
|
||||||
|
long __stdcall RdosSwapLong(long val);
|
||||||
|
|
||||||
|
void __stdcall RdosSetTextMode();
|
||||||
|
int __stdcall RdosSetVideoMode(int *BitsPerPixel, int *xres, int *yres, int *linesize, void **buffer);
|
||||||
|
void __stdcall RdosSetClipRect(int handle, int xmin, int ymin, int xmax, int ymax);
|
||||||
|
void __stdcall RdosClearClipRect(int handle);
|
||||||
|
void __stdcall RdosSetDrawColor(int handle, int color);
|
||||||
|
void __stdcall RdosSetLGOP(int handle, int lgop);
|
||||||
|
void __stdcall RdosSetHollowStyle(int handle);
|
||||||
|
void __stdcall RdosSetFilledStyle(int handle);
|
||||||
|
int __stdcall RdosOpenFont(int height);
|
||||||
|
void __stdcall RdosCloseFont(int font);
|
||||||
|
void __stdcall RdosGetStringMetrics(int font, const char *str, int *width, int *height);
|
||||||
|
void __stdcall RdosSetFont(int handle, int font);
|
||||||
|
int __stdcall RdosGetPixel(int handle, int x, int y);
|
||||||
|
void __stdcall RdosSetPixel(int handle, int x, int y);
|
||||||
|
void __stdcall RdosBlit(int SrcHandle, int DestHandle, int width, int height,
|
||||||
|
int SrcX, int SrcY, int DestX, int DestY);
|
||||||
|
void __stdcall RdosDrawMask(int handle, void *mask, int RowSize, int width, int height,
|
||||||
|
int SrcX, int SrcY, int DestX, int DestY);
|
||||||
|
void __stdcall RdosDrawLine(int handle, int x1, int y1, int x2, int y2);
|
||||||
|
void __stdcall RdosDrawString(int handle, int x, int y, const char *str);
|
||||||
|
void __stdcall RdosDrawRect(int handle, int x, int y, int width, int height);
|
||||||
|
void __stdcall RdosDrawEllipse(int handle, int x, int y, int width, int height);
|
||||||
|
int __stdcall RdosCreateBitmap(int BitsPerPixel, int width, int height);
|
||||||
|
int __stdcall RdosDuplicateBitmapHandle(int handle);
|
||||||
|
void __stdcall RdosCloseBitmap(int handle);
|
||||||
|
int __stdcall RdosCreateStringBitmap(int font, const char *str);
|
||||||
|
void __stdcall RdosGetBitmapInfo(int handle, int *BitPerPixel, int *width, int *height,
|
||||||
|
int *linesize, void **buffer);
|
||||||
|
|
||||||
|
int __stdcall RdosCreateSprite(int DestHandle, int BitmapHandle, int MaskHandle, int lgop);
|
||||||
|
void __stdcall RdosCloseSprite(int handle);
|
||||||
|
void __stdcall RdosShowSprite(int handle);
|
||||||
|
void __stdcall RdosHideSprite(int handle);
|
||||||
|
void __stdcall RdosMoveSprite(int handle, int x, int y);
|
||||||
|
|
||||||
|
void __stdcall RdosSetForeColor(int color);
|
||||||
|
void __stdcall RdosSetBackColor(int color);
|
||||||
|
int __stdcall RdosGetMemSize(void *ptr);
|
||||||
|
void *__stdcall RdosAllocateMem(int Size);
|
||||||
|
void __stdcall RdosFreeMem(void *ptr);
|
||||||
|
int __stdcall RdosAppDebug();
|
||||||
|
|
||||||
|
int __stdcall RdosOpenCom(int ID, long BaudRate, char Parity, char DataBits, char StopBits, int SendBufSize, int RecBufSize);
|
||||||
|
void __stdcall RdosCloseCom(int Handle);
|
||||||
|
void __stdcall RdosFlushCom(int Handle);
|
||||||
|
char __stdcall RdosReadCom(int Handle);
|
||||||
|
int __stdcall RdosWriteCom(int Handle, char Val);
|
||||||
|
void __stdcall RdosEnableCts(int Handle);
|
||||||
|
void __stdcall RdosDisableCts(int Handle);
|
||||||
|
void __stdcall RdosEnableAutoRts(int Handle);
|
||||||
|
void __stdcall RdosDisableAutoRts(int Handle);
|
||||||
|
void __stdcall RdosSetDtr(int Handle);
|
||||||
|
void __stdcall RdosResetDtr(int Handle);
|
||||||
|
void __stdcall RdosSetRts(int Handle);
|
||||||
|
void __stdcall RdosResetRts(int Handle);
|
||||||
|
int __stdcall RdosGetReceiveBufferSpace(int Handle);
|
||||||
|
int __stdcall RdosGetSendBufferSpace(int Handle);
|
||||||
|
void __stdcall RdosWaitForSendCompletedCom(int Handle);
|
||||||
|
|
||||||
|
int __stdcall RdosOpenFile(const char *FileName, char Access);
|
||||||
|
int __stdcall RdosCreateFile(const char *FileName, int Attrib);
|
||||||
|
void __stdcall RdosCloseFile(int Handle);
|
||||||
|
int __stdcall RdosIsDevice(int Handle);
|
||||||
|
int __stdcall RdosDuplFile(int Handle);
|
||||||
|
long __stdcall RdosGetFileSize(int Handle);
|
||||||
|
void __stdcall RdosSetFileSize(int Handle, long Size);
|
||||||
|
long __stdcall RdosGetFilePos(int Handle);
|
||||||
|
void __stdcall RdosSetFilePos(int Handle, long Pos);
|
||||||
|
int __stdcall RdosReadFile(int Handle, void *Buf, int Size);
|
||||||
|
int __stdcall RdosWriteFile(int Handle, const void *Buf, int Size);
|
||||||
|
void __stdcall RdosGetFileTime(int Handle, unsigned long *MsbTime, unsigned long *LsbTime);
|
||||||
|
void __stdcall RdosSetFileTime(int Handle, unsigned long MsbTime, unsigned long LsbTime);
|
||||||
|
|
||||||
|
int __stdcall RdosCreateMapping(int Size);
|
||||||
|
int __stdcall RdosCreateNamedMapping(const char *Name, int Size);
|
||||||
|
int __stdcall RdosCreateNamedFileMapping(const char *Name, int Size, int FileHandle);
|
||||||
|
int __stdcall RdosOpenNamedMapping(const char *Name);
|
||||||
|
void __stdcall RdosSyncMapping(int Handle);
|
||||||
|
void __stdcall RdosCloseMapping(int Handle);
|
||||||
|
void __stdcall RdosMapView(int Handle, int Offset, void *Base, int Size);
|
||||||
|
void __stdcall RdosUnmapView(int Handle);
|
||||||
|
|
||||||
|
int __stdcall RdosSetCurDrive(int Drive);
|
||||||
|
int __stdcall RdosGetCurDrive();
|
||||||
|
int __stdcall RdosSetCurDir(const char *PathName);
|
||||||
|
int __stdcall RdosGetCurDir(int Drive, char *PathName);
|
||||||
|
int __stdcall RdosMakeDir(const char *PathName);
|
||||||
|
int __stdcall RdosRemoveDir(const char *PathName);
|
||||||
|
int __stdcall RdosRenameFile(const char *ToName, const char *FromName);
|
||||||
|
int __stdcall RdosDeleteFile(const char *PathName);
|
||||||
|
int __stdcall RdosGetFileAttribute(const char *PathName, int *Attribute);
|
||||||
|
int __stdcall RdosSetFileAttribute(const char *PathName, int Attribute);
|
||||||
|
int __stdcall RdosOpenDir(const char *PathName);
|
||||||
|
void __stdcall RdosCloseDir(int Handle);
|
||||||
|
int __stdcall RdosReadDir(int Handle, int EntryNr, int MaxNameSize, char *PathName, long *FileSize, int *Attribute, unsigned long *MsbTime, unsigned long *LsbTime);
|
||||||
|
|
||||||
|
int __stdcall RdosGetThreadState(int ThreadNr, ThreadState *State);
|
||||||
|
int __stdcall RdosSuspendThread(int ThreadNr);
|
||||||
|
|
||||||
|
void __stdcall RdosCpuReset();
|
||||||
|
void __stdcall RdosGetVersion(int *Major, int *Minor, int *Release);
|
||||||
|
void __stdcall RdosCreateThread(void (*Start)(void *Param), const char *Name, void *Param, int StackSize);
|
||||||
|
void __stdcall RdosTerminateThread();
|
||||||
|
int __stdcall RdosGetThreadHandle();
|
||||||
|
int __stdcall RdosExec(const char *prog, const char *param);
|
||||||
|
int __stdcall RdosSpawn(const char *prog, const char *param, const char *startdir);
|
||||||
|
void __stdcall RdosWaitMilli(int ms);
|
||||||
|
void __stdcall RdosGetTics(unsigned long *msb, unsigned long *lsb);
|
||||||
|
void __stdcall RdosTicsToRecord(unsigned long msb, unsigned long lsb, int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
|
||||||
|
void __stdcall RdosRecordToTics(unsigned long *msb, unsigned long *lsb, int year, int month, int day, int hour, int min, int sec, int milli);
|
||||||
|
int __stdcall RdosDayOfWeek(int year, int month, int day);
|
||||||
|
void __stdcall RdosGetSysTime(int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
|
||||||
|
void __stdcall RdosGetTime(int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
|
||||||
|
void __stdcall RdosSetTime(int year, int month, int day, int hour, int min, int sec, int milli);
|
||||||
|
void __stdcall RdosAddTics(unsigned long *msb, unsigned long *lsb, long tics);
|
||||||
|
void __stdcall RdosAddMilli(unsigned long *msb, unsigned long *lsb, long ms);
|
||||||
|
void __stdcall RdosAddSec(unsigned long *msb, unsigned long *lsb, long sec);
|
||||||
|
void __stdcall RdosAddMin(unsigned long *msb, unsigned long *lsb, long min);
|
||||||
|
void __stdcall RdosAddHour(unsigned long *msb, unsigned long *lsb, long hour);
|
||||||
|
void __stdcall RdosAddDay(unsigned long *msb, unsigned long *lsb, long day);
|
||||||
|
int __stdcall RdosSyncTime(long IP);
|
||||||
|
|
||||||
|
void __stdcall RdosDecodeMsbTics(unsigned long msb, int *days, int *hours);
|
||||||
|
void __stdcall RdosDecodeLsbTics(unsigned long lsb, int *min, int *sec, int *milli, int *micro);
|
||||||
|
|
||||||
|
int __stdcall RdosCreateSection();
|
||||||
|
void __stdcall RdosDeleteSection(int Handle);
|
||||||
|
void __stdcall RdosEnterSection(int Handle);
|
||||||
|
void __stdcall RdosLeaveSection(int Handle);
|
||||||
|
|
||||||
|
int __stdcall RdosCreateWait();
|
||||||
|
void __stdcall RdosCloseWait(int Handle);
|
||||||
|
void * __stdcall RdosCheckWait(int Handle);
|
||||||
|
void * __stdcall RdosWaitForever(int Handle);
|
||||||
|
void * __stdcall RdosWaitTimeout(int Handle, int MillSec);
|
||||||
|
void __stdcall RdosStopWait(int Handle);
|
||||||
|
void __stdcall RdosRemoveWait(int Handle, void *ID);
|
||||||
|
void __stdcall RdosAddWaitForKeyboard(int Handle, void *ID);
|
||||||
|
void __stdcall RdosAddWaitForMouse(int Handle, void *ID);
|
||||||
|
void __stdcall RdosAddWaitForCom(int Handle, int ComHandle, void *ID);
|
||||||
|
void __stdcall RdosAddWaitForAdc(int Handle, int AdcHandle, void *ID);
|
||||||
|
|
||||||
|
int __stdcall RdosCreateSignal();
|
||||||
|
void __stdcall RdosResetSignal(int Handle);
|
||||||
|
int __stdcall RdosIsSignalled(int Handle);
|
||||||
|
void __stdcall RdosSetSignal(int Handle);
|
||||||
|
void __stdcall RdosFreeSignal(int Handle);
|
||||||
|
void __stdcall RdosAddWaitForSignal(int Handle, int SignalHandle, void *ID);
|
||||||
|
|
||||||
|
long __stdcall RdosGetIp();
|
||||||
|
int __stdcall RdosNameToIp(const char *HostName);
|
||||||
|
int __stdcall RdosIpToName(int Ip, char *HostName, int MaxSize);
|
||||||
|
|
||||||
|
int __stdcall RdosCreateTcpListen(int Port, int MaxConnections, int BufferSize);
|
||||||
|
int __stdcall RdosGetTcpListen(int Handle);
|
||||||
|
void __stdcall RdosCloseTcpListen(int Handle);
|
||||||
|
void __stdcall RdosAddWaitForTcpListen(int Handle, int ConHandle, void *ID);
|
||||||
|
|
||||||
|
int __stdcall RdosOpenTcpConnection(int RemoteIp, int LocalPort, int RemotePort, int Timeout, int BufferSize);
|
||||||
|
int __stdcall RdosWaitForTcpConnection(int Handle, long Timeout);
|
||||||
|
void __stdcall RdosAddWaitForTcpConnection(int Handle, int ConHandle, void *ID);
|
||||||
|
void __stdcall RdosCloseTcpConnection(int Handle);
|
||||||
|
void __stdcall RdosDeleteTcpConnection(int Handle);
|
||||||
|
void __stdcall RdosAbortTcpConnection(int Handle);
|
||||||
|
void __stdcall RdosPushTcpConnection(int Handle);
|
||||||
|
int __stdcall RdosIsTcpConnectionClosed(int Handle);
|
||||||
|
long __stdcall RdosGetRemoteTcpConnectionIP(int Handle);
|
||||||
|
int __stdcall RdosGetRemoteTcpConnectionPort(int Handle);
|
||||||
|
int __stdcall RdosGetLocalTcpConnectionPort(int Handle);
|
||||||
|
int __stdcall RdosReadTcpConnection(int Handle, void *Buf, int Size);
|
||||||
|
int __stdcall RdosWriteTcpConnection(int Handle, const void *Buf, int Size);
|
||||||
|
int __stdcall RdosPollTcpConnection(int Handle);
|
||||||
|
|
||||||
|
int __stdcall RdosGetLocalMailslot(const char *Name);
|
||||||
|
int __stdcall RdosGetRemoteMailslot(long Ip, const char *Name);
|
||||||
|
void __stdcall RdosFreeMailslot(int Handle);
|
||||||
|
int __stdcall RdosSendMailslot(int Handle, const void *Msg, int Size, void *ReplyBuf, int MaxReplySize);
|
||||||
|
|
||||||
|
void __stdcall RdosDefineMailslot(const char *Name, int MaxSize);
|
||||||
|
int __stdcall RdosReceiveMailslot(void *Msg);
|
||||||
|
void __stdcall RdosReplyMailslot(const void *Msg, int Size);
|
||||||
|
|
||||||
|
void __stdcall RdosSetFocus(char FocusKey);
|
||||||
|
char __stdcall RdosGetFocus();
|
||||||
|
|
||||||
|
void __stdcall RdosClearKeyboard();
|
||||||
|
int __stdcall RdosPollKeyboard();
|
||||||
|
int __stdcall RdosReadKeyboard();
|
||||||
|
int __stdcall RdosGetKeyboardState();
|
||||||
|
int __stdcall RdosPutKeyboard(int KeyCode, int VirtualKey, int ScanCode);
|
||||||
|
int __stdcall RdosPeekKeyEvent(int *ExtKey, int *KeyState, int *VirtualKey, int *ScanCode);
|
||||||
|
int __stdcall RdosReadKeyEvent(int *ExtKey, int *KeyState, int *VirtualKey, int *ScanCode);
|
||||||
|
|
||||||
|
void __stdcall RdosHideMouse();
|
||||||
|
void __stdcall RdosShowMouse();
|
||||||
|
void __stdcall RdosGetMousePosition(int *x, int *y);
|
||||||
|
void __stdcall RdosSetMousePosition(int x, int y);
|
||||||
|
void __stdcall RdosSetMouseWindow(int StartX, int StartY, int EndX, int EndY);
|
||||||
|
void __stdcall RdosSetMouseMickey(int x, int y);
|
||||||
|
int __stdcall RdosGetLeftButton();
|
||||||
|
int __stdcall RdosGetRightButton();
|
||||||
|
void __stdcall RdosGetLeftButtonPressPosition(int *x, int *y);
|
||||||
|
void __stdcall RdosGetRightButtonPressPosition(int *x, int *y);
|
||||||
|
void __stdcall RdosGetLeftButtonReleasePosition(int *x, int *y);
|
||||||
|
void __stdcall RdosGetRightButtonReleasePosition(int *x, int *y);
|
||||||
|
|
||||||
|
void __stdcall RdosGetCursorPosition(int *Row, int *Col);
|
||||||
|
void __stdcall RdosSetCursorPosition(int Row, int Col);
|
||||||
|
void __stdcall RdosWriteChar(char ch);
|
||||||
|
void __stdcall RdosWriteSizeString(const char *Buf, int Size);
|
||||||
|
void __stdcall RdosWriteString(const char *Buf);
|
||||||
|
int __stdcall RdosReadLine(char *Buf, int MaxSize);
|
||||||
|
|
||||||
|
int __stdcall RdosPing(long Node, long Timeout);
|
||||||
|
|
||||||
|
int __stdcall RdosGetIdeDisc(int UnitNr);
|
||||||
|
int __stdcall RdosGetFloppyDisc(int UnitNr);
|
||||||
|
|
||||||
|
int __stdcall RdosSetDiscInfo(int DiscNr, int SectorSize, long Sectors, int BiosSectorsPerCyl, int BiosHeads);
|
||||||
|
int __stdcall RdosGetDiscInfo(int DiscNr, int *SectorSize, long *Sectors, int *BiosSectorsPerCyl, int *BiosHeads);
|
||||||
|
int __stdcall RdosReadDisc(int DiscNr, long Sector, char *Buf, int Size);
|
||||||
|
int __stdcall RdosWriteDisc(int DiscNr, long Sector, const char *Buf, int Size);
|
||||||
|
|
||||||
|
void __stdcall RdosGetRdfsInfo(void *CryptTab, void *KeyTab, void *ExtentSizeTab);
|
||||||
|
void __stdcall RdosDemandLoadDrive(int DriveNr);
|
||||||
|
int __stdcall RdosFormatDrive(int DiscNr, long StartSector, int Size, const char *FsName);
|
||||||
|
|
||||||
|
int __stdcall RdosAllocateFixedDrive(int DriveNr);
|
||||||
|
int __stdcall RdosAllocateStaticDrive();
|
||||||
|
int __stdcall RdosAllocateDynamicDrive();
|
||||||
|
|
||||||
|
int __stdcall RdosGetDriveInfo(int DriveNr, long *FreeUnits, int *BytesPerUnit, long *TotalUnits);
|
||||||
|
int __stdcall RdosGetDriveDiscParam(int DriveNr, int *DiscNr, long *StartSector, long *TotalSectors);
|
||||||
|
|
||||||
|
int __stdcall RdosCreateFileDrive(int Drive, long Size, const char *FsName, const char *FileName);
|
||||||
|
int __stdcall RdosOpenFileDrive(int Drive, const char *FileName);
|
||||||
|
|
||||||
|
int __stdcall RdosGetModuleHandle();
|
||||||
|
const char * __stdcall RdosGetExeName();
|
||||||
|
int __stdcall RdosLoadDll(const char *Name);
|
||||||
|
void __stdcall RdosFreeDll(int handle);
|
||||||
|
int __stdcall RdosReadResource(int handle, int ID, char *Buf, int Size);
|
||||||
|
int __stdcall RdosReadBinaryResource(int handle, int ID, char *Buf, int Size);
|
||||||
|
|
||||||
|
int __stdcall RdosOpenAdc(int channel);
|
||||||
|
void __stdcall RdosCloseAdc(int handle);
|
||||||
|
void __stdcall RdosDefineAdcTime(int handle, unsigned long msg, unsigned long lsb);
|
||||||
|
long __stdcall RdosReadAdc(int handle);
|
||||||
|
|
||||||
|
int __stdcall RdosReadSerialLines(int device, int *val);
|
||||||
|
int __stdcall RdosToggleSerialLine(int device, int line);
|
||||||
|
int __stdcall RdosReadSerialVal(int device, int line, int *val);
|
||||||
|
int __stdcall RdosWriteSerialVal(int device, int line, int val);
|
||||||
|
int __stdcall RdosReadSerialRaw(int device, int line, int *val);
|
||||||
|
int __stdcall RdosWriteSerialRaw(int device, int line, int val);
|
||||||
|
|
||||||
|
int __stdcall RdosOpenSysEnv();
|
||||||
|
int __stdcall RdosOpenProcessEnv();
|
||||||
|
void __stdcall RdosCloseEnv(int handle);
|
||||||
|
void __stdcall RdosAddEnvVar(int handle, const char *var, const char *value);
|
||||||
|
void __stdcall RdosDeleteEnvVar(int handle, const char *var);
|
||||||
|
int __stdcall RdosFindEnvVar(int handle, const char *var, char *value);
|
||||||
|
void __stdcall RdosGetEnvData(int handle, char *buf);
|
||||||
|
void __stdcall RdosSetEnvData(int handle, const char *buf);
|
||||||
|
|
||||||
|
int __stdcall RdosOpenSysIni();
|
||||||
|
void __stdcall RdosCloseIni(int handle);
|
||||||
|
int __stdcall RdosGotoIniSection(int handle, const char *name);
|
||||||
|
int __stdcall RdosRemoveIniSection(int handle);
|
||||||
|
int __stdcall RdosReadIni(int handle, const char *var, char *str, int maxsize);
|
||||||
|
int __stdcall RdosWriteIni(int handle, const char *var, const char *str);
|
||||||
|
int __stdcall RdosDeleteIni(int handle, const char *var);
|
||||||
|
|
||||||
|
void __stdcall RdosEnableStatusLED();
|
||||||
|
void __stdcall RdosDisableStatusLED();
|
||||||
|
|
||||||
|
void __stdcall RdosStartWatchdog(int timeout);
|
||||||
|
void __stdcall RdosKickWatchdog();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,162 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# rdoshelp.c
|
||||||
|
# implementation of various structures and helpers
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include <reent.h>
|
||||||
|
#include <rdos.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
char *__env[1] = { 0 };
|
||||||
|
char **environ = __env;
|
||||||
|
|
||||||
|
static int once_section;
|
||||||
|
static int key_section;
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : _get_impure_data_size
|
||||||
|
#
|
||||||
|
# Purpose....: Get size of _reent structure
|
||||||
|
#
|
||||||
|
# In params..: *
|
||||||
|
# Out params.: *
|
||||||
|
# Returns....: size
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
int get_impure_data_size()
|
||||||
|
{
|
||||||
|
return sizeof(struct _reent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_once
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_once
|
||||||
|
#
|
||||||
|
# In params..: Handle initially 0
|
||||||
|
# : function to initially call
|
||||||
|
# Out params.: *
|
||||||
|
# Returns....: result
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
int __rdos_thread_once (int *handle, void (*func) (void))
|
||||||
|
{
|
||||||
|
if (handle == 0 || func == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
RdosEnterSection(once_section);
|
||||||
|
if (*handle == 0)
|
||||||
|
(*func)();
|
||||||
|
else
|
||||||
|
*handle = 1;
|
||||||
|
RdosLeaveSection(once_section);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_mutex_init
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_thread_mutex_init
|
||||||
|
#
|
||||||
|
# In params..: *
|
||||||
|
# Out params.: *
|
||||||
|
# Returns....: handle
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
int __rdos_thread_mutex_init (void)
|
||||||
|
{
|
||||||
|
return RdosCreateSection();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_mutex_lock
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_thread_mutex_lock
|
||||||
|
#
|
||||||
|
# In params..: handle
|
||||||
|
# Out params.: *
|
||||||
|
# Returns....: *
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
int __rdos_thread_mutex_lock (int handle)
|
||||||
|
{
|
||||||
|
RdosEnterSection(handle);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_mutex_trylock
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_thread_mutex_trylock
|
||||||
|
# Try is not yet implemented, and lock is used.
|
||||||
|
#
|
||||||
|
# In params..: handle
|
||||||
|
# Out params.: *
|
||||||
|
# Returns....: *
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
int __rdos_thread_mutex_trylock (int handle)
|
||||||
|
{
|
||||||
|
RdosEnterSection(handle);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __rdos_thread_mutex_unlock
|
||||||
|
#
|
||||||
|
# Purpose....: Emulate GCC pthread_thread_mutex_unlock
|
||||||
|
#
|
||||||
|
# In params..: handle
|
||||||
|
# Out params.: *
|
||||||
|
# Returns....: *
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
int __rdos_thread_mutex_unlock (int handle)
|
||||||
|
{
|
||||||
|
RdosLeaveSection(handle);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##########################################################################
|
||||||
|
#
|
||||||
|
# Name : __init_rdos
|
||||||
|
#
|
||||||
|
# Purpose....: Init RDOS specific data
|
||||||
|
#
|
||||||
|
# In params..: reent structure
|
||||||
|
# Out params.: *
|
||||||
|
# Returns....: *
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
void __init_rdos(struct _reent *reent)
|
||||||
|
{
|
||||||
|
once_section = RdosCreateSection();
|
||||||
|
_REENT_INIT_PTR(reent);
|
||||||
|
__sinit(reent);
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# read.c
|
||||||
|
# read function implementation
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include "rdos.h"
|
||||||
|
|
||||||
|
int read(int file, char *ptr, int len)
|
||||||
|
{
|
||||||
|
return RdosReadFile(file, ptr, len);
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
int readlink(const char *path, char *buf, size_t bufsize)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# sbrk.c
|
||||||
|
# sbrk function implementation
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include "rdos.h"
|
||||||
|
|
||||||
|
void *sbrk (int incr)
|
||||||
|
{
|
||||||
|
return RdosAllocateMem(incr);
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int stat(const char *file, struct stat *st)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int symlink(const char *path1, const char *path2)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <sys/times.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
clock_t times(struct tms *buf)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int unlink(char *name)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,368 @@
|
||||||
|
|
||||||
|
allocate_dos_mem_nr = 0
|
||||||
|
allocate_local_mem_nr = 1
|
||||||
|
free_mem_nr = 2
|
||||||
|
available_local_linear_nr = 3
|
||||||
|
used_local_linear_nr = 4
|
||||||
|
available_vm_linear_nr = 5
|
||||||
|
used_vm_linear_nr = 6
|
||||||
|
|
||||||
|
reserve_pe_mem_nr = 7
|
||||||
|
set_flat_linear_valid_nr = 8
|
||||||
|
set_flat_linear_invalid_nr = 9
|
||||||
|
set_flat_linear_read_nr = 10
|
||||||
|
set_flat_linear_readwrite_nr = 11
|
||||||
|
|
||||||
|
get_raw_switch_ads_nr = 12
|
||||||
|
raw_switch_nr = 13
|
||||||
|
get_exception_nr = 14
|
||||||
|
set_exception_nr = 15
|
||||||
|
get_pm_int_nr = 16
|
||||||
|
set_pm_int_nr = 17
|
||||||
|
get_vm_int_nr = 18
|
||||||
|
set_vm_int_nr = 19
|
||||||
|
dpmi_int_nr = 20
|
||||||
|
dpmi_call_int_nr = 21
|
||||||
|
dpmi_call_nr = 22
|
||||||
|
allocate_vm_callback_nr = 23
|
||||||
|
free_vm_callback_nr = 24
|
||||||
|
|
||||||
|
wait_milli_nr = 25
|
||||||
|
wait_micro_nr = 26
|
||||||
|
wait_until_nr = 27
|
||||||
|
create_thread_nr = 28
|
||||||
|
terminate_thread_nr = 29
|
||||||
|
get_thread_nr = 30
|
||||||
|
swap_nr = 31
|
||||||
|
|
||||||
|
create_user_section_nr = 32
|
||||||
|
create_blocked_user_section_nr = 33
|
||||||
|
delete_user_section_nr = 34
|
||||||
|
enter_user_section_nr = 35
|
||||||
|
leave_user_section_nr = 36
|
||||||
|
|
||||||
|
get_local_mailslot_nr = 37
|
||||||
|
get_remote_mailslot_nr = 38
|
||||||
|
free_mailslot_nr = 39
|
||||||
|
send_mailslot_nr = 40
|
||||||
|
define_mailslot_nr = 41
|
||||||
|
receive_mailslot_nr = 42
|
||||||
|
reply_mailslot_nr = 43
|
||||||
|
|
||||||
|
load_exe_nr = 44
|
||||||
|
spawn_exe_nr = 45
|
||||||
|
unload_exe_nr = 46
|
||||||
|
get_exit_code_nr = 47
|
||||||
|
get_exe_name_nr = 48
|
||||||
|
get_cmd_line_nr = 49
|
||||||
|
get_env_nr = 50
|
||||||
|
load_dll_nr = 51
|
||||||
|
free_dll_nr = 52
|
||||||
|
get_dll_proc_nr = 53
|
||||||
|
get_dll_resource_nr = 54
|
||||||
|
get_dll_name_nr = 55
|
||||||
|
get_dll_nr = 56
|
||||||
|
allocate_app_mem_nr = 57
|
||||||
|
free_app_mem_nr = 58
|
||||||
|
get_psp_sel_nr = 59
|
||||||
|
|
||||||
|
get_debug_tss_nr = 60
|
||||||
|
get_debug_thread_nr = 61
|
||||||
|
debug_trace_nr = 62
|
||||||
|
debug_pace_nr = 63
|
||||||
|
debug_go_nr = 64
|
||||||
|
debug_next_nr = 65
|
||||||
|
|
||||||
|
wait_for_pe_debug_nr = 68
|
||||||
|
continue_pe_debug_nr = 69
|
||||||
|
notify_pe_exception_nr = 70
|
||||||
|
read_thread_mem_nr = 71
|
||||||
|
write_thread_mem_nr = 72
|
||||||
|
get_thread_tss_nr = 73
|
||||||
|
set_thread_tss_nr = 74
|
||||||
|
|
||||||
|
get_cpu_time_nr = 75
|
||||||
|
get_system_time_nr = 76
|
||||||
|
get_time_nr = 77
|
||||||
|
time_to_system_time_nr = 78
|
||||||
|
system_time_to_time_nr = 79
|
||||||
|
days_in_month_nr = 80
|
||||||
|
adjust_time_nr = 81
|
||||||
|
passed_days_nr = 82
|
||||||
|
time_to_binary_nr = 83
|
||||||
|
binary_to_time_nr = 84
|
||||||
|
sync_time_nr = 85
|
||||||
|
|
||||||
|
set_focus_nr = 86
|
||||||
|
enable_focus_nr = 87
|
||||||
|
|
||||||
|
get_dns_nr = 88
|
||||||
|
get_ppp_dns_nr = 89
|
||||||
|
open_tcp_connection_nr = 90
|
||||||
|
wait_for_tcp_connection_nr = 92
|
||||||
|
close_tcp_connection_nr = 93
|
||||||
|
delete_tcp_connection_nr = 94
|
||||||
|
is_tcp_connection_closed_nr = 95
|
||||||
|
abort_tcp_connection_nr = 96
|
||||||
|
read_tcp_connection_nr = 97
|
||||||
|
write_tcp_connection_nr = 98
|
||||||
|
push_tcp_connection_nr = 99
|
||||||
|
get_ip_address_nr = 100
|
||||||
|
name_to_ip_nr = 101
|
||||||
|
ip_to_name_nr = 102
|
||||||
|
ping_nr = 103
|
||||||
|
|
||||||
|
get_disc_info_nr = 104
|
||||||
|
format_drive_nr = 105
|
||||||
|
get_rdfs_info_nr = 106
|
||||||
|
read_disc_nr = 107
|
||||||
|
write_disc_nr = 108
|
||||||
|
get_drive_info_nr = 109
|
||||||
|
|
||||||
|
set_cur_drive_nr = 110
|
||||||
|
get_cur_drive_nr = 111
|
||||||
|
set_cur_dir_nr = 112
|
||||||
|
get_cur_dir_nr = 113
|
||||||
|
make_dir_nr = 114
|
||||||
|
remove_dir_nr = 115
|
||||||
|
rename_file_nr = 116
|
||||||
|
delete_file_nr = 117
|
||||||
|
get_file_attribute_nr = 118
|
||||||
|
set_file_attribute_nr = 119
|
||||||
|
open_dir_nr = 120
|
||||||
|
close_dir_nr = 121
|
||||||
|
read_dir_nr = 122
|
||||||
|
|
||||||
|
open_file_nr = 123
|
||||||
|
create_file_nr = 124
|
||||||
|
close_file_nr = 125
|
||||||
|
dupl_file_nr = 126
|
||||||
|
get_ioctl_data_nr = 127
|
||||||
|
get_file_size_nr = 128
|
||||||
|
set_file_size_nr = 129
|
||||||
|
get_file_pos_nr = 130
|
||||||
|
set_file_pos_nr = 131
|
||||||
|
get_file_time_nr = 132
|
||||||
|
set_file_time_nr = 133
|
||||||
|
read_file_nr = 134
|
||||||
|
write_file_nr = 135
|
||||||
|
read_con_nr = 136
|
||||||
|
|
||||||
|
create_mapping_nr = 137
|
||||||
|
create_named_mapping_nr = 138
|
||||||
|
create_file_mapping_nr = 139
|
||||||
|
create_named_file_mapping_nr = 140
|
||||||
|
open_named_mapping_nr = 141
|
||||||
|
sync_mapping_nr = 142
|
||||||
|
close_mapping_nr = 143
|
||||||
|
map_view_nr = 144
|
||||||
|
unmap_view_nr = 145
|
||||||
|
|
||||||
|
read_keyboard_nr = 146
|
||||||
|
poll_keyboard_nr = 147
|
||||||
|
flush_keyboard_nr = 148
|
||||||
|
get_keyboard_state_nr = 151
|
||||||
|
|
||||||
|
show_mouse_nr = 152
|
||||||
|
hide_mouse_nr = 153
|
||||||
|
get_mouse_position_nr = 154
|
||||||
|
set_mouse_position_nr = 155
|
||||||
|
set_mouse_window_nr = 156
|
||||||
|
set_mouse_mickey_nr = 157
|
||||||
|
get_left_button_nr = 158
|
||||||
|
get_right_button_nr = 159
|
||||||
|
get_left_button_press_position_nr = 160
|
||||||
|
get_right_button_press_position_nr = 161
|
||||||
|
get_left_button_release_position_nr = 162
|
||||||
|
get_right_button_release_position_nr = 163
|
||||||
|
hook_mouse_nr = 164
|
||||||
|
unhook_mouse_nr = 165
|
||||||
|
|
||||||
|
lock_cd_nr = 166
|
||||||
|
unlock_cd_nr = 167
|
||||||
|
eject_cd_nr = 168
|
||||||
|
insert_cd_nr = 169
|
||||||
|
|
||||||
|
open_com_nr = 170
|
||||||
|
close_com_nr = 171
|
||||||
|
flush_com_nr = 172
|
||||||
|
add_wait_for_com_nr = 174
|
||||||
|
read_com_nr = 175
|
||||||
|
write_com_nr = 176
|
||||||
|
set_dtr_nr = 177
|
||||||
|
reset_dtr_nr = 178
|
||||||
|
|
||||||
|
init_printer_nr = 179
|
||||||
|
check_printer_nr = 180
|
||||||
|
write_printer_nr = 181
|
||||||
|
|
||||||
|
set_cursor_position_nr = 182
|
||||||
|
get_cursor_position_nr = 183
|
||||||
|
write_char_nr = 184
|
||||||
|
write_asciiz_nr = 185
|
||||||
|
write_size_string_nr = 186
|
||||||
|
|
||||||
|
set_video_mode_nr = 187
|
||||||
|
set_vga_mode_nr = 188
|
||||||
|
set_forecolor_nr = 189
|
||||||
|
set_backcolor_nr = 190
|
||||||
|
get_string_metrics_nr = 193
|
||||||
|
set_font_nr = 194
|
||||||
|
get_video_mode_nr = 195
|
||||||
|
draw_string_nr = 197
|
||||||
|
|
||||||
|
xms_handler_nr = 198
|
||||||
|
ems_handler_nr = 199
|
||||||
|
|
||||||
|
test_nr = 200
|
||||||
|
|
||||||
|
resize_flat_linear_nr = 201
|
||||||
|
|
||||||
|
set_drawcolor_nr = 202
|
||||||
|
set_lgop_nr = 203
|
||||||
|
set_hollow_style_nr = 204
|
||||||
|
set_filled_style_nr = 205
|
||||||
|
get_pixel_nr = 206
|
||||||
|
set_pixel_nr = 207
|
||||||
|
draw_line_nr = 208
|
||||||
|
draw_rect_nr = 209
|
||||||
|
draw_ellipse_nr = 210
|
||||||
|
create_bitmap_nr = 211
|
||||||
|
close_bitmap_nr = 212
|
||||||
|
blit_nr = 213
|
||||||
|
open_font_nr = 215
|
||||||
|
close_font_nr = 216
|
||||||
|
create_string_bitmap_nr = 217
|
||||||
|
get_bitmap_info_nr = 218
|
||||||
|
draw_mask_nr = 219
|
||||||
|
|
||||||
|
create_sprite_nr = 220
|
||||||
|
close_sprite_nr = 221
|
||||||
|
show_sprite_nr = 222
|
||||||
|
hide_sprite_nr = 223
|
||||||
|
move_sprite_nr = 224
|
||||||
|
|
||||||
|
dup_bitmap_handle_nr = 225
|
||||||
|
set_clip_rect_nr = 226
|
||||||
|
clear_clip_rect_nr = 227
|
||||||
|
|
||||||
|
set_rts_nr = 228
|
||||||
|
reset_rts_nr = 229
|
||||||
|
get_com_receive_space_nr = 230
|
||||||
|
get_com_send_space_nr = 231
|
||||||
|
|
||||||
|
get_char_attrib_nr = 232
|
||||||
|
|
||||||
|
create_wait_nr = 233
|
||||||
|
close_wait_nr = 234
|
||||||
|
is_wait_idle_nr = 235
|
||||||
|
wait_no_timeout_nr = 236
|
||||||
|
wait_timeout_nr = 237
|
||||||
|
stop_wait_nr = 238
|
||||||
|
add_wait_for_keyboard_nr = 239
|
||||||
|
|
||||||
|
peek_key_event_nr = 240
|
||||||
|
read_key_event_nr = 241
|
||||||
|
|
||||||
|
add_wait_for_mouse_nr = 242
|
||||||
|
remove_wait_nr = 243
|
||||||
|
|
||||||
|
add_wait_for_adc_nr = 244
|
||||||
|
open_adc_nr = 245
|
||||||
|
close_adc_nr = 246
|
||||||
|
define_adc_time_nr = 247
|
||||||
|
read_adc_nr = 248
|
||||||
|
|
||||||
|
free_v86_nr = 249
|
||||||
|
|
||||||
|
read_serial_lines_nr = 250
|
||||||
|
toggle_serial_line_nr = 251
|
||||||
|
|
||||||
|
read_serial_val_nr = 252
|
||||||
|
write_serial_val_nr = 253
|
||||||
|
|
||||||
|
create_file_drive_nr = 254
|
||||||
|
open_file_drive_nr = 255
|
||||||
|
|
||||||
|
dos_ext_exec_nr = 256
|
||||||
|
|
||||||
|
open_sys_env_nr = 257
|
||||||
|
open_proc_env_nr = 258
|
||||||
|
close_env_nr = 259
|
||||||
|
add_env_var_nr = 260
|
||||||
|
delete_env_var_nr = 261
|
||||||
|
find_env_var_nr = 262
|
||||||
|
get_env_data_nr = 263
|
||||||
|
set_env_data_nr = 264
|
||||||
|
|
||||||
|
open_sys_ini_nr = 265
|
||||||
|
close_ini_nr = 266
|
||||||
|
goto_ini_section_nr = 267
|
||||||
|
remove_ini_section_nr = 268
|
||||||
|
read_ini_nr = 269
|
||||||
|
write_ini_nr = 270
|
||||||
|
delete_ini_nr = 271
|
||||||
|
|
||||||
|
app_debug_nr = 272
|
||||||
|
get_version_nr = 273
|
||||||
|
|
||||||
|
enable_status_led_nr = 274
|
||||||
|
disable_status_led_nr = 275
|
||||||
|
|
||||||
|
start_watchdog_nr = 276
|
||||||
|
kick_watchdog_nr = 277
|
||||||
|
|
||||||
|
erase_disc_sectors_nr = 278
|
||||||
|
|
||||||
|
cpu_reset_nr = 279
|
||||||
|
|
||||||
|
enable_cts_nr = 280
|
||||||
|
disable_cts_nr = 281
|
||||||
|
|
||||||
|
wait_for_send_completed_com_nr = 282
|
||||||
|
|
||||||
|
add_wait_for_tcp_connection_nr = 283
|
||||||
|
|
||||||
|
get_remote_tcp_connection_ip_nr = 284
|
||||||
|
get_remote_tcp_connection_port_nr = 285
|
||||||
|
get_local_tcp_connection_port_nr = 286
|
||||||
|
|
||||||
|
enable_auto_rts_nr = 287
|
||||||
|
disable_auto_rts_nr = 288
|
||||||
|
|
||||||
|
put_keyboard_code_nr = 289
|
||||||
|
|
||||||
|
poll_tcp_connection_nr = 290
|
||||||
|
|
||||||
|
create_signal_nr = 291
|
||||||
|
free_signal_nr = 292
|
||||||
|
add_wait_for_signal_nr = 293
|
||||||
|
set_signal_nr = 294
|
||||||
|
reset_signal_nr = 295
|
||||||
|
is_signalled_nr = 296
|
||||||
|
|
||||||
|
get_drive_disc_param_nr = 297
|
||||||
|
|
||||||
|
get_ide_disc_nr = 298
|
||||||
|
get_floppy_disc_nr = 299
|
||||||
|
demand_load_drive_nr = 300
|
||||||
|
set_disc_info_nr = 301
|
||||||
|
|
||||||
|
get_thread_state_nr = 302
|
||||||
|
suspend_thread_nr = 303
|
||||||
|
resume_thread_nr = 304
|
||||||
|
|
||||||
|
update_time_nr = 305
|
||||||
|
|
||||||
|
allocate_static_drive_nr = 306
|
||||||
|
allocate_fixed_drive_nr = 307
|
||||||
|
allocate_dynamic_drive_nr = 308
|
||||||
|
|
||||||
|
get_focus_nr = 309
|
||||||
|
|
||||||
|
add_wait_for_tcp_listen_nr = 310
|
||||||
|
create_tcp_listen_nr = 311
|
||||||
|
get_tcp_listen_nr = 312
|
||||||
|
close_tcp_listen_nr = 313
|
||||||
|
|
||||||
|
usergate_entries = 340
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int wait(int *status)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*#######################################################################
|
||||||
|
# RDOS operating system
|
||||||
|
# Copyright (C) 1988-2006, Leif Ekblad
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library 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 Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# The author of this program may be contacted at leif@rdos.net
|
||||||
|
#
|
||||||
|
# write.c
|
||||||
|
# write function implementation
|
||||||
|
#
|
||||||
|
##########################################################################*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <_syslist.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include "rdos.h"
|
||||||
|
|
||||||
|
int write(int file, char *ptr, int len)
|
||||||
|
{
|
||||||
|
return RdosWriteFile(file, ptr, len);
|
||||||
|
}
|
Loading…
Reference in New Issue