浏览代码

+ darwin implementation of ipc unit by Werner Bochtler (mantis #10612)

git-svn-id: trunk@11549 -
Jonas Maebe 17 年之前
父节点
当前提交
bbaacc593a
共有 3 个文件被更改,包括 224 次插入127 次删除
  1. 59 59
      rtl/darwin/Makefile
  2. 3 3
      rtl/darwin/Makefile.fpc
  3. 162 65
      rtl/unix/ipc.pp

+ 59 - 59
rtl/darwin/Makefile

@@ -291,178 +291,178 @@ ifndef USELIBGGI
 USELIBGGI=NO
 USELIBGGI=NO
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil unix initc cmem matrix dynlibs $(CPU_UNITS) dos dl objects printer sockets sysutils typinfo fgl classes math varutils types charset ucomplex getopts heaptrc lineinfo lnfodwrf errors ipc terminfo termio video crt mouse keyboard console variants dateutils convutils stdconvs sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd fpintres fpextres clocale
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_IMPLICITUNITS+=exeinfo
 override TARGET_IMPLICITUNITS+=exeinfo
@@ -2510,7 +2510,7 @@ dl$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
 sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
 sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
 		   unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT) baseunix$(PPUEXT) initc$(PPUEXT)
 		   unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT) baseunix$(PPUEXT) initc$(PPUEXT)
 errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) strings$(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)
 terminfo$(PPUEXT) : terminfo.pp baseunix$(PPUEXT)
 cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
 cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
 sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
 sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)

+ 3 - 3
rtl/darwin/Makefile.fpc

@@ -5,7 +5,7 @@
 [package]
 [package]
 main=rtl
 main=rtl
 
 
-# disabled units: serial ipc
+# disabled units: serial
 [target]
 [target]
 loaders=
 loaders=
 units=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil \
 units=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil \
@@ -13,7 +13,7 @@ units=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixut
       dos dl objects printer sockets \
       dos dl objects printer sockets \
       sysutils typinfo fgl classes math varutils types \
       sysutils typinfo fgl classes math varutils types \
       charset ucomplex getopts heaptrc lineinfo lnfodwrf \
       charset ucomplex getopts heaptrc lineinfo lnfodwrf \
-      errors terminfo termio video crt mouse keyboard console \
+      errors ipc terminfo termio video crt mouse keyboard console \
       variants dateutils convutils stdconvs \
       variants dateutils convutils stdconvs \
       sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd \
       sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd \
       fpintres fpextres clocale
       fpintres fpextres clocale
@@ -280,7 +280,7 @@ sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
 
 
 errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) strings$(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)
 terminfo$(PPUEXT) : terminfo.pp baseunix$(PPUEXT)
 
 

+ 162 - 65
rtl/unix/ipc.pp

@@ -17,7 +17,11 @@ unit ipc;
 
 
 interface
 interface
 
 
-Uses BaseUnix,UnixType;
+Uses
+{$ifdef FPC_USE_LIBCX}
+  initc,
+{$endif}
+  BaseUnix,UnixType;
 
 
 { ----------------------------------------------------------------------
 { ----------------------------------------------------------------------
   General IPC stuff
   General IPC stuff
@@ -45,11 +49,17 @@ Const
   IPC_M      =  2 shl 12;
   IPC_M      =  2 shl 12;
 {$endif}
 {$endif}
 
 
+{$ifdef Darwin}
+  IPC_R      =  4 shl 6;
+  IPC_W      =  2 shl 6;
+  IPC_M      =  1 shl 12;
+{$endif}
+
   IPC_CREAT  =  1 shl 9;  { create if key is nonexistent }
   IPC_CREAT  =  1 shl 9;  { create if key is nonexistent }
   IPC_EXCL   =  2 shl 9;  { fail if key exists }
   IPC_EXCL   =  2 shl 9;  { fail if key exists }
   IPC_NOWAIT =  4 shl 9;  { return error on wait }
   IPC_NOWAIT =  4 shl 9;  { return error on wait }
 
 
-{$if defined(FreeBSD) or defined(Linux)}
+{$if defined(FreeBSD) or defined(Darwin) or defined(Linux)}
   IPC_PRIVATE : TKey = 0;
   IPC_PRIVATE : TKey = 0;
 {$endif}
 {$endif}
 
 
@@ -58,11 +68,13 @@ Const
   IPC_RMID = 0;     { remove resource }
   IPC_RMID = 0;     { remove resource }
   IPC_SET  = 1;     { set ipc_perm options }
   IPC_SET  = 1;     { set ipc_perm options }
   IPC_STAT = 2;     { get ipc_perm options }
   IPC_STAT = 2;     { get ipc_perm options }
+{$ifndef Darwin}
   IPC_INFO = 3;     { see ipcs }
   IPC_INFO = 3;     { see ipcs }
+{$endif}
 
 
 type
 type
   PIPC_Perm = ^TIPC_Perm;
   PIPC_Perm = ^TIPC_Perm;
-{$ifdef FreeBSD}
+{$if defined(FreeBSD) or defined(Darwin)}
   TIPC_Perm = record
   TIPC_Perm = record
         cuid  : cushort;  { creator user id }
         cuid  : cushort;  { creator user id }
         cgid  : cushort;  { creator group id }
         cgid  : cushort;  { creator group id }
@@ -100,8 +112,9 @@ type
 {$endif cpux86_64}
 {$endif cpux86_64}
 {$endif}
 {$endif}
 
 
+
 { Function to generate a IPC key. }
 { Function to generate a IPC key. }
-Function ftok (Path : pchar;  ID : cint) : TKey; {$ifdef FPC_USE_LIBC} cdecl; external name 'ftok'; {$endif}
+Function ftok (Path : pchar;  ID : cint) : TKey; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'ftok'; {$endif}
 
 
 { ----------------------------------------------------------------------
 { ----------------------------------------------------------------------
   Sys V Shared memory stuff
   Sys V Shared memory stuff
@@ -109,7 +122,36 @@ Function ftok (Path : pchar;  ID : cint) : TKey; {$ifdef FPC_USE_LIBC} cdecl; ex
 
 
 Type
 Type
   PShmid_DS = ^TShmid_ds;
   PShmid_DS = ^TShmid_ds;
-{$ifdef linux}
+
+{$ifdef FreeBSD}
+  TShmid_ds = record
+    shm_perm  : TIPC_Perm;
+    shm_segsz : cint;
+    shm_lpid  : pid_t;
+    shm_cpid  : pid_t;
+    shm_nattch : cshort;
+    shm_atime : time_t;
+    shm_dtime : time_t;
+    shm_ctime : time_t;
+    shm_internal : pointer;
+  end;
+{$endif}
+
+{$ifdef Darwin}
+  TShmid_ds = record
+    shm_perm  : TIPC_Perm;
+    shm_segsz : size_t;
+    shm_lpid  : pid_t;
+    shm_cpid  : pid_t;
+    shm_nattch : cushort; // typedef unsigned short shmatt_t
+    shm_atime : time_t;
+    shm_dtime : time_t;
+    shm_ctime : time_t;
+    shm_internal : pointer;
+  end;
+{$endif}
+
+{$ifdef Linux}
 {$ifdef cpux86_64}
 {$ifdef cpux86_64}
   TShmid_ds = record
   TShmid_ds = record
     shm_perm  : TIPC_Perm;
     shm_perm  : TIPC_Perm;
@@ -134,26 +176,14 @@ Type
     shm_lpid  : ipc_pid_t;
     shm_lpid  : ipc_pid_t;
     shm_nattch : word;
     shm_nattch : word;
     shm_npages : word;
     shm_npages : word;
-    shm_pages  : Pointer;
+    shm_pages  : pointer;
     attaches   : pointer;
     attaches   : pointer;
   end;
   end;
 {$endif cpux86_64}  
 {$endif cpux86_64}  
-{$else} // FreeBSD checked
-  TShmid_ds = record
-    shm_perm  : TIPC_Perm;
-    shm_segsz : cint;
-    shm_lpid  : pid_t;
-    shm_cpid  : pid_t;
-    shm_nattch : cshort;
-    shm_atime : time_t;
-    shm_dtime : time_t;
-    shm_ctime : time_t;
-    shm_internal : pointer;
-  end;
 {$endif}
 {$endif}
 
 
   const
   const
-{$ifdef linux}
+{$ifdef Linux}
      SHM_R      = 4 shl 6;
      SHM_R      = 4 shl 6;
      SHM_W      = 2 shl 6;
      SHM_W      = 2 shl 6;
 {$else}
 {$else}
@@ -166,6 +196,9 @@ Type
 {$ifdef Linux}
 {$ifdef Linux}
      SHM_REMAP  = 4 shl 12;
      SHM_REMAP  = 4 shl 12;
 {$endif}
 {$endif}
+{$ifdef Darwin}
+     SHMLBA     = 4096;
+{$endif}
 
 
      SHM_LOCK   = 11;
      SHM_LOCK   = 11;
      SHM_UNLOCK = 12;
      SHM_UNLOCK = 12;
@@ -177,8 +210,7 @@ Type
 
 
 type            // the shm*info kind is "kernel" only.
 type            // the shm*info kind is "kernel" only.
   PSHMinfo = ^TSHMinfo;
   PSHMinfo = ^TSHMinfo;
-  TSHMinfo = record             // comment under FreeBSD: do we really need
-                                // this?
+  TSHMinfo = record             // comment under FreeBSD/Darwin: do we really need this?
     shmmax : cint;
     shmmax : cint;
     shmmin : cint;
     shmmin : cint;
     shmmni : cint;
     shmmni : cint;
@@ -186,7 +218,7 @@ type            // the shm*info kind is "kernel" only.
     shmall : cint;
     shmall : cint;
   end;
   end;
 
 
-{$if defined(freebsd) or defined(linux)}
+{$if defined(FreeBSD) or defined(Linux)}
   PSHM_info = ^TSHM_info;
   PSHM_info = ^TSHM_info;
   TSHM_info = record
   TSHM_info = record
     used_ids : cint;
     used_ids : cint;
@@ -198,10 +230,10 @@ type            // the shm*info kind is "kernel" only.
   end;
   end;
 {$endif}
 {$endif}
 
 
-Function shmget(key: Tkey; size:size_t; flag:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'shmget'; {$endif}
-Function shmat (shmid:cint; shmaddr:pointer; shmflg:cint):pointer; {$ifdef FPC_USE_LIBC} cdecl; external name 'shmat'; {$endif}
-Function shmdt (shmaddr:pointer):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'shmdt'; {$endif}
-Function shmctl(shmid:cint; cmd:cint; buf: pshmid_ds): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'shmctl'; {$endif}
+Function shmget(key: Tkey; size:size_t; flag:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'shmget'; {$endif}
+Function shmat (shmid:cint; shmaddr:pointer; shmflg:cint):pointer; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'shmat'; {$endif}
+Function shmdt (shmaddr:pointer):cint; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'shmdt'; {$endif}
+Function shmctl(shmid:cint; cmd:cint; buf: pshmid_ds): cint; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'shmctl'; {$endif}
 
 
 { ----------------------------------------------------------------------
 { ----------------------------------------------------------------------
   Message queue stuff
   Message queue stuff
@@ -222,14 +254,26 @@ type
   msglen_t = culong;
   msglen_t = culong;
   msgqnum_t= culong;
   msgqnum_t= culong;
 
 
+{$ifdef Darwin}                      
+  user_msglen_t = culonglong;
+  user_msgqnum_t= culonglong;
+{$endif}
+
   PMSG = ^TMSG;
   PMSG = ^TMSG;
   TMSG = record
   TMSG = record
 {$ifndef FreeBSD}                       // opague in FreeBSD
 {$ifndef FreeBSD}                       // opague in FreeBSD
+   {$ifdef Darwin}                    
+    msg_next  : PMSG;
+    msg_type  : clong;
+    msg_ts    : cushort;
+    mac_label : pointer;
+   {$else}
     msg_next  : PMSG;
     msg_next  : PMSG;
     msg_type  : Longint;
     msg_type  : Longint;
     msg_spot  : PChar;
     msg_spot  : PChar;
     msg_stime : Longint;
     msg_stime : Longint;
     msg_ts    : Integer;
     msg_ts    : Integer;
+   {$endif}
 {$endif}
 {$endif}
   end;
   end;
 
 
@@ -251,24 +295,45 @@ type
     msg_lrpid  : ipc_pid_t;
     msg_lrpid  : ipc_pid_t;
   end;
   end;
 {$else}
 {$else}
-  PMSQid_ds = ^TMSQid_ds;
-  TMSQid_ds = record
-    msg_perm   : TIPC_perm;
-    msg_first  : PMsg;
-    msg_last   : PMsg;
-    msg_cbytes : msglen_t;
-    msg_qnum   : msgqnum_t;
-    msg_qbytes : msglen_t;
-    msg_lspid  : pid_t;
-    msg_lrpid  : pid_t;
-    msg_stime  : time_t;
-    msg_pad1   : clong;
-    msg_rtime  : time_t;
-    msg_pad2   : clong;
-    msg_ctime  : time_t;
-    msg_pad3   : clong;
-    msg_pad4   : array [0..3] of clong;
-  end;
+  {$ifdef Darwin}
+     PMSQid_ds = ^TMSQid_ds;
+     TMSQid_ds = record
+       msg_perm   : TIPC_perm;
+       msg_first  : cint32;
+       msg_last   : cint32;
+       msg_cbytes : msglen_t;
+       msg_qnum   : msgqnum_t;
+       msg_qbytes : msglen_t;
+       msg_lspid  : pid_t;
+       msg_lrpid  : pid_t;
+       msg_stime  : time_t;
+       msg_pad1   : cint32;
+       msg_rtime  : time_t;
+       msg_pad2   : cint32;
+       msg_ctime  : time_t;
+       msg_pad3   : cint32;
+       msg_pad4   : array [0..3] of cint32;
+     end;
+  {$else}
+     PMSQid_ds = ^TMSQid_ds;
+     TMSQid_ds = record
+       msg_perm   : TIPC_perm;
+       msg_first  : PMsg;
+       msg_last   : PMsg;
+       msg_cbytes : msglen_t;
+       msg_qnum   : msgqnum_t;
+       msg_qbytes : msglen_t;
+       msg_lspid  : pid_t;
+       msg_lrpid  : pid_t;
+       msg_stime  : time_t;
+       msg_pad1   : clong;
+       msg_rtime  : time_t;
+       msg_pad2   : clong;
+       msg_ctime  : time_t;
+       msg_pad3   : clong;
+       msg_pad4   : array [0..3] of clong;
+     end;
+  {$endif}
 {$endif}
 {$endif}
 
 
   PMSGbuf = ^TMSGbuf;
   PMSGbuf = ^TMSGbuf;
@@ -301,10 +366,10 @@ type
   end;
   end;
 {$endif}
 {$endif}
 
 
-Function msgget(key: TKey; msgflg:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'msgget'; {$endif}
-Function msgsnd(msqid:cint; msgp: PMSGBuf; msgsz: size_t; msgflg:cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'msgsnd'; {$endif}
-Function msgrcv(msqid:cint; msgp: PMSGBuf; msgsz: size_t; msgtyp:cint; msgflg:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'msgrcv'; {$endif}
-Function msgctl(msqid:cint; cmd: cint; buf: PMSQid_ds): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'msgctl'; {$endif}
+Function msgget(key: TKey; msgflg:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'msgget'; {$endif}
+Function msgsnd(msqid:cint; msgp: PMSGBuf; msgsz: size_t; msgflg:cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'msgsnd'; {$endif}
+Function msgrcv(msqid:cint; msgp: PMSGBuf; msgsz: size_t; msgtyp:cint; msgflg:cint): {$ifdef Darwin}ssize_t;{$else}cint;{$endif} {$ifdef FPC_USE_LIBC} cdecl; external clib name 'msgrcv'; {$endif}
+Function msgctl(msqid:cint; cmd: cint; buf: PMSQid_ds): cint; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'msgctl'; {$endif}
 
 
 { ----------------------------------------------------------------------
 { ----------------------------------------------------------------------
   Semaphores stuff
   Semaphores stuff
@@ -358,20 +423,43 @@ type
     sem_nsems : cushort;
     sem_nsems : cushort;
   end;
   end;
 {$else}
 {$else}
-
-     sem=record end; // opague
-
-  PSEMid_ds = ^TSEMid_ds;
-  TSEMid_ds = record
-          sem_perm : tipc_perm;
-          sem_base : ^sem;
-          sem_nsems : cushort;
-          sem_otime : time_t;
-          sem_pad1 : cint;
-          sem_ctime : time_t;
-          sem_pad2 : cint;
-          sem_pad3 : array[0..3] of cint;
-       end;
+   {$ifdef Darwin}
+     PSEM = ^TSEM;
+     TSEM = record
+       semval  : cushort;
+       sempid  : pid_t;
+       semncnt : cushort;
+       semzcnt : cushort;
+     end;
+     
+     PSEMid_ds = ^TSEMid_ds;
+     TSEMid_ds = record
+             sem_perm : tipc_perm;
+             sem_base : PSEM;
+             sem_nsems : cushort;
+             sem_otime : time_t;
+             sem_pad1 : cint32;
+             sem_ctime : time_t;
+             sem_pad2 : cint32;
+             sem_pad3 : array[0..3] of cint32;
+          end;
+
+   {$else}
+     PSEM = ^TSEM;
+     TSEM = record end; // opague
+
+     PSEMid_ds = ^TSEMid_ds;
+     TSEMid_ds = record
+             sem_perm : tipc_perm;
+             sem_base : PSEM;
+             sem_nsems : cushort;
+             sem_otime : time_t;
+             sem_pad1 : cint;
+             sem_ctime : time_t;
+             sem_pad2 : cint;
+             sem_pad3 : array[0..3] of cint;
+          end;
+    {$endif}
 {$endif}
 {$endif}
 
 
   PSEMbuf = ^TSEMbuf;
   PSEMbuf = ^TSEMbuf;
@@ -417,13 +505,15 @@ Type
 {$endif}
 {$endif}
    end;
    end;
 
 
-Function semget(key:Tkey; nsems:cint; semflg:cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'semget'; {$endif}
-Function semop(semid:cint; sops: psembuf; nsops: cuint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'semop'; {$endif}
-Function semctl(semid:cint; semnum:cint; cmd:cint; var arg: tsemun): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'semctl'; {$endif}
+Function semget(key:Tkey; nsems:cint; semflg:cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'semget'; {$endif}
+Function semop(semid:cint; sops: psembuf; nsops: cuint): cint; {$ifdef FPC_USE_LIBC} cdecl; external clib name 'semop'; {$endif}
+Function semctl(semid:cint; semnum:cint; cmd:cint; var arg: tsemun): cint;
 
 
 implementation
 implementation
 
 
+{$ifndef FPC_USE_LIBC}
 uses Syscall;
 uses Syscall;
+{$endif ndef FPC_USE_LIBC}
 
 
 {$ifndef FPC_USE_LIBC}
 {$ifndef FPC_USE_LIBC}
  {$ifdef Linux}
  {$ifdef Linux}
@@ -436,6 +526,13 @@ uses Syscall;
  {$ifdef BSD}
  {$ifdef BSD}
    {$i ipcbsd.inc}
    {$i ipcbsd.inc}
  {$endif}
  {$endif}
+{$else ndef FPC_USE_LIBC}
+Function real_semctl(semid:cint; semnum:cint; cmd:cint): cint; {$ifdef FPC_USE_LIBC} cdecl; varargs; external clib name 'semctl'; {$endif}
+
+Function semctl(semid:cint; semnum:cint; cmd:cint; var arg: tsemun): cint;
+  begin
+    semctl := real_semctl(semid,semnum,cmd,pointer(@arg));
+  end;
 {$endif}
 {$endif}