mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 10:49:27 +02:00
* UnixType changes. Please report problems to me.
This commit is contained in:
parent
afcb1d6c14
commit
93622ec2e8
@ -16,6 +16,11 @@
|
|||||||
Unit BaseUnix;
|
Unit BaseUnix;
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
|
Uses UnixType;
|
||||||
|
|
||||||
|
{$i aliasptp.inc}
|
||||||
|
|
||||||
{$packrecords C}
|
{$packrecords C}
|
||||||
{$define oldreaddir} // Keep using readdir system call instead
|
{$define oldreaddir} // Keep using readdir system call instead
|
||||||
// of userland getdents stuff.
|
// of userland getdents stuff.
|
||||||
@ -76,7 +81,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2004-01-04 21:04:08 jonas
|
Revision 1.9 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.8 2004/01/04 21:04:08 jonas
|
||||||
* declare C-library routines as external in libc for Darwin (so we
|
* declare C-library routines as external in libc for Darwin (so we
|
||||||
generate proper import entries)
|
generate proper import entries)
|
||||||
|
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
{ POSIX STRUCTURES }
|
{ POSIX STRUCTURES }
|
||||||
{***********************************************************************}
|
{***********************************************************************}
|
||||||
|
|
||||||
|
{$ifdef FPC_IS_SYSTEM}
|
||||||
{$i ptypes.inc}
|
{$i ptypes.inc}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$ifdef cpupowerpc}
|
{$ifdef cpupowerpc}
|
||||||
{$ifdef netbsd}
|
{$ifdef netbsd}
|
||||||
@ -42,6 +44,7 @@ CONST // OS specific parameters for general<fd,sig>set behaviou
|
|||||||
ln2bitsinword = 5; { 32bit : ln(32)/ln(2)=5 }
|
ln2bitsinword = 5; { 32bit : ln(32)/ln(2)=5 }
|
||||||
ln2bitmask = 1 shl ln2bitsinword - 1;
|
ln2bitmask = 1 shl ln2bitsinword - 1;
|
||||||
wordsinfdset = FD_MAXFDSET DIV BITSINWORD; // words in fdset_t
|
wordsinfdset = FD_MAXFDSET DIV BITSINWORD; // words in fdset_t
|
||||||
|
wordsinsigset = SIG_MAXSIG DIV BITSINWORD;
|
||||||
|
|
||||||
TYPE
|
TYPE
|
||||||
{ system information services }
|
{ system information services }
|
||||||
@ -214,7 +217,10 @@ CONST
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2004-02-29 13:46:52 marco
|
Revision 1.9 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.8 2004/02/29 13:46:52 marco
|
||||||
* forgotten?
|
* forgotten?
|
||||||
|
|
||||||
Revision 1.7 2004/01/04 20:08:45 jonas
|
Revision 1.7 2004/01/04 20:08:45 jonas
|
||||||
|
@ -22,11 +22,15 @@ Interface
|
|||||||
{$define FPC_USE_SYSCALL}
|
{$define FPC_USE_SYSCALL}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$I ptypes.inc}
|
{ I ptypes.inc}
|
||||||
|
|
||||||
{$Packrecords C}
|
{$Packrecords C}
|
||||||
type psize_t=^size_t;
|
// type psize_t=^size_t;
|
||||||
|
Type size_t=dword;
|
||||||
|
psize_t=^dword;
|
||||||
|
cint = longint;
|
||||||
|
cuint = dword;
|
||||||
|
|
||||||
{
|
{
|
||||||
* Copyright (c) 1989, 1993
|
* Copyright (c) 1989, 1993
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
@ -148,7 +152,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 2003-12-30 12:26:21 marco
|
Revision 1.7 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.6 2003/12/30 12:26:21 marco
|
||||||
* FPC_USE_LIBC
|
* FPC_USE_LIBC
|
||||||
|
|
||||||
Revision 1.5 2003/11/19 17:11:40 marco
|
Revision 1.5 2003/11/19 17:11:40 marco
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/02/22]
|
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/01/05]
|
||||||
#
|
#
|
||||||
default: all
|
default: all
|
||||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
|
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
|
||||||
@ -185,14 +185,11 @@ override FPCDIR:=$(FPCDIR)/..
|
|||||||
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
||||||
override FPCDIR:=$(FPCDIR)/..
|
override FPCDIR:=$(FPCDIR)/..
|
||||||
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
||||||
override FPCDIR:=$(BASEDIR)
|
|
||||||
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
|
||||||
override FPCDIR=c:/pp
|
override FPCDIR=c:/pp
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
ifndef CROSSDIR
|
ifndef CROSSDIR
|
||||||
CROSSDIR:=$(FPCDIR)/cross/$(FULL_TARGET)
|
CROSSDIR:=$(FPCDIR)/cross/$(FULL_TARGET)
|
||||||
endif
|
endif
|
||||||
@ -235,7 +232,7 @@ GRAPHDIR=$(INC)/graph
|
|||||||
ifndef USELIBGGI
|
ifndef USELIBGGI
|
||||||
USELIBGGI=NO
|
USELIBGGI=NO
|
||||||
endif
|
endif
|
||||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings syscall sysctl baseunix unixutil unix rtlconst initc dos dl termio objects printer sysutils typinfo systhrds types classes math varutils cpu mmx charset ucomplex crt getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard console serial variants sysctl dateutils sysconst cthreads
|
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings syscall sysctl unixtype baseunix unixutil unix rtlconst initc dos dl termio objects printer sysutils typinfo systhrds types classes math varutils cpu mmx charset ucomplex crt getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard console serial variants sysctl dateutils sysconst cthreads
|
||||||
override TARGET_LOADERS+=prt0 cprt0 gprt0
|
override TARGET_LOADERS+=prt0 cprt0 gprt0
|
||||||
override TARGET_RSTS+=math varutils typinfo classes variants dateutils sysconst
|
override TARGET_RSTS+=math varutils typinfo classes variants dateutils sysconst
|
||||||
override INSTALL_FPCPACKAGE=y y
|
override INSTALL_FPCPACKAGE=y y
|
||||||
@ -1368,6 +1365,7 @@ dateutils$(PPUEXT): $(OBJPASDIR)/dateutils.pp baseunix$(PPUEXT) $(SYSTEMUNIT)$(P
|
|||||||
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
|
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
|
||||||
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
|
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
|
||||||
$(SYSTEMUNIT)$(PPUEXT)
|
$(SYSTEMUNIT)$(PPUEXT)
|
||||||
|
unixtype$(PPUEXT): $(UNIXINC)/unixtype.pp $(BSDINC)/ctypes.inc ptypes.inc $(SYSTEMUNIT)$(PPUEXT)
|
||||||
baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
|
baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
|
||||||
signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
|
signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
|
||||||
$(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
|
$(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
|
||||||
|
@ -10,7 +10,7 @@ fpcpackage=y
|
|||||||
|
|
||||||
[target]
|
[target]
|
||||||
loaders=prt0 cprt0 gprt0
|
loaders=prt0 cprt0 gprt0
|
||||||
units=$(SYSTEMUNIT) objpas strings syscall sysctl baseunix unixutil \
|
units=$(SYSTEMUNIT) objpas strings syscall sysctl unixtype baseunix unixutil \
|
||||||
unix rtlconst initc \
|
unix rtlconst initc \
|
||||||
dos dl termio objects printer \
|
dos dl termio objects printer \
|
||||||
sysutils typinfo systhrds types classes math varutils \
|
sysutils typinfo systhrds types classes math varutils \
|
||||||
@ -141,6 +141,8 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
|
|||||||
# System Dependent Units
|
# System Dependent Units
|
||||||
#
|
#
|
||||||
|
|
||||||
|
unixtype$(PPUEXT): $(UNIXINC)/unixtype.pp $(BSDINC)/ctypes.inc ptypes.inc $(SYSTEMUNIT)$(PPUEXT)
|
||||||
|
|
||||||
baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
|
baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
|
||||||
signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
|
signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
|
||||||
$(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
|
$(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
|
||||||
@ -244,3 +246,4 @@ sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
|
|||||||
|
|
||||||
cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp systhrds$(PPUEXT)
|
cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp systhrds$(PPUEXT)
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,12 +99,15 @@ CONST
|
|||||||
SYS_NMLN = 32; {BSD utsname struct limit}
|
SYS_NMLN = 32; {BSD utsname struct limit}
|
||||||
|
|
||||||
SIG_MAXSIG = 128; // highest signal version
|
SIG_MAXSIG = 128; // highest signal version
|
||||||
wordsinsigset = 4; // words in sigset_t
|
// wordsinsigset = 4; // words in sigset_t
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.9 2004-01-04 20:08:45 jonas
|
Revision 1.10 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.9 2004/01/04 20:08:45 jonas
|
||||||
* moved SIG_MAXSIG and wordsinsigset constants from bunxtype.inc to
|
* moved SIG_MAXSIG and wordsinsigset constants from bunxtype.inc to
|
||||||
ptypes.inc (already there for Darwin)
|
ptypes.inc (already there for Darwin)
|
||||||
|
|
||||||
|
@ -160,12 +160,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$else}
|
{$else}
|
||||||
|
|
||||||
|
{$ifndef HAS_LIBC_PIPING}
|
||||||
Function PClose(Var F:file) : cint;
|
Function PClose(Var F:file) : cint;
|
||||||
var
|
var
|
||||||
pl : ^cint;
|
pl : ^cint;
|
||||||
res : cint;
|
res : cint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
fpclose(filerec(F).Handle);
|
fpclose(filerec(F).Handle);
|
||||||
{ closed our side, Now wait for the other - this appears to be needed ?? }
|
{ closed our side, Now wait for the other - this appears to be needed ?? }
|
||||||
pl:=@(filerec(f).userdata[2]);
|
pl:=@(filerec(f).userdata[2]);
|
||||||
@ -185,6 +187,7 @@ begin
|
|||||||
fpwaitpid(pl^,@res,0);
|
fpwaitpid(pl^,@res,0);
|
||||||
pclose:=res shr 8;
|
pclose:=res shr 8;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$endif}
|
{$endif}
|
||||||
// can't have oldfpccall here, linux doesn't need it.
|
// can't have oldfpccall here, linux doesn't need it.
|
||||||
@ -275,7 +278,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.18 2004-01-01 17:07:21 marco
|
Revision 1.19 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.18 2004/01/01 17:07:21 marco
|
||||||
* few small freebsd fixes backported from debugging linux
|
* few small freebsd fixes backported from debugging linux
|
||||||
|
|
||||||
Revision 1.17 2003/12/30 12:32:30 marco
|
Revision 1.17 2003/12/30 12:32:30 marco
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/02/22]
|
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/01/05]
|
||||||
#
|
#
|
||||||
default: all
|
default: all
|
||||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
|
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
|
||||||
@ -185,14 +185,11 @@ override FPCDIR:=$(FPCDIR)/..
|
|||||||
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
||||||
override FPCDIR:=$(FPCDIR)/..
|
override FPCDIR:=$(FPCDIR)/..
|
||||||
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
||||||
override FPCDIR:=$(BASEDIR)
|
|
||||||
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
|
||||||
override FPCDIR=c:/pp
|
override FPCDIR=c:/pp
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
ifndef CROSSDIR
|
ifndef CROSSDIR
|
||||||
CROSSDIR:=$(FPCDIR)/cross/$(FULL_TARGET)
|
CROSSDIR:=$(FPCDIR)/cross/$(FULL_TARGET)
|
||||||
endif
|
endif
|
||||||
@ -242,7 +239,7 @@ GRAPHDIR=$(INC)/graph
|
|||||||
ifndef USELIBGGI
|
ifndef USELIBGGI
|
||||||
USELIBGGI=NO
|
USELIBGGI=NO
|
||||||
endif
|
endif
|
||||||
override TARGET_UNITS+=$(SYSTEMUNIT) baseunix strings systhrds objpas syscall unixutil heaptrc lineinfo $(LINUXUNIT1) termio unix $(LINUXUNIT2) initc $(CPU_UNITS) dos crt objects printer ggigraph sysutils typinfo math varutils charset ucomplex getopts errors sockets gpm ipc serial terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst cthreads classes strutils rtlconst
|
override TARGET_UNITS+=$(SYSTEMUNIT) unixtype baseunix strings systhrds objpas syscall unixutil heaptrc lineinfo $(LINUXUNIT1) termio unix $(LINUXUNIT2) initc $(CPU_UNITS) dos crt objects printer ggigraph sysutils typinfo math varutils charset ucomplex getopts errors sockets gpm ipc serial terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst cthreads classes strutils rtlconst
|
||||||
override TARGET_LOADERS+=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
override TARGET_LOADERS+=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
||||||
override TARGET_RSTS+=math varutils typinfo variants systhrds sysconst rtlconst
|
override TARGET_RSTS+=math varutils typinfo variants systhrds sysconst rtlconst
|
||||||
override CLEAN_UNITS+=syslinux linux
|
override CLEAN_UNITS+=syslinux linux
|
||||||
@ -1386,6 +1383,7 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
|
|||||||
unix$(PPUEXT) : unix.pp strings$(PPUEXT) baseunix$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
|
unix$(PPUEXT) : unix.pp strings$(PPUEXT) baseunix$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
|
||||||
sysc11.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
|
sysc11.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
|
||||||
unixsysc.inc
|
unixsysc.inc
|
||||||
|
unixtype$(PPUEXT) : $(UNIXINC)/unixtype.pp ptypes.inc ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
|
||||||
baseunix$(PPUEXT) : errno.inc bunxtype.inc ptypes.inc ctypes.inc \
|
baseunix$(PPUEXT) : errno.inc bunxtype.inc ptypes.inc ctypes.inc \
|
||||||
signal.inc $(UNIXINC)/bunxh.inc bunxmain.inc ostypes.inc \
|
signal.inc $(UNIXINC)/bunxh.inc bunxmain.inc ostypes.inc \
|
||||||
bunxfunc.inc $(CPU_TARGET)/syscallh.inc $(CPU_TARGET)/sysnr.inc \
|
bunxfunc.inc $(CPU_TARGET)/syscallh.inc $(CPU_TARGET)/sysnr.inc \
|
||||||
|
@ -7,7 +7,7 @@ main=rtl
|
|||||||
|
|
||||||
[target]
|
[target]
|
||||||
loaders=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
loaders=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
||||||
units=$(SYSTEMUNIT) baseunix strings systhrds objpas syscall unixutil \
|
units=$(SYSTEMUNIT) unixtype baseunix strings systhrds objpas syscall unixutil \
|
||||||
heaptrc lineinfo \
|
heaptrc lineinfo \
|
||||||
$(LINUXUNIT1) termio unix $(LINUXUNIT2) initc $(CPU_UNITS) \
|
$(LINUXUNIT1) termio unix $(LINUXUNIT2) initc $(CPU_UNITS) \
|
||||||
dos crt objects printer ggigraph \
|
dos crt objects printer ggigraph \
|
||||||
@ -165,6 +165,8 @@ unix$(PPUEXT) : unix.pp strings$(PPUEXT) baseunix$(PPUEXT) $(INC)/textrec.inc $(
|
|||||||
sysc11.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
|
sysc11.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
|
||||||
unixsysc.inc
|
unixsysc.inc
|
||||||
|
|
||||||
|
unixtype$(PPUEXT) : $(UNIXINC)/unixtype.pp ptypes.inc ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
|
||||||
|
|
||||||
baseunix$(PPUEXT) : errno.inc bunxtype.inc ptypes.inc ctypes.inc \
|
baseunix$(PPUEXT) : errno.inc bunxtype.inc ptypes.inc ctypes.inc \
|
||||||
signal.inc $(UNIXINC)/bunxh.inc bunxmain.inc ostypes.inc \
|
signal.inc $(UNIXINC)/bunxh.inc bunxmain.inc ostypes.inc \
|
||||||
bunxfunc.inc $(CPU_TARGET)/syscallh.inc $(CPU_TARGET)/sysnr.inc \
|
bunxfunc.inc $(CPU_TARGET)/syscallh.inc $(CPU_TARGET)/sysnr.inc \
|
||||||
|
@ -16,6 +16,11 @@
|
|||||||
Unit BaseUnix;
|
Unit BaseUnix;
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
|
Uses UnixType;
|
||||||
|
|
||||||
|
{$i aliasptp.inc}
|
||||||
|
|
||||||
{$define oldreaddir} // Keep using readdir system call instead
|
{$define oldreaddir} // Keep using readdir system call instead
|
||||||
// of userland getdents stuff.
|
// of userland getdents stuff.
|
||||||
{$define usedomain} // Allow uname with "domain" entry.
|
{$define usedomain} // Allow uname with "domain" entry.
|
||||||
@ -74,7 +79,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2004-01-04 21:04:08 jonas
|
Revision 1.9 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.8 2004/01/04 21:04:08 jonas
|
||||||
* declare C-library routines as external in libc for Darwin (so we
|
* declare C-library routines as external in libc for Darwin (so we
|
||||||
generate proper import entries)
|
generate proper import entries)
|
||||||
|
|
||||||
|
@ -18,12 +18,14 @@
|
|||||||
{ Base Unix Structures }
|
{ Base Unix Structures }
|
||||||
{***********************************************************************}
|
{***********************************************************************}
|
||||||
|
|
||||||
|
{$IFDEF FPC_IS_SYSTEM}
|
||||||
{$i ptypes.inc}
|
{$i ptypes.inc}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
|
||||||
CONST
|
CONST
|
||||||
// SYS_NMLM = 65;
|
// SYS_NMLM = 65;
|
||||||
UTSNAME_LENGTH = SYS_NMLM;
|
UTSNAME_LENGTH = SYS_NMLN;
|
||||||
UTSNAME_NODENAME_LENGTH = UTSNAME_LENGTH;
|
UTSNAME_NODENAME_LENGTH = UTSNAME_LENGTH;
|
||||||
{$ifdef usedomain}
|
{$ifdef usedomain}
|
||||||
UTSNAME_DOMAIN_LENGTH = UTSNAME_LENGTH;
|
UTSNAME_DOMAIN_LENGTH = UTSNAME_LENGTH;
|
||||||
@ -31,11 +33,6 @@ CONST
|
|||||||
|
|
||||||
FD_MAXFDSET = 1024;
|
FD_MAXFDSET = 1024;
|
||||||
BITSINWORD = 8*sizeof(longint);
|
BITSINWORD = 8*sizeof(longint);
|
||||||
{$ifdef FPC_USE_LIBC}
|
|
||||||
SIG_MAXSIG = 1024; // highest signal version
|
|
||||||
{$else}
|
|
||||||
SIG_MAXSIG = 128; // highest signal version
|
|
||||||
{$endif}
|
|
||||||
wordsinsigset = SIG_MAXSIG DIV BITSINWORD; // words in sigset_t
|
wordsinsigset = SIG_MAXSIG DIV BITSINWORD; // words in sigset_t
|
||||||
wordsinfdset = FD_MAXFDSET DIV BITSINWORD; // words in fdset_t
|
wordsinfdset = FD_MAXFDSET DIV BITSINWORD; // words in fdset_t
|
||||||
ln2bitsinword = 5; { 32bit : ln(32)/ln(2)=5 }
|
ln2bitsinword = 5; { 32bit : ln(32)/ln(2)=5 }
|
||||||
@ -271,7 +268,10 @@ const
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2004-02-22 15:00:27 marco
|
Revision 1.9 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.8 2004/02/22 15:00:27 marco
|
||||||
* genfdset word count added. Small fix for libc maxsigsetsize
|
* genfdset word count added. Small fix for libc maxsigsetsize
|
||||||
|
|
||||||
Revision 1.7 2004/01/31 16:17:38 florian
|
Revision 1.7 2004/01/31 16:17:38 florian
|
||||||
|
@ -139,14 +139,22 @@ CONST
|
|||||||
{ System limits, POSIX value in parentheses, used for buffer and stack allocation }
|
{ System limits, POSIX value in parentheses, used for buffer and stack allocation }
|
||||||
{ took idefix' values}
|
{ took idefix' values}
|
||||||
|
|
||||||
ARG_MAX = 131072; {4096} { Maximum number of argument size }
|
ARG_MAX = 131072; {4096} { Maximum number of argument size }
|
||||||
NAME_MAX = 255; {14} { Maximum number of bytes in filename }
|
NAME_MAX = 255; {14} { Maximum number of bytes in filename }
|
||||||
PATH_MAX = 4095; {255} { Maximum number of bytes in pathname }
|
PATH_MAX = 4095; {255} { Maximum number of bytes in pathname }
|
||||||
SYS_NMLM = 65;
|
SYS_NMLN = 65;
|
||||||
|
{$ifdef FPC_USE_LIBC}
|
||||||
|
SIG_MAXSIG = 1024; // highest signal version
|
||||||
|
{$else}
|
||||||
|
SIG_MAXSIG = 128; // highest signal version
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 2004-01-11 09:56:20 jonas
|
Revision 1.8 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.7 2004/01/11 09:56:20 jonas
|
||||||
* moved tstatfs from systypes.inc to ptypes.inc to fix make cycle with
|
* moved tstatfs from systypes.inc to ptypes.inc to fix make cycle with
|
||||||
-dFPC_USE_LIBC (systypes.inc is now completely commented out)
|
-dFPC_USE_LIBC (systypes.inc is now completely commented out)
|
||||||
|
|
||||||
|
49
rtl/unix/aliasctp.inc
Normal file
49
rtl/unix/aliasctp.inc
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
$Id$
|
||||||
|
This file is part of the Free Pascal run time library.
|
||||||
|
Copyright (c) 2004 by Marco van de Voort
|
||||||
|
Member of the Free Pascal development team
|
||||||
|
|
||||||
|
Aliases for basic types for C interfacing, for reloading them
|
||||||
|
in other units from unit unixtype in a typesafe way.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
**********************************************************************}
|
||||||
|
|
||||||
|
Type
|
||||||
|
cInt8 = UnixType.cInt8;
|
||||||
|
cUInt8 = UnixType.cUInt8;
|
||||||
|
cUInt16 = UnixType.cUInt16;
|
||||||
|
cInt16 = UnixType.cInt16;
|
||||||
|
cInt32 = UnixType.cInt32;
|
||||||
|
cUInt32 = UnixType.cUInt32;
|
||||||
|
cInt64 = UnixType.cInt64;
|
||||||
|
cUInt64 = UnixType.cUInt64;
|
||||||
|
cuchar = UnixType.cuchar;
|
||||||
|
cInt = UnixType.cInt;
|
||||||
|
cUInt = UnixType.cUInt;
|
||||||
|
cLong = UnixType.cLong;
|
||||||
|
cuLong = UnixType.cuLong;
|
||||||
|
cshort = UnixType.cshort;
|
||||||
|
cushort = UnixType.cushort;
|
||||||
|
pcInt = UnixType.pcInt;
|
||||||
|
pcUInt = UnixType.pcUInt;
|
||||||
|
pcLong = UnixType.pcLong;
|
||||||
|
pculong = UnixType.pculong;
|
||||||
|
pcshort = UnixType.pcshort;
|
||||||
|
pcushort= UnixType.pcushort;
|
||||||
|
|
||||||
|
{
|
||||||
|
$Log$
|
||||||
|
Revision 1.1 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
85
rtl/unix/aliasptp.inc
Normal file
85
rtl/unix/aliasptp.inc
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
{
|
||||||
|
$Id$
|
||||||
|
This file is part of the Free Pascal run time library.
|
||||||
|
Copyright (c) 2004 by Marco van de Voort
|
||||||
|
Member of the Free Pascal development team
|
||||||
|
|
||||||
|
Aliases for Unix base types and constants, to import them into
|
||||||
|
multiple units in a typesafe way.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
**********************************************************************}
|
||||||
|
|
||||||
|
{$i aliasctp.inc}
|
||||||
|
|
||||||
|
type
|
||||||
|
dev_t = UnixType.dev_t;
|
||||||
|
TDev = UnixType.TDev;
|
||||||
|
pDev = UnixType.pDev;
|
||||||
|
gid_t = UnixType.gid_t;
|
||||||
|
TGid = UnixType.TGid;
|
||||||
|
pGid = UnixType.pGid;
|
||||||
|
ino_t = UnixType.ino_t;
|
||||||
|
TIno = UnixType.TIno;
|
||||||
|
pIno = UnixType.pIno;
|
||||||
|
mode_t = UnixType.mode_t;
|
||||||
|
TMode = UnixType.TMode;
|
||||||
|
pMode = UnixType.pMode;
|
||||||
|
nlink_t = UnixType.nlink_t;
|
||||||
|
TnLink = UnixType.TnLink;
|
||||||
|
pnLink = UnixType.pnLink;
|
||||||
|
off_t = UnixType.off_t;
|
||||||
|
TOff = UnixType.TOff;
|
||||||
|
pOff = UnixType.pOff;
|
||||||
|
pid_t = UnixType.pid_t;
|
||||||
|
TPid = UnixType.TPid;
|
||||||
|
pPid = UnixType.pPid;
|
||||||
|
size_t = UnixType.size_t;
|
||||||
|
TSize = UnixType.TSize;
|
||||||
|
pSize = UnixType.pSize;
|
||||||
|
ssize_t = UnixType.ssize_t;
|
||||||
|
TsSize = UnixType.TsSize;
|
||||||
|
psSize = UnixType.psSize;
|
||||||
|
uid_t = UnixType.uid_t;
|
||||||
|
TUid = UnixType.TUid;
|
||||||
|
pUid = UnixType.pUid;
|
||||||
|
clock_t = UnixType.clock_t;
|
||||||
|
TClock = UnixType.TClock;
|
||||||
|
pClock = UnixType.pClock;
|
||||||
|
time_t = UnixType.time_t;
|
||||||
|
TTime = UnixType.TTime;
|
||||||
|
pTime = UnixType.pTime;
|
||||||
|
ptime_t = UnixType.ptime_t;
|
||||||
|
|
||||||
|
socklen_t= UnixType.socklen_t;
|
||||||
|
TSocklen = UnixType.TSocklen;
|
||||||
|
pSocklen = UnixType.pSocklen;
|
||||||
|
|
||||||
|
timeval = UnixType.timeval;
|
||||||
|
ptimeval = UnixType.ptimeval;
|
||||||
|
TTimeVal = UnixType.TTimeVal;
|
||||||
|
timespec = UnixType.timespec;
|
||||||
|
ptimespec= UnixType.ptimespec;
|
||||||
|
Ttimespec= UnixType.Ttimespec;
|
||||||
|
|
||||||
|
CONST
|
||||||
|
ARG_MAX = UnixType.ARG_MAX;
|
||||||
|
NAME_MAX = UnixType.NAME_MAX;
|
||||||
|
PATH_MAX = UnixType.PATH_MAX;
|
||||||
|
SYS_NMLN = UnixType.SYS_NMLN;
|
||||||
|
SIG_MAXSIG = UnixType.SIG_MAXSIG;
|
||||||
|
// wordsinsigset = UnixType.wordsinsigset;
|
||||||
|
|
||||||
|
{
|
||||||
|
$Log$
|
||||||
|
Revision 1.1 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -66,7 +66,7 @@ Procedure AddDisk(const path:string);
|
|||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
Strings,UnixUtil,Unix,BaseUnix;
|
Strings,UnixUtil,Unix,BaseUnix,UnixType;
|
||||||
|
|
||||||
{******************************************************************************
|
{******************************************************************************
|
||||||
--- Link C Lib if set ---
|
--- Link C Lib if set ---
|
||||||
@ -832,7 +832,10 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.30 2004-02-18 22:00:45 peter
|
Revision 1.31 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.30 2004/02/18 22:00:45 peter
|
||||||
* dirptr changed to pointer
|
* dirptr changed to pointer
|
||||||
|
|
||||||
Revision 1.29 2004/02/18 19:08:27 florian
|
Revision 1.29 2004/02/18 19:08:27 florian
|
||||||
|
@ -33,7 +33,7 @@ uses
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
Uses UnixUtil,Baseunix;
|
Uses UnixUtil,Baseunix,UnixType;
|
||||||
|
|
||||||
{$Define OS_FILEISREADONLY} // Specific implementation for Unix.
|
{$Define OS_FILEISREADONLY} // Specific implementation for Unix.
|
||||||
|
|
||||||
@ -629,7 +629,10 @@ end.
|
|||||||
{
|
{
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.36 2004-02-13 10:50:23 marco
|
Revision 1.37 2004-03-04 22:15:16 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
Revision 1.36 2004/02/13 10:50:23 marco
|
||||||
* Hopefully last large changes to fpexec and friends.
|
* Hopefully last large changes to fpexec and friends.
|
||||||
- naming conventions changes from Michael.
|
- naming conventions changes from Michael.
|
||||||
- shell functions get alternative under ifdef.
|
- shell functions get alternative under ifdef.
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
Unit Unix;
|
Unit Unix;
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Uses UnixUtil,BaseUnix;
|
Uses UnixUtil,BaseUnix,UnixType;
|
||||||
|
|
||||||
|
{$i aliasptp.inc}
|
||||||
|
|
||||||
{$define POSIXWORKAROUND}
|
{$define POSIXWORKAROUND}
|
||||||
{ Get Types and Constants }
|
{ Get Types and Constants }
|
||||||
@ -1740,8 +1742,8 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.67 2004-03-03 17:23:06 olle
|
Revision 1.68 2004-03-04 22:15:17 marco
|
||||||
* tiny tiny flaw fix
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
Revision 1.66 2004/02/16 13:21:18 marco
|
Revision 1.66 2004/02/16 13:21:18 marco
|
||||||
* fpexec for popen
|
* fpexec for popen
|
||||||
|
34
rtl/unix/unixtype.pp
Normal file
34
rtl/unix/unixtype.pp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
$Id$
|
||||||
|
This file is part of the Free Pascal run time library.
|
||||||
|
(c) 2004 by Marco van de Voort
|
||||||
|
member of the Free Pascal development team.
|
||||||
|
|
||||||
|
THIS UNIT IS NOT FOR USE BY ENDUSERS. IT IS USED TO AVOID CERTAIN
|
||||||
|
CIRCULAR REFERENCE PROBLEMS.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
**********************************************************************}
|
||||||
|
unit unixtype;
|
||||||
|
|
||||||
|
Interface
|
||||||
|
|
||||||
|
{$i ptypes.inc}
|
||||||
|
|
||||||
|
Implementation
|
||||||
|
|
||||||
|
End.
|
||||||
|
|
||||||
|
{
|
||||||
|
$Log$
|
||||||
|
Revision 1.1 2004-03-04 22:15:17 marco
|
||||||
|
* UnixType changes. Please report problems to me.
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user