Browse Source

* Fixed 19136 and exposed unix pipe implementation in a separate unit

git-svn-id: trunk@17719 -
michael 14 years ago
parent
commit
214cb0b301

+ 1 - 0
.gitattributes

@@ -2198,6 +2198,7 @@ packages/fcl-process/src/dummy/simpleipc.inc svneol=native#text/plain
 packages/fcl-process/src/os2/pipes.inc svneol=native#text/plain
 packages/fcl-process/src/os2/pipes.inc svneol=native#text/plain
 packages/fcl-process/src/os2/simpleipc.inc svneol=native#text/plain
 packages/fcl-process/src/os2/simpleipc.inc svneol=native#text/plain
 packages/fcl-process/src/pipes.pp svneol=native#text/plain
 packages/fcl-process/src/pipes.pp svneol=native#text/plain
+packages/fcl-process/src/pipesipc.pp svneol=native#text/plain
 packages/fcl-process/src/process.pp svneol=native#text/plain
 packages/fcl-process/src/process.pp svneol=native#text/plain
 packages/fcl-process/src/process.txt svneol=native#text/plain
 packages/fcl-process/src/process.txt svneol=native#text/plain
 packages/fcl-process/src/simpleipc.pp svneol=native#text/plain
 packages/fcl-process/src/simpleipc.pp svneol=native#text/plain

+ 104 - 39
packages/fcl-process/Makefile

@@ -1,8 +1,8 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/10/20]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/02]
 #
 #
 default: all
 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 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-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
 BSDs = freebsd netbsd openbsd darwin
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx haiku
 UNIXs = linux $(BSDs) solaris qnx haiku
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -107,24 +107,36 @@ FPC=$(PP)
 endif
 endif
 endif
 endif
 ifndef FPC
 ifndef FPC
+DETERMINE_NATIVE_COMPILER=1
+else
+ifdef CROSSCOMPILE
+ifndef FPCFPMAKE
+DETERMINE_NATIVE_COMPILER=1
+endif
+endif
+endif
+ifdef DETERMINE_NATIVE_COMPILER
 FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
 FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
 ifneq ($(FPCPROG),)
 ifneq ($(FPCPROG),)
 FPCPROG:=$(firstword $(FPCPROG))
 FPCPROG:=$(firstword $(FPCPROG))
 ifneq ($(CPU_TARGET),)
 ifneq ($(CPU_TARGET),)
-FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+FPCNATIVE:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
 else
 else
-FPC:=$(shell $(FPCPROG) -PB)
+FPCNATIVE:=$(shell $(FPCPROG) -PB)
 endif
 endif
-ifneq ($(findstring Error,$(FPC)),)
-override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+ifneq ($(findstring Error,$(FPCNATIVE)),)
+override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
 else
 else
-ifeq ($(strip $(wildcard $(FPC))),)
-FPC:=$(firstword $(FPCPROG))
+ifeq ($(strip $(wildcard $(FPCNATIVE))),)
+FPCNATIVE:=$(firstword $(FPCPROG))
 endif
 endif
 endif
 endif
 else
 else
-override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+override FPCNATIVE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
 endif
 endif
+ifndef FPC
+FPC=$(FPCNATIVE)
 endif
 endif
 override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
 override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
 override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
@@ -264,10 +276,27 @@ ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 endif
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifndef FPCFPMAKE
+ifdef CROSSCOMPILE
+ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
+FPCFPMAKE:=$(FPCNATIVE)
+else
+FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
+FPMAKE_SKIP_CONFIG=-n
+export FPCFPMAKE
+export FPMAKE_SKIP_CONFIG
+endif
+else
+FPCFPMAKE=$(FPC)
+FPMAKE_SKIP_CONFIG=-n
+export FPCFPMAKE
+export FPMAKE_SKIP_CONFIG
+endif
+endif
 override PACKAGE_NAME=fcl-process
 override PACKAGE_NAME=fcl-process
 override PACKAGE_VERSION=2.5.1
 override PACKAGE_VERSION=2.5.1
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
@@ -279,34 +308,34 @@ ifeq ($(FULL_TARGET),i386-os2)
 override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
 override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
 override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
 override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
@@ -330,16 +359,16 @@ ifeq ($(FULL_TARGET),i386-nativent)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
 ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
@@ -348,7 +377,7 @@ ifeq ($(FULL_TARGET),m68k-atari)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
@@ -357,10 +386,10 @@ ifeq ($(FULL_TARGET),m68k-embedded)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
@@ -369,7 +398,7 @@ ifeq ($(FULL_TARGET),powerpc-macos)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
@@ -377,29 +406,32 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_UNITS+=pipes process
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
 override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
 override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
@@ -408,13 +440,13 @@ ifeq ($(FULL_TARGET),x86_64-embedded)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
 override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
 override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
@@ -432,10 +464,10 @@ ifeq ($(FULL_TARGET),arm-symbian)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
@@ -444,13 +476,13 @@ ifeq ($(FULL_TARGET),avr-embedded)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 ifeq ($(FULL_TARGET),armeb-embedded)
 override TARGET_UNITS+=pipes process
 override TARGET_UNITS+=pipes process
 endif
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf
+override TARGET_UNITS+=pipes process  simpleipc dbugmsg dbugintf pipesipc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
@@ -563,6 +595,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_RSTS+=process simpleipc
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_RSTS+=process simpleipc
 override TARGET_RSTS+=process simpleipc
 endif
 endif
@@ -750,6 +785,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override COMPILER_OPTIONS+=-S2h
 override COMPILER_OPTIONS+=-S2h
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_OPTIONS+=-S2h
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_OPTIONS+=-S2h
 override COMPILER_OPTIONS+=-S2h
 endif
 endif
@@ -936,6 +974,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src  src/unix src/dummy
 override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src  src/unix src/dummy
 endif
 endif
@@ -1122,6 +1163,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
 override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
 endif
 endif
@@ -1543,6 +1587,11 @@ ifeq ($(OS_TARGET),NativeNT)
 SHAREDLIBEXT=.dll
 SHAREDLIBEXT=.dll
 SHORTSUFFIX=nativent
 SHORTSUFFIX=nativent
 endif
 endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
 else
 else
 ifeq ($(OS_TARGET),go32v1)
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
 PPUEXT=.pp1
@@ -2079,6 +2128,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -2162,6 +2214,15 @@ UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
 else
 else
 UNITDIR_RTL=$(PACKAGEDIR_RTL)
 UNITDIR_RTL=$(PACKAGEDIR_RTL)
 endif
 endif
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)
+endif
+endif
 ifdef CHECKDEPEND
 ifdef CHECKDEPEND
 $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
 $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
 	$(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
 	$(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
@@ -2179,6 +2240,9 @@ endif
 ifdef UNITDIR_RTL
 ifdef UNITDIR_RTL
 override COMPILER_UNITDIR+=$(UNITDIR_RTL)
 override COMPILER_UNITDIR+=$(UNITDIR_RTL)
 endif
 endif
+ifdef UNITDIR_FPMAKE_RTL
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL)
+endif
 endif
 endif
 ifndef NOCPUDEF
 ifndef NOCPUDEF
 override FPCOPTDEF=$(ARCH)
 override FPCOPTDEF=$(ARCH)
@@ -2668,6 +2732,7 @@ fpc_baseinfo:
 	@$(ECHO)  Full Target.. $(FULL_TARGET)
 	@$(ECHO)  Full Target.. $(FULL_TARGET)
 	@$(ECHO)  SourceSuffix. $(SOURCESUFFIX)
 	@$(ECHO)  SourceSuffix. $(SOURCESUFFIX)
 	@$(ECHO)  TargetSuffix. $(TARGETSUFFIX)
 	@$(ECHO)  TargetSuffix. $(TARGETSUFFIX)
+	@$(ECHO)  FPC fpmake... $(FPCFPMAKE)
 	@$(ECHO)
 	@$(ECHO)
 	@$(ECHO)  == Directory info ==
 	@$(ECHO)  == Directory info ==
 	@$(ECHO)
 	@$(ECHO)

+ 11 - 11
packages/fcl-process/Makefile.fpc

@@ -7,20 +7,20 @@ name=fcl-process
 version=2.5.1
 version=2.5.1
 
 
 [target]
 [target]
-units=pipes process
-units_beos=simpleipc dbugmsg dbugintf
-units_haiku=simpleipc dbugmsg dbugintf
-units_freebsd=simpleipc dbugmsg dbugintf
-units_darwin=simpleipc dbugmsg dbugintf
-units_iphonesim=simpleipc dbugmsg dbugintf
-units_solaris=simpleipc dbugmsg dbugintf
-units_netbsd=simpleipc dbugmsg dbugintf
-units_openbsd=simpleipc dbugmsg dbugintf
-units_linux=simpleipc dbugmsg dbugintf
+units=pipes process 
+units_beos=simpleipc dbugmsg dbugintf pipesipc
+units_haiku=simpleipc dbugmsg dbugintf pipesipc 
+units_freebsd=simpleipc dbugmsg dbugintf pipesipc
+units_darwin=simpleipc dbugmsg dbugintf pipesipc
+units_iphonesim=simpleipc dbugmsg dbugintf pipesipc
+units_solaris=simpleipc dbugmsg dbugintf pipesipc
+units_netbsd=simpleipc dbugmsg dbugintf pipesipc
+units_openbsd=simpleipc dbugmsg dbugintf pipesipc
+units_linux=simpleipc dbugmsg dbugintf pipesipc
 units_win32=simpleipc dbugmsg dbugintf
 units_win32=simpleipc dbugmsg dbugintf
 units_win64=simpleipc dbugmsg dbugintf
 units_win64=simpleipc dbugmsg dbugintf
 units_wince=simpleipc dbugmsg dbugintf
 units_wince=simpleipc dbugmsg dbugintf
-units_qnx=simpleipc dbugmsg dbugintf
+units_qnx=simpleipc dbugmsg dbugintf pipesipc
 units_os2=simpleipc dbugmsg dbugintf
 units_os2=simpleipc dbugmsg dbugintf
 units_emx=simpleipc dbugmsg dbugintf
 units_emx=simpleipc dbugmsg dbugintf
 rsts=process simpleipc
 rsts=process simpleipc

+ 18 - 0
packages/fcl-process/src/pipesipc.pp

@@ -0,0 +1,18 @@
+{
+    This file is part of the Free Component library.
+    Copyright (c) 2005 by Michael Van Canneyt, member of
+    the Free Pascal development team
+
+    Unix pipe implementation of one-way IPC between 2 processes
+
+    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.
+
+ **********************************************************************}
+
+{$define ipcunit}
+{$i simpleipc.inc}

+ 29 - 0
packages/fcl-process/src/simpleipc.pp

@@ -48,6 +48,9 @@ Type
     FOwner  : TSimpleIPCServer;
     FOwner  : TSimpleIPCServer;
   Protected  
   Protected  
     Function  GetInstanceID : String; virtual; abstract;
     Function  GetInstanceID : String; virtual; abstract;
+    Procedure DoError(Msg : String; Args : Array of const);
+    Procedure SetMsgType(AMsgType: TMessageType); 
+    Function MsgData : TStream;
   Public
   Public
     Constructor Create(AOwner : TSimpleIPCServer); virtual;
     Constructor Create(AOwner : TSimpleIPCServer); virtual;
     Property Owner : TSimpleIPCServer read FOwner;
     Property Owner : TSimpleIPCServer read FOwner;
@@ -117,6 +120,8 @@ Type
   TIPCClientComm = Class(TObject)
   TIPCClientComm = Class(TObject)
   private
   private
     FOwner: TSimpleIPCClient;
     FOwner: TSimpleIPCClient;
+  protected
+   Procedure DoError(Msg : String; Args : Array of const);
   Public
   Public
     Constructor Create(AOwner : TSimpleIPCClient); virtual;
     Constructor Create(AOwner : TSimpleIPCClient); virtual;
     Property  Owner : TSimpleIPCClient read FOwner;
     Property  Owner : TSimpleIPCClient read FOwner;
@@ -185,6 +190,24 @@ begin
   FOwner:=AOWner;
   FOwner:=AOWner;
 end;
 end;
 
 
+Procedure TIPCServerComm.DoError(Msg : String; Args : Array of const);
+
+begin
+  FOwner.DoError(Msg,Args);
+end;  
+
+Function TIPCServerComm.MsgData : TStream;
+
+begin
+  Result:=FOwner.FMsgData;
+end;
+
+Procedure TIPCServerComm.SetMsgType(AMsgType: TMessageType); 
+
+begin
+  Fowner.FMsgType:=AMsgType;
+end;
+
 { ---------------------------------------------------------------------
 { ---------------------------------------------------------------------
     TIPCClientComm
     TIPCClientComm
   ---------------------------------------------------------------------}
   ---------------------------------------------------------------------}
@@ -194,6 +217,12 @@ begin
   FOwner:=AOwner;
   FOwner:=AOwner;
 end;
 end;
 
 
+Procedure TIPCClientComm.DoError(Msg : String; Args : Array of const);
+
+begin
+  FOwner.DoError(Msg,Args);
+end;  
+
 { ---------------------------------------------------------------------
 { ---------------------------------------------------------------------
     TSimpleIPC
     TSimpleIPC
   ---------------------------------------------------------------------}
   ---------------------------------------------------------------------}

+ 32 - 9
packages/fcl-process/src/unix/simpleipc.inc

@@ -14,8 +14,21 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
+{$ifdef ipcunit}
+unit pipesipc;
+
+interface
+
+uses sysutils, classes, simpleipc, baseunix;
+
+{$else}
+
 uses baseunix;
 uses baseunix;
 
 
+{$endif}
+
+
+
 ResourceString
 ResourceString
   SErrFailedToCreatePipe = 'Failed to create named pipe: %s';
   SErrFailedToCreatePipe = 'Failed to create named pipe: %s';
   SErrFailedToRemovePipe = 'Failed to remove named pipe: %s';
   SErrFailedToRemovePipe = 'Failed to remove named pipe: %s';
@@ -39,6 +52,11 @@ Type
     Property Stream : TFileStream Read FStream;
     Property Stream : TFileStream Read FStream;
   end;
   end;
 
 
+{$ifdef ipcunit}
+implementation
+{$endif}
+
+
 
 
 constructor TPipeClientComm.Create(AOWner: TSimpleIPCClient);
 constructor TPipeClientComm.Create(AOWner: TSimpleIPCClient);
 
 
@@ -58,7 +76,7 @@ end;
 procedure TPipeClientComm.Connect;
 procedure TPipeClientComm.Connect;
 begin
 begin
   If Not ServerRunning then
   If Not ServerRunning then
-    Owner.DoError(SErrServerNotActive,[Owner.ServerID]);
+    DoError(SErrServerNotActive,[Owner.ServerID]);
   // Use the sharedenynone line to allow more then one client 
   // Use the sharedenynone line to allow more then one client 
   // communicating with one server at the same time
   // communicating with one server at the same time
   // see also mantis 15219
   // see also mantis 15219
@@ -130,7 +148,7 @@ procedure TPipeServerComm.StartServer;
 begin
 begin
   If not FileExists(FFileName) then
   If not FileExists(FFileName) then
     If (fpmkFifo(FFileName,438)<>0) then
     If (fpmkFifo(FFileName,438)<>0) then
-      Owner.DoError(SErrFailedToCreatePipe,[FFileName]);
+      DoError(SErrFailedToCreatePipe,[FFileName]);
   FStream:=TFileStream.Create(FFileName,fmOpenReadWrite+fmShareDenyNone);
   FStream:=TFileStream.Create(FFileName,fmOpenReadWrite+fmShareDenyNone);
 end;
 end;
 
 
@@ -138,7 +156,7 @@ procedure TPipeServerComm.StopServer;
 begin
 begin
   FreeAndNil(FStream);
   FreeAndNil(FStream);
   if Not DeleteFile(FFileName) then
   if Not DeleteFile(FFileName) then
-    Owner.DoError(SErrFailedtoRemovePipe,[FFileName]);
+    DoError(SErrFailedtoRemovePipe,[FFileName]);
 end;
 end;
 
 
 function TPipeServerComm.PeekMessage(TimeOut: Integer): Boolean;
 function TPipeServerComm.PeekMessage(TimeOut: Integer): Boolean;
@@ -157,18 +175,19 @@ procedure TPipeServerComm.ReadMessage;
 Var
 Var
   L,P,Count : Integer;
   L,P,Count : Integer;
   Hdr : TMsgHeader;
   Hdr : TMsgHeader;
-
+  M : TStream;
 begin
 begin
   FStream.ReadBuffer(Hdr,SizeOf(Hdr));
   FStream.ReadBuffer(Hdr,SizeOf(Hdr));
-  Owner.FMsgType:=Hdr.MsgType;
+  SetMsgType(Hdr.MsgType);
   Count:=Hdr.MsgLen;
   Count:=Hdr.MsgLen;
+  M:=MsgData;
   if count > 0 then
   if count > 0 then
     begin
     begin
-    Owner.FMsgData.Seek(0,soFrombeginning);
-    Owner.FMsgData.CopyFrom(FStream,Count);
+    M.Seek(0,soFrombeginning);
+    M.CopyFrom(FStream,Count);
     end
     end
   else
   else
-    Owner.FMsgData.Size := 0;
+    M.Size := 0;
 end;
 end;
 
 
 function TPipeServerComm.GetInstanceID: String;
 function TPipeServerComm.GetInstanceID: String;
@@ -179,7 +198,7 @@ end;
 { ---------------------------------------------------------------------
 { ---------------------------------------------------------------------
     Set TSimpleIPCClient / TSimpleIPCServer defaults.
     Set TSimpleIPCClient / TSimpleIPCServer defaults.
   ---------------------------------------------------------------------}
   ---------------------------------------------------------------------}
-
+{$ifndef ipcunit}
 Function TSimpleIPCServer.CommClass : TIPCServerCommClass;
 Function TSimpleIPCServer.CommClass : TIPCServerCommClass;
 
 
 begin
 begin
@@ -196,3 +215,7 @@ begin
   else
   else
     Result:=TPipeClientComm;
     Result:=TPipeClientComm;
 end;
 end;
+
+{$else ipcunit}
+end.
+{$endif}