* made a lot of Solaris rtl stuff compilable

git-svn-id: trunk@2471 -
This commit is contained in:
florian 2006-02-07 20:17:44 +00:00
parent 2435a7a93c
commit fe2b798378
16 changed files with 1239 additions and 94 deletions

7
.gitattributes vendored
View File

@ -4385,6 +4385,7 @@ rtl/powerpc64/sysutilp.inc svneol=native#text/plain
rtl/solaris/Makefile svneol=native#text/plain
rtl/solaris/Makefile.fpc svneol=native#text/plain
rtl/solaris/errno.inc svneol=native#text/plain
rtl/solaris/errnostr.inc svneol=native#text/plain
rtl/solaris/i386/sighnd.inc svneol=native#text/plain
rtl/solaris/i386/sighndh.inc svneol=native#text/plain
rtl/solaris/osdefs.inc svneol=native#text/plain
@ -4395,9 +4396,15 @@ rtl/solaris/signal.inc svneol=native#text/plain
rtl/solaris/sparc/sighnd.inc svneol=native#text/plain
rtl/solaris/sparc/sighndh.inc svneol=native#text/plain
rtl/solaris/sparc/start.inc svneol=native#text/plain
rtl/solaris/suuid.inc svneol=native#text/plain
rtl/solaris/sysos.inc svneol=native#text/plain
rtl/solaris/sysosh.inc svneol=native#text/plain
rtl/solaris/system.pp svneol=native#text/plain
rtl/solaris/termio.pp svneol=native#text/plain
rtl/solaris/termios.inc svneol=native#text/plain
rtl/solaris/termiosproc.inc svneol=native#text/plain
rtl/solaris/unxconst.inc svneol=native#text/plain
rtl/solaris/unxfunc.inc svneol=native#text/plain
rtl/sparc/int64p.inc svneol=native#text/plain
rtl/sparc/makefile.cpu -text
rtl/sparc/math.inc svneol=native#text/plain

View File

@ -1,8 +1,8 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/01/13]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/02/06]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince powerpc64-linux
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince powerpc64-linux
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx
LIMIT83fs = go32v2 os2 emx watcom
@ -237,6 +237,8 @@ RTL=..
INC=$(RTL)/inc
COMMON=$(RTL)/common
PROCINC=$(RTL)/$(CPU_TARGET)
BSDINC=$(RTL)/bsd
BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
OSPROCINC=$(RTL)/solaris/$(CPU_TARGET)
POSIXINC=$(RTL)/posix
UNIXINC=$(RTL)/unix
@ -245,122 +247,125 @@ SYSTEMUNIT=system
ifdef RELEASE
override FPCOPT+=-Ur
endif
override FPCOPT+=-dFPC_USE_LIBC
override FPCOPT+=-dFPC_USE_LIBC -dNOMOUSE
OBJPASDIR=$(RTL)/objpas
GRAPHDIR=$(INC)/graph
ifndef USELIBGGI
USELIBGGI=NO
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-go32v2)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-win32)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-os2)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-freebsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-solaris)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-qnx)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-netware)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-openbsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-wdosx)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-emx)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-watcom)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-wince)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),m68k-amiga)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),m68k-atari)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),m68k-palmos)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),powerpc-linux)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),powerpc-macos)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),sparc-solaris)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),x86_64-linux)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
override TARGET_UNITS+=$(SYSTEMUNIT) objpas
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math matrix varutils charset ucomplex getopts errors terminfo dl dynlibs video keyboard variants types dateutils sysconst dos objects
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_RSTS+=math varutils typinfo classes variants dateutils systhrds sysconst rtlconst fpmkunit
@ -467,6 +472,9 @@ endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_RSTS+=math varutils typinfo classes variants dateutils systhrds sysconst rtlconst fpmkunit
endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_RSTS+=math varutils typinfo classes variants dateutils systhrds sysconst rtlconst fpmkunit
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_RSTS+=math varutils typinfo classes variants dateutils systhrds sysconst rtlconst fpmkunit
endif
@ -579,6 +587,9 @@ endif
ifeq ($(FULL_TARGET),arm-linux)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(OSPROCINC) $(POSIXINC)
endif
ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(OSPROCINC) $(POSIXINC)
endif
ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(OSPROCINC) $(POSIXINC)
endif
@ -690,6 +701,9 @@ endif
ifeq ($(FULL_TARGET),arm-linux)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(COMMON)
endif
ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(COMMON)
endif
ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(COMMON)
endif
@ -1941,9 +1955,9 @@ dateutils$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) sysutils$(PPUEXT) mat
strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
$(SYSTEMUNIT)$(PPUEXT)
baseunix$(PPUEXT) : unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
signal.inc bunxh.inc bunxmain.inc \
bunxfunc.inc ostypes.inc osmacro.inc $(UNIXINC)/gensigset.inc \
baseunix$(PPUEXT) : unixtype$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
signal.inc $(UNIXINC)/bunxh.inc \
$(BSDINC)/ostypes.inc $(BSDINC)/osmacro.inc $(UNIXINC)/gensigset.inc \
$(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
unixtype$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(UNIXINC)/unixtype.pp ptypes.inc $(UNIXINC)/ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
unix$(PPUEXT) : unixtype$(PPUEXT) baseunix$(PPUEXT) unixutil$(PPUEXT) strings$(PPUEXT) $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
@ -1984,7 +1998,7 @@ variants$(PPUEXT) : $(INC)/variants.pp sysutils$(PPUEXT) sysconst$(PPUEXT) varut
macpas$(PPUEXT) : $(INC)/macpas.pp $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(INC)/macpas.pp $(REDIR)
video$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/video.inc $(INC)/videoh.inc $(UNIXINC)/video.pp baseunix$(PPUEXT) strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT)
keyboard$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/keyboard.inc $(INC)/keybrdh.inc $(UNIXINC)/keyboard.pp mouse$(PPUEXT) strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT) baseunix$(PPUEXT)
keyboard$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/keyboard.inc $(INC)/keybrdh.inc $(UNIXINC)/keyboard.pp strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT) baseunix$(PPUEXT)
matrix$(PPUEXT) : $(INC)/matrix.pp $(SYSTEMUNIT)$(PPUEXT)
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
@ -1995,13 +2009,11 @@ lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
charset$(PPUEXT) : $(INC)/charset.pp objpas$(PPUEXT)
ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) math$(PPUEXT)
fpmkunit$(PPUEXT) : $(COMMON)/fpmkunit.pp classes$(PPUEXT)
termio$(PPUEXT) : baseunix$(PPUEXT)
mouse$(PPUEXT) : baseunix$(PPUEXT) video$(PPUEXT)
dl$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT) baseunix$(PPUEXT) initc$(PPUEXT)
errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) baseunix$(PPUEXT) syscall$(PPUEXT)
ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) baseunix$(PPUEXT)
terminfo$(PPUEXT) : terminfo.pp baseunix$(PPUEXT)
cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp systhrds$(PPUEXT) unix$(PPUEXT) sysutils$(PPUEXT)

View File

@ -5,19 +5,26 @@
[package]
main=rtl
# disabled units: serial ipc
[target]
loaders=
units=$(SYSTEMUNIT) objpas
units=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas \
heaptrc lineinfo \
baseunix unixutil \
termio unix initc cmem \
crt printer \
sysutils typinfo math matrix varutils \
charset ucomplex getopts \
errors \
# sockets
# ipc serial
terminfo dl dynlibs \
video \
# mouse
keyboard variants types dateutils sysconst \
# cthreads classes strutils rtlconsts
dos objects
# cwstring fpcylix fpmkunit
# macpas strings sysctl baseunix unixtype unixutil \
# unix initc cmem matrix \
# dos dl objects printer sockets \
# sysutils typinfo systhrds classes math varutils \
# charset ucomplex getopts heaptrc lineinfo \
# errors terminfo termio video crt mouse keyboard console \
# variants types sysctl dateutils \
# sysconst cthreads strutils rtlconst fpmkunit
rsts=math varutils typinfo classes variants dateutils systhrds sysconst rtlconst fpmkunit
@ -51,6 +58,8 @@ RTL=..
INC=$(RTL)/inc
COMMON=$(RTL)/common
PROCINC=$(RTL)/$(CPU_TARGET)
BSDINC=$(RTL)/bsd
BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
OSPROCINC=$(RTL)/solaris/$(CPU_TARGET)
POSIXINC=$(RTL)/posix
UNIXINC=$(RTL)/unix
@ -65,8 +74,8 @@ ifdef RELEASE
override FPCOPT+=-Ur
endif
# Darwin requires libc, no syscalls
override FPCOPT+=-dFPC_USE_LIBC
# Solaris requires libc, no syscalls, no mouse
override FPCOPT+=-dFPC_USE_LIBC -dNOMOUSE
# Paths
OBJPASDIR=$(RTL)/objpas
@ -124,9 +133,9 @@ strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\
# System Dependent Units
#
baseunix$(PPUEXT) : unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
signal.inc bunxh.inc bunxmain.inc \
bunxfunc.inc ostypes.inc osmacro.inc $(UNIXINC)/gensigset.inc \
baseunix$(PPUEXT) : unixtype$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
signal.inc $(UNIXINC)/bunxh.inc \
$(BSDINC)/ostypes.inc $(BSDINC)/osmacro.inc $(UNIXINC)/gensigset.inc \
$(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
unixtype$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(UNIXINC)/unixtype.pp ptypes.inc $(UNIXINC)/ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
@ -209,7 +218,7 @@ macpas$(PPUEXT) : $(INC)/macpas.pp $(SYSTEMUNIT)$(PPUEXT)
video$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/video.inc $(INC)/videoh.inc $(UNIXINC)/video.pp baseunix$(PPUEXT) strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT)
keyboard$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/keyboard.inc $(INC)/keybrdh.inc $(UNIXINC)/keyboard.pp mouse$(PPUEXT) strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT) baseunix$(PPUEXT)
keyboard$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/keyboard.inc $(INC)/keybrdh.inc $(UNIXINC)/keyboard.pp strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT) baseunix$(PPUEXT)
matrix$(PPUEXT) : $(INC)/matrix.pp $(SYSTEMUNIT)$(PPUEXT)
@ -234,10 +243,6 @@ fpmkunit$(PPUEXT) : $(COMMON)/fpmkunit.pp classes$(PPUEXT)
# Other system-dependent RTL Units
#
termio$(PPUEXT) : baseunix$(PPUEXT)
mouse$(PPUEXT) : baseunix$(PPUEXT) video$(PPUEXT)
dl$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
@ -245,7 +250,7 @@ sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) baseunix$(PPUEXT) syscall$(PPUEXT)
ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) baseunix$(PPUEXT)
terminfo$(PPUEXT) : terminfo.pp baseunix$(PPUEXT)

141
rtl/solaris/errnostr.inc Normal file
View File

@ -0,0 +1,141 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 2006 by Florian Klaempfl
Contains SunOS specific errors for error.pp in rtl/unix
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program 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.
**********************************************************************}
const
sys_errn = 121;
sys_errlist:array[0..sys_errn-1] of pchar = (
'Not super-user',
'No such file or directory',
'No such process',
'interrupted system call',
'I/O error',
'No such device or address',
'Arg list too long',
'Exec format error',
'Bad file number',
'No children',
'Resource temporarily unavailable',
'Not enough core',
'Permission denied',
'Bad address',
'Block device required',
'Mount device busy',
'File exists',
'Cross-device link',
'No such device',
'Not a directory',
'Is a directory',
'Invalid argument',
'File table overflow',
'Too many open files',
'Inappropriate ioctl for device',
'Text file busy',
'File too large',
'No space left on device',
'Illegal seek',
'Read only file system',
'Too many links',
'Broken pipe',
'Math arg out of domain of func',
'Math result not representable',
'No message of desired type',
'Identifier removed',
'Channel number out of range',
'Level not synchronized',
'Level halted',
'Level reset',
'Link number out of range',
'Protocol driver not attached',
'No CSI structure available',
'Level halted',
'Deadlock condition.',
'No record locks available.',
'Operation canceled',
'Operation not supported',
'Disc quota exceeded',
'invalid exchange',
'invalid request descriptor',
'exchange full',
'no anode',
'invalid request code',
'invalid slot',
'file locking deadlock error',
'bad font file fmt',
'process died with the lock',
'lock is not recoverable',
'Device not a stream',
'no data (for no delay io)',
'timer expired',
'out of streams resources',
'Machine is not on the network',
'Package not installed',
'The object is remote',
'the link has been severed',
'advertise error',
'srmount error',
'Communication error on send',
'Protocol error',
'locked lock was unmapped',
'Facility is not active',
'multihop attempted',
'trying to read unreadable message',
'path name is too long',
'value too large to be stored in data type',
'given log. name not unique',
'f.d. invalid for this operation',
'Remote address changed',
'Can''t access a needed shared lib.',
'Accessing a corrupted shared lib.',
'.lib section in a.out corrupted.',
'Attempting to link in too many libs.',
'Attempting to exec a shared library.',
'Illegal byte sequence.',
'Unsupported file system operation',
'Symbolic link loop',
'Restartable system call',
'if pipe/FIFO don''t sleep in stream head',
'directory not empty',
'Too many users (for UFS)',
'Socket operation on non-socket',
'Destination address required',
'Message too long',
'Protocol wrong type for socket',
'Protocol not available',
'Protocol not supported',
'Socket type not supported',
'Operation not supported on socket',
'Protocol family not supported',
'Address family not supported by protocol family',
'Address already in use',
'Can''t assign requested address',
'Network is down',
'Network is unreachable',
'Network dropped connection because of reset',
'Software caused connection abort',
'Connection reset by peer',
'No buffer space available',
'Socket is already connected',
'Socket is not connected',
'Can''t send after socket shutdown',
'Too many references: can''t splice',
'Connection timed out',
'Connection refused',
'Host is down',
'No route to host',
'operation already in progress',
'operation now in progress',
'Stale NFS file handle'
);

View File

@ -108,19 +108,36 @@ TYPE
{ directory services }
pdirent = ^dirent;
dirent = packed record { directory entry record - verify alignment }
d_ino : ino_t; {* "inode number" of entry *}
d_off : off_t; {* offset of disk directory entry *}
d_reclen : word; {* length of this record *}
d_name : array[0..255] of char; { name of file }
case integer of
1 : (
d_ino : ino_t; {* "inode number" of entry *}
d_off : off_t; {* offset of disk directory entry *}
d_reclen : word; {* length of this record *}
d_name : array[0..255] of char; { name of file }
);
{ overlay with alias }
2 : (
d_fileno : ino_t;
);
end;
pdir = ^dir;
dir = packed record
d_fd : cint; {* file descriptor *}
d_loc : cint; {* offset in block *}
d_size : cint; {* amount of valid data *}
d_buf : pchar; { directory block }
case integer of
1 : (
d_fd : cint; {* file descriptor *}
d_loc : cint; {* offset in block *}
d_size : cint; {* amount of valid data *}
d_buf : pchar; { directory block }
);
{ overlay for posix compatibility }
2 : (
dd_fd : cint; {* file descriptor *}
dd_loc : cint; {* offset in block *}
dd_size : cint; {* amount of valid data *}
dd_buf : pchar; { directory block }
);
end;

View File

@ -32,7 +32,6 @@ introduction)
{$packrecords c}
Type
{$ifndef VER_1_0} // maybe wrong (kernel vs libc)
dev_t = cuint64; { used for device numbers }
{$else}
@ -202,6 +201,52 @@ Type
__sem_waiting: pointer;
end;
uint32_t = cuint32;
int32_t = cint32;
caddr32_t = uint32_t;
daddr32_t = int32_t;
off32_t = int32_t;
ino32_t = uint32_t;
blkcnt32_t = int32_t;
fsblkcnt32_t = uint32_t;
fsfilcnt32_t = uint32_t;
id32_t = int32_t;
major32_t = uint32_t;
minor32_t = uint32_t;
key32_t = int32_t;
mode32_t = uint32_t;
uid32_t = int32_t;
gid32_t = int32_t;
nlink32_t = uint32_t;
dev32_t = uint32_t;
pid32_t = int32_t;
size32_t = uint32_t;
ssize32_t = int32_t;
time32_t = int32_t;
clock32_t = int32_t;
timeval32 = record
{ seconds }
tv_sec : time32_t;
{ and microseconds }
tv_usec : int32_t;
end;
timespec32 = record
{ seconds }
tv_sec : time32_t;
{ and nanoseconds }
tv_nsec : int32_t;
end;
timespec32_t = timespec32;
itimerspec32 = record
it_interval : timespec32;
it_value : timespec32;
end;
itimerspec32_t = itimerspec32;
CONST

54
rtl/solaris/suuid.inc Normal file
View File

@ -0,0 +1,54 @@
{
$Id: sysutils.pp,v 1.59 2005/03/25 22:53:39 jonas Exp $
This file is part of the Free Pascal run time library.
Copyright (c) 2006 by Florian Klaempfl
member of the Free Pascal development team
uuidgen for Solaris
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program 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.
**********************************************************************}
Const
RandomDevice = '/dev/urandom';
Function GetURandomBytes(Var Buf; NBytes : Integer) : Boolean;
Var
fd,I : Integer;
P : PByte;
begin
P:=@Buf;
fd:=FileOpen(RandomDevice,fmOpenRead);
Result:=(fd>=0);
if Result then
Try
While (NBytes>0) do
begin
I:=FileRead(fd,P^,nbytes);
If I>0 then
begin
Inc(P,I);
Dec(NBytes,I);
end;
end;
Finally
FileClose(Fd);
end;
end;
Function SysCreateGUID(out GUID : TGUID) : Integer;
begin
if not GetUrandomBytes(Guid,SizeOf(GUID)) then
GetRandomBytes(GUID,SizeOf(Guid));
Result:=0;
end;

View File

@ -20,13 +20,7 @@ const clib = 'c';
type libcint=longint;
plibcint=^libcint;
var errno : libcint; cvar;
function geterrnolocation: Plibcint; cdecl;
begin
geterrnolocation:=@errno;
end;
function geterrnolocation: Plibcint; cdecl;external clib name '___errno';
function geterrno:libcint; [public, alias: 'FPC_SYS_GETERRNO'];
begin

41
rtl/solaris/termio.pp Normal file
View File

@ -0,0 +1,41 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 1999-2000 by Peter Vreman
member of the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This file contains the termios interface.
This program 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.
**********************************************************************}
unit termio;
interface
{$inline on}
Uses UnixType,BaseUnix; // load base unix typing
// load types + consts
{$i termios.inc}
// load default prototypes from unix dir.
{$i termiosh.inc}
implementation
{$i textrec.inc}
// load implementation for prototypes from current dir.
{$i termiosproc.inc}
// load ttyname from unix dir.
{$i ttyname.inc}
end.

534
rtl/solaris/termios.inc Normal file
View File

@ -0,0 +1,534 @@
const
{ Disable special character functions }
_POSIX_VDISABLE = 0;
{ was #define dname(params) para_def_expr }
{ argument types are unknown }
const
IBSHIFT = 16;
{ required by termio.h and VCEOF/VCEOL }
const
_NCC = 8;
const
NCC = _NCC;
{ some defines required by POSIX }
const
NCCS = 19;
{
* types defined by POSIX. These are better off in types.h, but
* the standard says that they have to be in termios.h.
}
type
tcflag_t = dword;
cc_t = byte;
speed_t = dword;
{
* Ioctl control packet
}
ptermios = ^termios;
termios = record
{ input modes }
c_iflag : tcflag_t;
{ output modes }
c_oflag : tcflag_t;
{ control modes }
c_cflag : tcflag_t;
{ line discipline modes }
c_lflag : tcflag_t;
{ control chars }
c_cc : array[0..(NCCS)-1] of cc_t;
end;
ttermios = termios;
{
* POSIX termios functions
* These functions get mapped into ioctls.
}
(* Const before type ignored *)
function cfgetospeed(_para1:Ptermios):speed_t;cdecl;external;
function cfsetospeed(_para1:Ptermios; _para2:speed_t):cint;cdecl;external;
(* Const before type ignored *)
function cfgetispeed(_para1:Ptermios):speed_t;cdecl;external;
function cfsetispeed(_para1:Ptermios; _para2:speed_t):cint;cdecl;external;
function tcgetattr(_para1:cint; var _para2:termios):cint;cdecl;external;
(* Const before type ignored *)
function tcsetattr(_para1:cint; _para2:cint; const _para3:termios):cint;cdecl;external;
function tcgetattr(_para1:cint; _para2:Ptermios):cint;cdecl;external;
(* Const before type ignored *)
function tcsetattr(_para1:cint; _para2:cint; _para3:Ptermios):cint;cdecl;external;
// function tcsendbreak(_para1:cint; _para2:cint):cint;cdecl;
// function tcdrain(_para1:cint):cint;cdecl;
// function tcflush(_para1:cint; _para2:cint):cint;cdecl;
// function tcflow(_para1:cint; _para2:cint):cint;cdecl;
function tcgetsid(_para1:cint):pid_t;cdecl;external;
function tcgetsid:pid_t;cdecl;external;
{ control characters }
const
VINTR = 0;
VQUIT = 1;
VERASE = 2;
VKILL = 3;
VEOF = 4;
VEOL = 5;
const
VEOL2 = 6;
const
VMIN = 4;
VTIME = 5;
const
VSWTCH = 7;
const
VSTART = 8;
VSTOP = 9;
VSUSP = 10;
const
VDSUSP = 11;
VREPRINT = 12;
VDISCARD = 13;
VWERASE = 14;
VLNEXT = 15;
{ 16 thru 19 reserved for future use }
{
* control characters form Xenix termio.h
}
{ RESERVED true EOF char (V7 compatability) }
VCEOF = NCC;
{ RESERVED true EOL char }
VCEOL = NCC+1;
CNUL = 0;
CDEL = 0177;
{ S5 default control chars }
{ CINTR, CERASE and CKILL modified to SunOS traditional values }
CESC = '\\';
{ return type might be wrong }
{ FS, cntl | }
const
CQUIT = 034;
{ DEL }
CERASE = 0177;
{ was #define dname def_expr }
const
CEOT = 04;
CEOL = 0;
CEOL2 = 0;
{ cntl d }
CEOF = 04;
{ cntl q }
CSTART = 021;
{ cntl s }
CSTOP = 023;
{ cntl z }
CSWTCH = 032;
CNSWTCH = 0;
{
{ was #define dname def_expr }
function CSUSP : longint;
{ return type might be wrong }
{ was #define dname def_expr }
function CDSUSP : longint;
{ return type might be wrong }
{ was #define dname def_expr }
function CRPRNT : longint;
{ return type might be wrong }
{ was #define dname def_expr }
function CFLUSH : longint;
{ return type might be wrong }
{ was #define dname def_expr }
function CWERASE : longint;
{ return type might be wrong }
{ was #define dname def_expr }
function CLNEXT : longint;
{ return type might be wrong }
}
{ input modes }
const
IGNBRK = &0000001;
BRKINT = &0000002;
IGNPAR = &0000004;
PARMRK = &0000010;
INPCK = &0000020;
ISTRIP = &0000040;
INLCR = &0000100;
IGNCR = &0000200;
ICRNL = &0000400;
IUCLC = &0001000;
IXON = &0002000;
IXANY = &0004000;
IXOFF = &0010000;
IMAXBEL = &0020000;
{ for 386 compatibility }
DOSMODE = 0100000;
{ output modes }
OPOST = &0000001;
OLCUC = &0000002;
ONLCR = &0000004;
OCRNL = &0000010;
ONOCR = &0000020;
ONLRET = &0000040;
OFILL = &0000100;
OFDEL = &0000200;
NLDLY = &0000400;
NL0 = 0;
NL1 = &0000400;
CRDLY = &0003000;
CR0 = 0;
CR1 = &0001000;
CR2 = &0002000;
CR3 = &0003000;
TABDLY = &0014000;
TAB0 = 0;
TAB1 = &0004000;
TAB2 = &0010000;
TAB3 = &0014000;
XTABS = &0014000;
BSDLY = &0020000;
BS0 = 0;
BS1 = &0020000;
VTDLY = &0040000;
VT0 = 0;
VT1 = &0040000;
FFDLY = 0100000;
FF0 = 0;
FF1 = 0100000;
PAGEOUT = 0200000;
WRAP = 0400000;
{ control modes }
CBAUD = &0000017;
CSIZE = &0000060;
CS5 = 0;
CS6 = &0000020;
CS7 = &0000040;
CS8 = &0000060;
CSTOPB = &0000100;
CREAD = &0000200;
PARENB = &0000400;
PARODD = &0001000;
HUPCL = &0002000;
CLOCAL = &0004000;
RCV1EN = &0010000;
XMT1EN = &0020000;
LOBLK = &0040000;
{ *V7* exclusive use coming fron XENIX }
XCLUDE = 0100000;
CRTSXOFF = 010000000000;
CRTSCTS = 020000000000;
CIBAUD = 03600000;
PAREXT = 04000000;
CBAUDEXT = 010000000;
CIBAUDEXT = 020000000;
{
* 4.4BSD hardware flow control flags
}
CRTS_IFLOW = 010000000000;
CCTS_OFLOW = 020000000000;
{ line discipline 0 modes }
ISIG = &0000001;
ICANON = &0000002;
XCASE = &0000004;
ECHO = &0000010;
ECHOE = &0000020;
ECHOK = &0000040;
ECHONL = &0000100;
NOFLSH = &0000200;
TOSTOP = &0000400;
ECHOCTL = &0001000;
ECHOPRT = &0002000;
ECHOKE = &0004000;
DEFECHO = &0010000;
FLUSHO = &0020000;
PENDIN = &0040000;
{ POSIX flag - enable POSIX extensions }
IEXTEN = &0100000;
_TIOC = ord('T') shl 8;
TIOC = _TIOC;
TCGETA = _TIOC or 1;
TCSETA = _TIOC or 2;
TCSETAW = _TIOC or 3;
TCSETAF = _TIOC or 4;
TCSBRK = _TIOC or 5;
TCXONC = _TIOC or 6;
TCFLSH = _TIOC or 7;
{ Slots reserved for 386/XENIX compatibility - keyboard control }
TIOCKBON = _TIOC or 8;
TIOCKBOF = _TIOC or 9;
KBENABLED = _TIOC or 10;
IOCTYPE = $ff00;
TCDSET = _TIOC or 32;
{ 386 - "RTS" toggle define 8A1 protocol }
RTS_TOG = _TIOC or 33;
TIOCGWINSZ = _TIOC or 104;
TIOCSWINSZ = _TIOC or 103;
{
* Softcarrier ioctls
}
TIOCGSOFTCAR = _TIOC or 105;
TIOCSSOFTCAR = _TIOC or 106;
{ termios ioctls }
TCGETS = _TIOC or 13;
TCSETS = _TIOC or 14;
{ same as TCSETS }
TCSANOW = _TIOC or 14;
TCSETSW = _TIOC or 15;
{ same as TCSETSW }
TCSADRAIN = _TIOC or 15;
TCSETSF = _TIOC or 16;
{
* NTP PPS ioctls
}
TIOCGPPS = _TIOC or 125;
TIOCSPPS = _TIOC or 126;
TIOCGPPSEV = _TIOC or 127;
{ Argument filled in by TIOCGPPSEV }
type
ppsclockev = record
tv : timeval;
serial : cuint;
end;
ppsclockev32 = record
tv : timeval32;
serial : cuint32;
end;
{ same as TCSETSF }
const
TCSAFLUSH = _TIOC or 16;
{ termios option flags }
{ flush data received but not read }
TCIFLUSH = 0;
{ flush data written but not transmitted }
TCOFLUSH = 1;
{ flush both data both input and output queues }
TCIOFLUSH = 2;
{ suspend output }
TCOOFF = 0;
{ restart suspended output }
TCOON = 1;
{ suspend input }
TCIOFF = 2;
{ restart suspended input }
TCION = 3;
{ Slots for 386/XENIX compatibility }
{ BSD includes these ioctls in ttold.h }
const
TIOCGETD = tIOC or 0;
TIOCSETD = tIOC or 1;
TIOCHPCL = tIOC or 2;
TIOCGETP = tIOC or 8;
TIOCSETP = tIOC or 9;
TIOCSETN = tIOC or 10;
TIOCEXCL = tIOC or 13;
TIOCNXCL = tIOC or 14;
TIOCFLUSH = tIOC or 16;
TIOCSETC = tIOC or 17;
TIOCGETC = tIOC or 18;
{
* BSD ioctls that are not the same as XENIX are included here.
* There are also some relevant ioctls from SUN/BSD sys/ttycom.h
* BSD pty ioctls like TIOCPKT are not supported in SVR4.
}
{ bis local mode bits }
TIOCLBIS = tIOC or 127;
{ bic local mode bits }
TIOCLBIC = tIOC or 126;
{ set entire local mode word }
TIOCLSET = tIOC or 125;
{ get local modes }
TIOCLGET = tIOC or 124;
{ set break bit }
TIOCSBRK = tIOC or 123;
{ clear break bit }
TIOCCBRK = tIOC or 122;
{ set data terminal ready }
TIOCSDTR = tIOC or 121;
{ clear data terminal ready }
TIOCCDTR = tIOC or 120;
{ set local special chars }
TIOCSLTC = tIOC or 117;
{ get local special chars }
TIOCGLTC = tIOC or 116;
{ driver output queue size }
TIOCOUTQ = tIOC or 115;
{ void tty association }
TIOCNOTTY = tIOC or 113;
{ stop output, like ^S }
TIOCSTOP = tIOC or 111;
{ start output, like ^Q }
TIOCSTART = tIOC or 110;
{ private to Sun; do not use }
TIOCSILOOP = tIOC or 109;
{ end _SYS_TTOLD_H }
{ POSIX job control ioctls }
{ get pgrp of tty }
const
TIOCGPGRP = tIOC or 20;
{ set pgrp of tty }
TIOCSPGRP = tIOC or 21;
{ get session id on ctty }
TIOCGSID = tIOC or 22;
{ Miscellaneous }
{ simulate terminal input }
TIOCSTI = tIOC or 23;
{ Modem control }
{ set all modem bits }
TIOCMSET = tIOC or 26;
{ bis modem bits }
TIOCMBIS = tIOC or 27;
{ bic modem bits }
TIOCMBIC = tIOC or 28;
{ get all modem bits }
TIOCMGET = tIOC or 29;
{ line enable }
TIOCM_LE = &0001;
{ data terminal ready }
TIOCM_DTR = &0002;
{ request to send }
TIOCM_RTS = &0004;
{ secondary transmit }
TIOCM_ST = &0010;
{ secondary receive }
TIOCM_SR = &0020;
{ clear to send }
TIOCM_CTS = &0040;
{ carrier detect }
TIOCM_CAR = &0100;
TIOCM_CD = TIOCM_CAR;
{ ring }
TIOCM_RNG = &0200;
TIOCM_RI = TIOCM_RNG;
{ data set ready }
TIOCM_DSR = &0400;
{ pseudo-tty }
{ remote input editing }
TIOCREMOTE = tIOC or 30;
{ pty: send signal to slave }
TIOCSIGNAL = tIOC or 31;
{ Some more 386 xenix stuff }
LDIOC = ord('D') shl 8;
LDOPEN = LDIOC or 0;
LDCLOSE = LDIOC or 1;
LDCHG = LDIOC or 2;
LDGETT = LDIOC or 8;
LDSETT = LDIOC or 9;
{ Slots for 386 compatibility }
LDSMAP = LDIOC or 110;
LDGMAP = LDIOC or 111;
LDNMAP = LDIOC or 112;
LDEMAP = LDIOC or 113;
LDDMAP = LDIOC or 114;
{
* These are retained for 386/XENIX compatibility.
}
DIOC = ord('d') shl 8;
{ V7 }
DIOCGETP = DIOC or 8;
{ V7 }
DIOCSETP = DIOC or 9;
{
* Returns a non-zero value if there
* are characters in the input queue.
*
* XXX - somebody is confused here. V7 had no such "ioctl", although XENIX may
* have added it; 4BSD had FIONREAD, which returned the number of characters
* waiting, and was supposed to work on all descriptors (i.e., every driver
* should make a stab at implementing it).
}
{ V7 }
FIORDCHK = (ord('f') shl 8) or 3;
{
* Speeds
}
const
B0 = 0;
B50 = 1;
B75 = 2;
B110 = 3;
B134 = 4;
B150 = 5;
B200 = 6;
B300 = 7;
B600 = 8;
B1200 = 9;
B1800 = 10;
B2400 = 11;
B4800 = 12;
B9600 = 13;
B19200 = 14;
B38400 = 15;
B57600 = 16;
B76800 = 17;
B115200 = 18;
B153600 = 19;
B230400 = 20;
B307200 = 21;
B460800 = 22;
{ Windowing structure to support JWINSIZE/TIOCSWINSZ/TIOCGWINSZ }
{ rows, in characters }
{ columns, in character }
{ horizontal size, pixels }
{ vertical size, pixels }
type
winsize = record
ws_row : word;
ws_col : word;
ws_xpixel : word;
ws_ypixel : word;
end;
twinsize = winsize;
pwinsize = ^twinsize;
const
{ alias for FPC rtl }
TIOCGETA = _TIOC or 1;
TIOCSETA = _TIOC or 2;
TIOCSETAW = _TIOC or 3;
TIOCSETAF = _TIOC or 4;
{ same as TCSETSW }
TIOCDRAIN = _TIOC or 15;

View File

@ -0,0 +1,95 @@
{
This file is part of the Free Pascal run time library.
(c) 2000-2003 by Marco van de Voort
member of the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
Termios implementation for FreeBSD
This program 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.
}
{******************************************************************************
IOCtl and Termios calls
******************************************************************************}
Procedure CFMakeRaw(var tios:TermIOS);
begin
with tios do
begin
c_iflag:=c_iflag and (not (IMAXBEL or IXOFF or INPCK or BRKINT or
PARMRK or ISTRIP or INLCR or IGNCR or ICRNL or IXON or
IGNPAR));
c_iflag:=c_iflag OR IGNBRK;
c_oflag:=c_oflag and (not OPOST);
c_lflag:=c_lflag and (not (ECHO or ECHOE or ECHOK or ECHONL or ICANON or
ISIG or IEXTEN or NOFLSH or TOSTOP or PENDIN));
c_cflag:=(c_cflag and (not (CSIZE or PARENB))) or (CS8 OR cread);
c_cc[VMIN]:=1;
c_cc[VTIME]:=0;
end;
end;
Function TCSendBreak(fd,duration:cint):cint; {$ifdef VER2_0}inline;{$endif}
begin
TCSendBreak:=fpIOCtl(fd,TIOCSBRK,nil);
end;
Function TCSetPGrp(fd,id:cint):cint; {$ifdef VER2_0}inline;{$endif}
begin
TCSetPGrp:=fpIOCtl(fd,TIOCSPGRP,pointer(id));
end;
Function TCGetPGrp(fd:cint;var id:cint):cint; {$ifdef VER2_0}inline;{$endif}
begin
TCGetPGrp:=fpIOCtl(fd,TIOCGPGRP,@id);
end;
Function TCDrain(fd:cint):cint; {$ifdef VER2_0}inline;{$endif}
begin
TCDrain:=fpIOCtl(fd,TIOCDRAIN,nil); {Should set timeout to 1 first?}
end;
Function TCFlow(fd,act:cint):cint; {$ifdef VER2_0}inline;{$endif}
begin
case act OF
TCOOFF : TCFlow:=fpIoctl(fd,TIOCSTOP,nil);
TCOOn : TCFlow:=fpIOctl(Fd,TIOCStart,nil);
TCIOFF : {N/I}
end;
end;
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
begin
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel));
end;
Function IsATTY (Handle:cint):cint;
{
Check if the filehandle described by 'handle' is a TTY (Terminal)
}
var
t : Termios;
begin
IsAtty:=ord(TCGetAttr(Handle,t) <> -1);
end;
Function IsATTY(var f: text):cint; {$ifdef VER2_0}inline;{$endif}
{
Idem as previous, only now for text variables.
}
begin
IsATTY:=IsaTTY(textrec(f).handle);
end;

112
rtl/solaris/unxconst.inc Normal file
View File

@ -0,0 +1,112 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 1999-2000 by Michael Van Canneyt,
member of the Free Pascal development team.
Constants for Unix unit.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program 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.
**********************************************************************}
const
{ Things for LSEEK call}
Seek_set = 0;
Seek_Cur = 1;
Seek_End = 2;
{ Things for OPEN call - after include/sys/fcntl.h,
BSD specifies these constants in hex }
Open_Accmode = 3;
Open_RdOnly = 0;
Open_WrOnly = 1;
Open_RdWr = 2;
Open_NonBlock = 4;
Open_Append = 8;
Open_ShLock = $10;
Open_ExLock = $20;
Open_ASync = $40;
Open_FSync = $80;
Open_NoFollow = $100;
Open_Create = $200; {BSD convention}
Open_Creat = $200; {Linux convention}
Open_Trunc = $400;
Open_Excl = $800;
Open_NoCTTY = $8000;
{ The waitpid uses the following options:}
Wait_NoHang = 1;
Wait_UnTraced = 2;
Wait_Any = -1;
Wait_MyPGRP = 0;
{ Constants to check stat.mode - checked all STAT constants with BSD}
STAT_IFMT = $f000; {00170000 }
STAT_IFSOCK = $c000; {0140000 }
STAT_IFLNK = $a000; {0120000 }
STAT_IFREG = $8000; {0100000 }
STAT_IFBLK = $6000; {0060000 }
STAT_IFDIR = $4000; {0040000 }
STAT_IFCHR = $2000; {0020000 }
STAT_IFIFO = $1000; {0010000 }
STAT_ISUID = $0800; {0004000 }
STAT_ISGID = $0400; {0002000 }
STAT_ISVTX = $0200; {0001000}
{ Constants to check permissions all }
STAT_IRWXO = $7;
STAT_IROTH = $4;
STAT_IWOTH = $2;
STAT_IXOTH = $1;
STAT_IRWXG = STAT_IRWXO shl 3;
STAT_IRGRP = STAT_IROTH shl 3;
STAT_IWGRP = STAT_IWOTH shl 3;
STAT_IXGRP = STAT_IXOTH shl 3;
STAT_IRWXU = STAT_IRWXO shl 6;
STAT_IRUSR = STAT_IROTH shl 6;
STAT_IWUSR = STAT_IWOTH shl 6;
STAT_IXUSR = STAT_IXOTH shl 6;
{ Constants to test the type of filesystem }
fs_old_ext2 = $ef51;
fs_ext2 = $ef53;
fs_ext = $137d;
fs_iso = $9660;
fs_minix = $137f;
fs_minix_30 = $138f;
fs_minux_V2 = $2468;
fs_msdos = $4d44;
fs_nfs = $6969;
fs_proc = $9fa0;
fs_xia = $012FD16D;
{Constansts Termios/Ioctl (used in Do_IsDevice) }
IOCtl_TCGETS= $40000000+$2C7400+ 19; // TCGETS is also in termios.inc, but the sysunix needs only this
ITimer_Real =0;
ITimer_Virtual =1;
ITimer_Prof =2;
{
{Checked for BSD using Linuxthreads port}
{ cloning flags }
CSIGNAL = $000000ff; // signal mask to be sent at exit
CLONE_VM = $00000100; // set if VM shared between processes
CLONE_FS = $00000200; // set if fs info shared between processes
CLONE_FILES = $00000400; // set if open files shared between processes
CLONE_SIGHAND = $00000800; // set if signal handlers shared
CLONE_PID = $00001000; // set if pid shared
type
TCloneFunc=function(args:pointer):longint;cdecl;
}

70
rtl/solaris/unxfunc.inc Normal file
View File

@ -0,0 +1,70 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 2000 by Marco van de Voort
member of the Free Pascal development team.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program 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.
**********************************************************************}
{$ifndef HAS_LIBC_PIPING}
Function PClose(Var F:file) : cint;
var
pl : ^cint;
res : cint;
begin
fpclose(filerec(F).Handle);
{ closed our side, Now wait for the other - this appears to be needed ?? }
pl:=@(filerec(f).userdata[2]);
fpwaitpid(pl^,@res,0);
pclose:=res shr 8;
end;
Function PClose(Var F:text) :cint;
var
pl : ^longint;
res : longint;
begin
fpclose(Textrec(F).Handle);
{ closed our side, Now wait for the other - this appears to be needed ?? }
pl:=@(textrec(f).userdata[2]);
fpwaitpid(pl^,@res,0);
pclose:=res shr 8;
end;
{$ENDIF}
Function AssignPipe(var pipe_in,pipe_out:cint):cint; [public, alias : 'FPC_SYSC_ASSIGNPIPE'];
{
Sets up a pair of file variables, which act as a pipe. The first one can
be read from, the second one can be written to.
If the operation was unsuccesful, linuxerror is set.
}
var
ret : longint;
errn : cint;
{$ifdef FPC_USE_LIBC}
fdis : array[0..1] of cint;
{$endif}
begin
{$ifndef FPC_USE_LIBC}
ret:=intAssignPipe(pipe_in,pipe_out,errn);
if ret=-1 Then
fpseterrno(errn);
{$ELSE}
fdis[0]:=pipe_in;
fdis[1]:=pipe_out;
ret:=pipe(fdis);
pipe_in:=fdis[0];
pipe_out:=fdis[1];
{$ENDIF}
AssignPipe:=ret;
end;

View File

@ -54,18 +54,23 @@ end;
{$ifdef Linux}
function geterrnolocation: Plibcint; cdecl;external clib name '__errno_location';
{$else}
{$endif}
{$ifdef FreeBSD} // tested on x86
function geterrnolocation: Plibcint; cdecl;external clib name '__error';
{$else}
{$endif}
{$ifdef NetBSD} // from a sparc dump.
function geterrnolocation: Plibcint; cdecl;external clib name '__errno';
{$else}
{$endif}
{$ifdef Darwin}
function geterrnolocation: Plibcint; cdecl;external clib name '__error';
{$endif}
{$endif}
{$endif}
{$ifdef SunOS}
function geterrnolocation: Plibcint; cdecl;external clib name '___errno';
{$endif}
function fpgetCerrno:libcint;

View File

@ -13,20 +13,23 @@
***********************************************************************}
{ SunOS provides these functions directly }
{$ifndef SunOS}
Function TCGetAttr (fd:cint;var tios:TermIOS):cint; inline;
Function TCSetAttr (fd:cint;OptAct:cint;const tios:TermIOS):cint;
Procedure CFSetISpeed (var tios:TermIOS;speed:Cardinal); inline;
Procedure CFSetOSpeed (var tios:TermIOS;speed:Cardinal); inline;
Procedure CFMakeRaw (var tios:TermIOS);
Function TCSendBreak (fd,duration:cint):cint; inline;
{$endif SunOS}
Procedure CFMakeRaw (var tios:TermIOS);
Function TCSendBreak (fd,duration:cint):cint; inline;
Function TCSetPGrp (fd,id:cint) :cint; inline;
Function TCGetPGrp (fd:cint;var id:cint):cint; inline;
Function TCFlush (fd,qsel:cint):cint; inline;
Function TCDrain (fd:cint) :cint;inline;
Function TCFlow (fd,act:cint) :cint;inline;
Function IsATTY (Handle:cint) :cint;
Function IsATTY (Handle:cint) :cint;
Function IsATTY (var f:text) :cint; inline;
function TTYname (Handle:cint):string;
function TTYname (var F:Text) :string;
function TTYname (var F:Text) :string;

View File

@ -598,7 +598,7 @@ begin
fpseterrno(ESysEBADF);
exit;
end;
{$ifndef bsd}
{$if not(defined(bsd)) and not(defined(solaris)) }
p^.dd_nextoff:=fplseek(p^.dd_fd,loc,seek_set);
{$endif}
p^.dd_size:=0;
@ -1149,6 +1149,16 @@ begin
end;
{$endif}
{$ifdef sunos}
{ sunos doesn't support GetDomainName, see also
http://www.sun.com/software/solaris/programs/abi/appcert_faq.xml#q18
}
Function GetDomainName:String;
begin
GetDomainName:='';
end;
{$endif sunos}
{$ifdef BSD}
function intGetDomainName(Name:PChar; NameLen:Cint):cint;