Browse Source

--- Merging r21027 into '.':
U rtl/bsd/ossysc.inc
--- Merging r21081 into '.':
C rtl/openbsd/Makefile.fpc
--- Merging r21082 into '.':
C rtl/openbsd/Makefile
Summary of conflicts:
Text conflicts: 2

# revisions: 21027,21081,21082
r21027 | pierre | 2012-04-25 01:03:08 +0200 (Wed, 25 Apr 2012) | 1 line
Changed paths:
M /trunk/rtl/bsd/ossysc.inc

+ Add USE_SIGACTION_SIGTRAMP
r21081 | pierre | 2012-04-27 16:19:43 +0200 (Fri, 27 Apr 2012) | 1 line
Changed paths:
M /trunk/rtl/openbsd/Makefile.fpc

Fix Makefile for openbsd
r21082 | pierre | 2012-04-27 16:19:54 +0200 (Fri, 27 Apr 2012) | 1 line
Changed paths:
M /trunk/rtl/openbsd/Makefile

Fix Makefile for openbsd

git-svn-id: branches/fixes_2_6@21467 -

marco 13 years ago
parent
commit
4387f5845b
2 changed files with 50 additions and 5 deletions
  1. 12 3
      rtl/bsd/ossysc.inc
  2. 38 2
      rtl/openbsd/Makefile

+ 12 - 3
rtl/bsd/ossysc.inc

@@ -300,6 +300,10 @@ end;
   If OldAct is non-nil the previous action is saved there.
 }
 
+{$ifdef USE_SIGACTION_SIGTRAMP}
+  procedure signal_trampoline; cdecl; forward;
+{$endif def USE_SIGACTION_SIGTRAMP}
+
 function Fpsigaction(sig: cint; act, oact: psigactionrec): cint; [public, alias : 'FPC_SYSC_SIGACTION'];
 
 {
@@ -310,7 +314,12 @@ function Fpsigaction(sig: cint; act, oact: psigactionrec): cint; [public, alias
 }
 
 begin
+{$ifdef USE_SIGACTION_SIGTRAMP}
+  fpsigaction:=do_syscall(syscall_nr___sigaction_sigtramp,TSysParam(sig),TSysParam(act),TSysParam(oact),
+                          TSysParam(@signal_trampoline),2);
+{$else not USE_SIGACTION_SIGTRAMP}
   fpsigaction:=do_syscall(syscall_nr_sigaction,TSysParam(sig),TSysParam(act),TSysParam(oact));
+{$endif not USE_SIGACTION_SIGTRAMP}
 end;
 
 (*=================== MOVED from sysunix.inc ========================*)
@@ -397,7 +406,7 @@ function Fpaccess(const pathname : pchar; amode : cint): cint; [public, alias :
 begin
  FpAccess:=do_syscall(syscall_nr_access,TSysParam(pathname),amode);
 end;
-{
+(*
 function Fpaccess(const pathname : pathstr; amode : cint): cint;
 
 {
@@ -417,7 +426,7 @@ begin
  pathname:=pathname+#0;
  Access:=do_syscall(syscall_nr_access, TSysParam(@pathname[1]),mode)=0;
 end;
-}
+*)
 
 Function FpDup(fildes:cint):cint; [public, alias : 'FPC_SYSC_DUP'];
 
@@ -503,7 +512,7 @@ begin
   FPsigprocmask:=do_syscall(syscall_nr_sigprocmask,tsysparam(how),TSysParam(nset),TSysParam(oset));
 {$endif OS_SIGPROCMASK_RETURNS_OVAL}
 end;
-{$user BLA!}
+{$warning user BLA!}
 Function FpNanoSleep(req : ptimespec;rem : ptimespec) : cint; [public, alias : 'FPC_SYSC_NANOSLEEP'];
 begin
   FpNanoSleep:=Do_SysCall(syscall_nr_nanosleep,TSysParam(req),TSysParam(rem));

+ 38 - 2
rtl/openbsd/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/12/30]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/06/03]
 #
 default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx haiku
 LIMIT83fs = go32v2 os2 emx watcom
@@ -450,9 +450,15 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings syscall baseunix $(LINUXUNIT) unixtype unixutil unix ctypes bsd initc $(CPU_UNITS) dos crt objects printer matrix rtlconsts sysutils fgl classes fmtbcd typinfo math varutils charset ucomplex getopts heaptrc lineinfo lnfodwrf errors sockets ipc terminfo dateutils strutils video mouse keyboard  serial variants types sysctl sysconst fpintres convutils stdconvs dynlibs cwstring cmem dl termio cthreads
 endif
+ifeq ($(FULL_TARGET),x86_64-netbsd)
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings syscall baseunix $(LINUXUNIT) unixtype unixutil unix ctypes bsd initc $(CPU_UNITS) dos crt objects printer matrix rtlconsts sysutils fgl classes fmtbcd typinfo math varutils charset ucomplex getopts heaptrc lineinfo lnfodwrf errors sockets ipc terminfo dateutils strutils video mouse keyboard  serial variants types sysctl sysconst fpintres convutils stdconvs dynlibs cwstring cmem dl termio cthreads
+endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings syscall baseunix $(LINUXUNIT) unixtype unixutil unix ctypes bsd initc $(CPU_UNITS) dos crt objects printer matrix rtlconsts sysutils fgl classes fmtbcd typinfo math varutils charset ucomplex getopts heaptrc lineinfo lnfodwrf errors sockets ipc terminfo dateutils strutils video mouse keyboard  serial variants types sysctl sysconst fpintres convutils stdconvs dynlibs cwstring cmem dl termio cthreads
 endif
+ifeq ($(FULL_TARGET),x86_64-openbsd)
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings syscall baseunix $(LINUXUNIT) unixtype unixutil unix ctypes bsd initc $(CPU_UNITS) dos crt objects printer matrix rtlconsts sysutils fgl classes fmtbcd typinfo math varutils charset ucomplex getopts heaptrc lineinfo lnfodwrf errors sockets ipc terminfo dateutils strutils video mouse keyboard  serial variants types sysctl sysconst fpintres convutils stdconvs dynlibs cwstring cmem dl termio cthreads
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings syscall baseunix $(LINUXUNIT) unixtype unixutil unix ctypes bsd initc $(CPU_UNITS) dos crt objects printer matrix rtlconsts sysutils fgl classes fmtbcd typinfo math varutils charset ucomplex getopts heaptrc lineinfo lnfodwrf errors sockets ipc terminfo dateutils strutils video mouse keyboard  serial variants types sysctl sysconst fpintres convutils stdconvs dynlibs cwstring cmem dl termio cthreads
 endif
@@ -639,9 +645,15 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override TARGET_IMPLICITUNITS+=exeinfo
 endif
+ifeq ($(FULL_TARGET),x86_64-netbsd)
+override TARGET_IMPLICITUNITS+=exeinfo
+endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 override TARGET_IMPLICITUNITS+=exeinfo
 endif
+ifeq ($(FULL_TARGET),x86_64-openbsd)
+override TARGET_IMPLICITUNITS+=exeinfo
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_IMPLICITUNITS+=exeinfo
 endif
@@ -828,9 +840,15 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override TARGET_LOADERS+=prt0 cprt0
 endif
+ifeq ($(FULL_TARGET),x86_64-netbsd)
+override TARGET_LOADERS+=prt0 cprt0
+endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 override TARGET_LOADERS+=prt0 cprt0
 endif
+ifeq ($(FULL_TARGET),x86_64-openbsd)
+override TARGET_LOADERS+=prt0 cprt0
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_LOADERS+=prt0 cprt0
 endif
@@ -1017,9 +1035,15 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override TARGET_RSTS+=math varutils typinfo variants classes sysconst dateutils
 endif
+ifeq ($(FULL_TARGET),x86_64-netbsd)
+override TARGET_RSTS+=math varutils typinfo variants classes sysconst dateutils
+endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 override TARGET_RSTS+=math varutils typinfo variants classes sysconst dateutils
 endif
+ifeq ($(FULL_TARGET),x86_64-openbsd)
+override TARGET_RSTS+=math varutils typinfo variants classes sysconst dateutils
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_RSTS+=math varutils typinfo variants classes sysconst dateutils
 endif
@@ -1207,9 +1231,15 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(TARGETPROCINC)
 endif
+ifeq ($(FULL_TARGET),x86_64-netbsd)
+override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(TARGETPROCINC)
+endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(TARGETPROCINC)
 endif
+ifeq ($(FULL_TARGET),x86_64-openbsd)
+override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(TARGETPROCINC)
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(TARGETPROCINC)
 endif
@@ -1396,9 +1426,15 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
 endif
+ifeq ($(FULL_TARGET),x86_64-netbsd)
+override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
+endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
 endif
+ifeq ($(FULL_TARGET),x86_64-openbsd)
+override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
 endif