DEADSOFTWARE

added arm support via cpfront
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Tue, 18 Jun 2019 19:24:21 +0000 (22:24 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Tue, 18 Jun 2019 19:24:21 +0000 (22:24 +0300)
21 files changed:
make-all.sh
make-bootstrap.sh
make.sh
src/cpfront/linux/arm/Posix/Mod/Cdirent.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Cdlfcn.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Cerrno.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Cfcntl.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Ciconv.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Clibgen.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Clocale.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Csetjmp.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Csignal.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Cstdio.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Cstdlib.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Csys_mman.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Csys_stat.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Csys_types.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Ctime.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Ctypes.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Cunistd.cp [new file with mode: 0644]
src/cpfront/linux/arm/Posix/Mod/Cwctype.cp [new file with mode: 0644]

index eef57f20346373649e0464d36ec9ec1c69fe8f36..696571af89f7c3560845482592976bd84d2dac7e 100755 (executable)
@@ -39,11 +39,15 @@ usage() {
 #  echo "    -s os             Host operaion system"
   echo "Processors:"
   echo "    486               Intel 486+"
+  echo "    arm               ARM 32-bit"
   echo "Targets:"
   echo "    native            Native"
   echo "    cpfront           Generic C"
   echo "Operation systems:"
   echo "    linux             GNU/Linux"
+  echo "Environment variables:"
+  echo "    CC                C compiler binary"
+  echo "    CFLAGS            C compiler options"
   exit 2
 }
 
index 3c7f446a84f1303afaf0a7430e83a0e32ce10ecc..db2a7eb519b17da99beca90dd13feffe06931407 100755 (executable)
@@ -31,6 +31,7 @@ make_bootstrap() {
 rm -rf "$_this/bootstrap"
 mkdir -p "$_this/bootstrap"
 make_bootstrap 486 cpfront linux
+make_bootstrap arm cpfront linux
 
 ###^^^^^^^^^^^^^^^^^^^^^^###
 ### Package dist sources ###
diff --git a/make.sh b/make.sh
index d466d2773aa85ecb1d7c2f6331ab7cbb6c455f21..9aa6e5247ff581ff08502098c5b2a29e5603532a 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -33,11 +33,15 @@ usage() {
   echo "    -x                Do not link"
   echo "Processors:"
   echo "    486               Intel 486+"
+  echo "    arm               ARM 32-bit"
   echo "Targets:"
   echo "    native            Native"
   echo "    cpfront           Generic C"
   echo "Operation systems:"
   echo "    linux             GNU/Linux"
+  echo "Environment variables:"
+  echo "    CC                C compiler binary"
+  echo "    CFLAGS            C compiler options"
   exit 2
 }
 
@@ -100,13 +104,18 @@ cpfront_link() {
     do
       _list="$_list ${_out}/CodeC/${_module}.c"
     done
-    ### !!! ADD $CC $CFLAGS $LDFLAGS ###
-    gcc -m32 -g -O0 -lm -ldl -o "$_out/$_main" \
-      -Wno-int-conversion \
-      -Wno-int-to-pointer-cast \
-      -Wno-incompatible-pointer-types \
-      -Wno-implicit-function-declaration \
-      -I "$_this/C" "$_this/C/SYSTEM.c" $_list
+    local _cc_cflags=
+    case "$CC" in
+      *gcc)  _cc_cflags="-Wno-int-conversion -Wno-int-to-pointer-cast -Wno-incompatible-pointer-types -Wno-implicit-function-declaration" ;;
+      *)  _cc_cflags="" ;;
+    esac
+    local _cpu_cflags=
+    case "$_cpu" in
+      486)  _cpu_cflags="-m32" ;;
+      arm)  _cpu_cflags="" ;;
+      *)  error "cpfront_link(): unsupported cpu $_cpu" ;;
+    esac
+    "$CC" $_cc_cflags $_cpu_cflags -lm -ldl $CFLAGS -o "${_main}" -I "$_this/C" "$_this/C/SYSTEM.c" $_list
   fi
 }
 
@@ -263,12 +272,17 @@ _cpu="$1"
 _target="$2"
 _system="$3"
 
+if [ -z "$CC" ]; then
+  export CC=cc
+fi
+
 ###^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^###
 ### Check for supported cpu/target/os ###
 ###___________________________________###
 
 case "$_cpu" in
   386|486|586|686)  _cpu=486 ;;
+  arm|armv6|armv7)  _cpu=arm ;;
   "")  error "cpu not specified" ;;
   *)  error "unsupported cpu $_cpu" ;;
 esac
@@ -336,7 +350,9 @@ fi
 ### Copy sources for changed system ###
 ###_________________________________###
 
-$_docompile && rm -rf -- "$_out"
+if $_docompile; then
+  rm -rf -- "$_out"
+fi
 
 mkdir -p -- "$_out"
 _out="$(readlink -f "$_out")"
diff --git a/src/cpfront/linux/arm/Posix/Mod/Cdirent.cp b/src/cpfront/linux/arm/Posix/Mod/Cdirent.cp
new file mode 100644 (file)
index 0000000..24b300d
--- /dev/null
@@ -0,0 +1,64 @@
+MODULE PosixCdirent ['dirent.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  TYPE
+    PDIR* = POINTER TO DIR;
+    DIR ['DIR'] = LIMITED RECORD [untagged] END;
+
+  TYPE
+    Pstruct_dirent* = POINTER TO struct_dirent;
+    struct_dirent* ['struct dirent'] = RECORD [noalign] (* 268 *)
+      d_ino*: ino_t; (* 0+4 *)
+      d_name*: ARRAY [untagged] 256 OF SHORTCHAR; (* 11+256 *)
+    END;
+
+  TYPE
+    ino_t* = PosixCsys_types.ino_t;
+
+  PROCEDURE [ccall] alphasort* (IN a, b: Pstruct_dirent): int;
+  PROCEDURE [ccall] closedir* (dirp: PDIR): int;
+  PROCEDURE [ccall] dirfd* (dirp: PDIR): int;
+  PROCEDURE [ccall] fdopendir* (fd: int): PDIR;
+  PROCEDURE [ccall] opendir* (IN name: ARRAY [untagged] OF SHORTCHAR): PDIR;
+  PROCEDURE [ccall] readdir* (dirp: PDIR): Pstruct_dirent;
+  PROCEDURE [ccall] readdir_r* (dirp: PDIR; entry: Pstruct_dirent; VAR result: Pstruct_dirent): int;
+  PROCEDURE [ccall] rewinddir* (dirp: PDIR);
+  PROCEDURE [ccall] scandir* (IN dirp: ARRAY [untagged] OF SHORTCHAR; filter: PROCEDURE [ccall] (IN d: struct_dirent): int; compar: PROCEDURE [ccall] (IN a, b: Pstruct_dirent): int): int;
+  PROCEDURE [ccall] seekdir* (dirp: PDIR; loc: long);
+  PROCEDURE [ccall] telldir* (dirp: PDIR): long;
+
+END PosixCdirent.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Cdlfcn.cp b/src/cpfront/linux/arm/Posix/Mod/Cdlfcn.cp
new file mode 100644 (file)
index 0000000..702d722
--- /dev/null
@@ -0,0 +1,49 @@
+MODULE PosixCdlfcn ['dlfcn.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  CONST
+    RTLD_LAZY* = 1;
+    RTLD_NOW* = 2;
+    RTLD_GLOBAL* = 256;
+    RTLD_LOCAL* = 0;
+
+  PROCEDURE [ccall] dlclose* (handle: PosixCtypes.Pvoid): int;
+  PROCEDURE [ccall] dlerror* (): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] dlopen* (IN [nil] filename: ARRAY [untagged] OF SHORTCHAR; flags: int): PosixCtypes.Pvoid;
+  PROCEDURE [ccall] dlsym* (handle: PosixCtypes.Pvoid; IN symbol: ARRAY [untagged] OF SHORTCHAR): PosixCtypes.Pvoid;
+
+END PosixCdlfcn.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Cerrno.cp b/src/cpfront/linux/arm/Posix/Mod/Cerrno.cp
new file mode 100644 (file)
index 0000000..4391cfb
--- /dev/null
@@ -0,0 +1,123 @@
+MODULE PosixCerrno ['errno.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  CONST
+    E2BIG* = 7;
+    EACCES* = 13;
+    EADDRINUSE* = 98;
+    EADDRNOTAVAIL* = 99;
+    EAFNOSUPPORT* = 97;
+    EAGAIN* = 11;
+    EALREADY* = 114;
+    EBADF* = 9;
+    EBADMSG* = 74;
+    EBUSY* = 16;
+    ECANCELED* = 125;
+    ECHILD* = 10;
+    ECONNABORTED* = 103;
+    ECONNREFUSED* = 111;
+    ECONNRESET* = 104;
+    EDEADLK* = 35;
+    EDESTADDRREQ* = 89;
+    EDOM* = 33;
+    EDQUOT* = 122;
+    EEXIST* = 17;
+    EFAULT* = 14;
+    EFBIG* = 27;
+    EHOSTUNREACH* = 113;
+    EIDRM* = 43;
+    EILSEQ* = 84;
+    EINPROGRESS* = 115;
+    EINTR* = 4;
+    EINVAL* = 22;
+    EIO* = 5;
+    EISCONN* = 106;
+    EISDIR* = 21;
+    ELOOP* = 40;
+    EMFILE* = 24;
+    EMLINK* = 31;
+    EMSGSIZE* = 90;
+    EMULTIHOP* = 72;
+    ENAMETOOLONG* = 36;
+    ENETDOWN* = 100;
+    ENETRESET* = 102;
+    ENETUNREACH* = 101;
+    ENFILE* = 23;
+    ENOBUFS* = 105;
+    ENODATA* = 61;
+    ENODEV* = 19;
+    ENOENT* = 2;
+    ENOEXEC* = 8;
+    ENOLCK* = 37;
+    ENOLINK* = 67;
+    ENOMEM* = 12;
+    ENOMSG* = 42;
+    ENOPROTOOPT* = 92;
+    ENOSPC* = 28;
+    ENOSR* = 63;
+    ENOSTR* = 60;
+    ENOSYS* = 38;
+    ENOTCONN* = 107;
+    ENOTDIR* = 20;
+    ENOTEMPTY* = 39;
+    ENOTRECOVERABLE* = 131;
+    ENOTSOCK* = 88;
+    ENOTSUP* = 95;
+    ENOTTY* = 25;
+    ENXIO* = 6;
+    EOPNOTSUPP* = 95;
+    EOVERFLOW* = 75;
+    EOWNERDEAD* = 130;
+    EPERM* = 1;
+    EPIPE* = 32;
+    EPROTO* = 71;
+    EPROTONOSUPPORT* = 93;
+    EPROTOTYPE* = 91;
+    ERANGE* = 34;
+    EROFS* = 30;
+    ESPIPE* = 29;
+    ESRCH* = 3;
+    ESTALE* = 116;
+    ETIME* = 62;
+    ETIMEDOUT* = 110;
+    ETXTBSY* = 26;
+    EWOULDBLOCK* = 11;
+    EXDEV* = 18;
+
+  PROCEDURE [ccall] __errno_location* (): POINTER TO ARRAY [untagged] 1 OF int;
+
+END PosixCerrno.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Cfcntl.cp b/src/cpfront/linux/arm/Posix/Mod/Cfcntl.cp
new file mode 100644 (file)
index 0000000..2bc6608
--- /dev/null
@@ -0,0 +1,119 @@
+MODULE PosixCfcntl ['fcntl.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  CONST
+    F_DUPFD* = 0;
+    F_DUPFD_CLOEXEC* = 1030;
+    F_GETFD* = 1;
+    F_SETFD* = 2;
+    F_GETFL* = 3;
+    F_SETFL* = 4;
+    F_GETLK* = 5;
+    F_SETLK* = 6;
+    F_SETLKW* = 7;
+    F_GETOWN* = 9;
+    F_SETOWN* = 8;
+
+  CONST
+    FD_CLOEXEC* = 1;
+
+  CONST
+    F_RDLCK* = 0;
+    F_UNLCK* = 2;
+    F_WRLCK* = 1;
+
+  CONST
+    SEEK_SET* = 0;
+    SEEK_CUR* = 1;
+    SEEK_END* = 2;
+
+  CONST
+    O_CLOEXEC* = 524288;
+    O_CREAT* = 64;
+    O_DIRECTORY* = 16384;
+    O_EXCL* = 128;
+    O_NOCTTY* = 256;
+    O_NOFOLLOW* = 32768;
+    O_TRUNC* = 512;
+    O_APPEND* = 1024;
+    O_DSYNC* = 4096;
+    O_NONBLOCK* = 2048;
+    O_RSYNC* = 1052672;
+    O_SYNC* = 1052672;
+    O_ACCMODE* = 3;
+    O_RDONLY* = 0;
+    O_RDWR* = 2;
+    O_WRONLY* = 1;
+
+  CONST
+    AT_FDCWD* = -100;
+    AT_EACCESS* = 512;
+    AT_SYMLINK_NOFOLLOW* = 256;
+    AT_SYMLINK_FOLLOW* = 1024;
+    AT_REMOVEDIR* = 512;
+
+  CONST
+    POSIX_FADV_DONTNEED* = 4;
+    POSIX_FADV_NOREUSE* = 5;
+    POSIX_FADV_NORMAL* = 0;
+    POSIX_FADV_RANDOM* = 1;
+    POSIX_FADV_SEQUENTIAL* = 2;
+    POSIX_FADV_WILLNEED* = 3;
+
+  TYPE
+    Pstruct_flock* = POINTER TO struct_flock;
+    struct_flock* ['struct flock'] = RECORD [noalign] (* 16 *)
+      l_type*: short; (* 0+2 *)
+      l_whence*: short; (* 2+2 *)
+      l_start*: off_t; (* 4+4 *)
+      l_len*: off_t; (* 8+4 *)
+      l_pid*: pid_t; (* 12+4 *)
+    END;
+
+  TYPE
+    mode_t* = PosixCsys_types.mode_t;
+    off_t* = PosixCsys_types.off_t;
+    pid_t* = PosixCsys_types.pid_t;
+
+  PROCEDURE [ccall] creat* (IN pathname: ARRAY [untagged] OF SHORTCHAR; mode: mode_t): int;
+  PROCEDURE [ccall] fcntl* (fildes, cmd, arg: int): int;
+  PROCEDURE [ccall] open* (IN pathname: ARRAY [untagged] OF SHORTCHAR; flags: int; mode: mode_t): int;
+  PROCEDURE [ccall] openat* (fddir: int; IN pathname: ARRAY [untagged] OF SHORTCHAR; flags: int; mode: mode_t): int;
+  PROCEDURE [ccall] posix_fadvise* (fd: int; offset, len: off_t; advice: int): int;
+  PROCEDURE [ccall] posix_fallocate* (fd: int; offset, len: off_t): int;
+
+END PosixCfcntl.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Ciconv.cp b/src/cpfront/linux/arm/Posix/Mod/Ciconv.cp
new file mode 100644 (file)
index 0000000..00dc3b2
--- /dev/null
@@ -0,0 +1,48 @@
+MODULE PosixCiconv ['iconv.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  TYPE
+    iconv_t* = INTEGER;
+
+  TYPE
+    size_t* = PosixCsys_types.size_t;
+
+  PROCEDURE [ccall] iconv* (cd: iconv_t; VAR [nil] inbuf: PosixCtypes.Pvoid; VAR inbytesleft: size_t; VAR [nil] outbuf: PosixCtypes.Pvoid; VAR outbytesleft: size_t): size_t;
+  PROCEDURE [ccall] iconv_open* (IN tocode, fromcode: ARRAY [untagged] OF SHORTCHAR): iconv_t;
+  PROCEDURE [ccall] iconv_close* (cd: iconv_t): int;
+
+END PosixCiconv.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Clibgen.cp b/src/cpfront/linux/arm/Posix/Mod/Clibgen.cp
new file mode 100644 (file)
index 0000000..27897fe
--- /dev/null
@@ -0,0 +1,41 @@
+MODULE PosixClibgen ['libgen.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  PROCEDURE [ccall] basename* (path: POINTER TO ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] dirname* (path: POINTER TO ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+
+END PosixClibgen.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Clocale.cp b/src/cpfront/linux/arm/Posix/Mod/Clocale.cp
new file mode 100644 (file)
index 0000000..21bc958
--- /dev/null
@@ -0,0 +1,75 @@
+MODULE PosixClocale ['locale.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  TYPE
+    Pstruct_lconv* = POINTER TO struct_lconv;
+    struct_lconv ['struct lconv'] = LIMITED RECORD [untagged] END;
+
+  CONST
+    LC_ALL* = 6;
+    LC_COLLATE* = 3;
+    LC_CTYPE* = 0;
+    LC_MESSAGES* = 5;
+    LC_MONETARY* = 4;
+    LC_NUMERIC* = 1;
+    LC_TIME* = 2;
+
+  CONST
+    LC_COLLATE_MASK* = 8;
+    LC_CTYPE_MASK* = 1;
+    LC_MESSAGES_MASK* = 32;
+    LC_MONETARY_MASK* = 16;
+    LC_NUMERIC_MASK* = 2;
+    LC_TIME_MASK* = 4;
+
+  CONST
+    LC_ALL_MASK* = 8127;
+
+  CONST
+    LC_GLOBAL_LOCALE* = -1;
+
+  TYPE
+    locale_t* = INTEGER;
+
+  PROCEDURE [ccall] duplocale* (locobj: locale_t): locale_t;
+  PROCEDURE [ccall] freelocale* (locobj: locale_t);
+  PROCEDURE [ccall] localeconv* (): Pstruct_lconv;
+  PROCEDURE [ccall] newlocale* (category_mask: int; IN locale: ARRAY [untagged] OF SHORTCHAR; base: locale_t): locale_t;
+  PROCEDURE [ccall] setlocale* (category: int; IN [nil] locale: ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] uselocale* (newloc: locale_t): locale_t;
+
+END PosixClocale.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Csetjmp.cp b/src/cpfront/linux/arm/Posix/Mod/Csetjmp.cp
new file mode 100644 (file)
index 0000000..269c6f2
--- /dev/null
@@ -0,0 +1,49 @@
+MODULE PosixCsetjmp ['setjmp.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  TYPE
+    jmp_buf* = ARRAY [untagged] 392 OF BYTE;
+    sigjmp_buf* = ARRAY [untagged] 392 OF BYTE;
+
+  PROCEDURE [ccall] _longjmp* (IN env: jmp_buf; val: int);
+  PROCEDURE [ccall] longjmp* (IN env: jmp_buf; val: int);
+  PROCEDURE [ccall] siglongjmp* (IN env: sigjmp_buf; val: int);
+  PROCEDURE [ccall] _setjmp* (VAR env: jmp_buf): int;
+  PROCEDURE [ccall] setjmp* (VAR env: jmp_buf): int;
+  PROCEDURE [ccall] sigsetjmp* (VAR env: sigjmp_buf; savesigs: int): int;
+
+END PosixCsetjmp.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Csignal.cp b/src/cpfront/linux/arm/Posix/Mod/Csignal.cp
new file mode 100644 (file)
index 0000000..df1f934
--- /dev/null
@@ -0,0 +1,297 @@
+MODULE PosixCsignal ['signal.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCsys_types, PosixCtime;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  CONST
+    SIG_DFL* = 0;
+    SIG_ERR* = -1;
+    SIG_IGN* = 1;
+
+  TYPE
+    pthread_t* = PosixCsys_types.pthread_t;
+    pthread_attr_t* = PosixCsys_types.pthread_attr_t;
+    size_t* = PosixCsys_types.size_t;
+    uid_t* = PosixCsys_types.uid_t;
+    pid_t* = PosixCsys_types.pid_t;
+
+  TYPE
+    struct_timespec* = PosixCtime.struct_timespec;
+
+  TYPE
+    sig_atomic_t* = INTEGER;
+    sigset_t* = RECORD [noalign] _: ARRAY [untagged] 128 OF BYTE END;
+
+  TYPE
+    Pstruct_sigevent* = POINTER TO struct_sigevent;
+    struct_sigevent* ['struct sigevent'] = RECORD [noalign] (* 64 *)
+      sigev_value*: union_sigval; (* 0+4 *)
+      sigev_signo*: int; (* 4+4 *)
+      sigev_notify*: int; (* 8+4 *)
+      sigev_notify_function*: PROCEDURE [ccall] (x: union_sigval); (* 12+4 *)
+    END;
+
+  CONST
+    SIGEV_NONE* = 1;
+    SIGEV_SIGNAL* = 0;
+    SIGEV_THREAD* = 2;
+
+  TYPE
+    Punion_sigval* = POINTER TO union_sigval;
+    union_sigval* ['union sigval'] = RECORD [union] (* 4 *)
+      sival_int*: int; (* 0+4 *)
+      sival_ptr*: PosixCtypes.Pvoid; (* 0+4 *)
+    END;
+
+  CONST
+    SIGRTMIN* = 34;
+    SIGRTMAX* = 64;
+    RTSIG_MAX* = 32;
+
+  CONST
+    SIGABRT* = 6;
+    SIGALRM* = 14;
+    SIGBUS* = 7;
+    SIGCHLD* = 17;
+    SIGCONT* = 18;
+    SIGFPE* = 8;
+    SIGHUP* = 1;
+    SIGILL* = 4;
+    SIGINT* = 2;
+    SIGKILL* = 9;
+    SIGPIPE* = 13;
+    SIGQUIT* = 3;
+    SIGSEGV* = 11;
+    SIGSTOP* = 19;
+    SIGTERM* = 15;
+    SIGTSTP* = 20;
+    SIGTTIN* = 21;
+    SIGTTOU* = 22;
+    SIGUSR1* = 10;
+    SIGUSR2* = 12;
+    SIGPOLL* = 29;
+    SIGPROF* = 27;
+    SIGSYS* = 31;
+    SIGTRAP* = 5;
+    SIGURG* = 23;
+    SIGVTALRM* = 26;
+    SIGXCPU* = 24;
+    SIGXFSZ* = 25;
+
+  TYPE
+    P_struct_sigaction* = POINTER TO _struct_sigaction;
+    _struct_sigaction* ['struct sigaction'] = RECORD [noalign] (* 140 *)
+      sa_handler*: PROCEDURE [ccall] (sig: int); (* 0+4 *)
+      sa_sigaction*: PROCEDURE [ccall] (sig: int; IN siginfo: siginfo_t; context: PosixCtypes.Pvoid); (* 0+4 *)
+      sa_mask*: sigset_t; (* 4+128 *)
+      sa_flags*: int; (* 132+4 *)
+    END;
+
+  TYPE
+    Pstruct_sigaction* = POINTER TO struct_sigaction;
+    struct_sigaction* ['struct sigaction'] = RECORD [noalign] (* 140 *)
+      handler*: RECORD [union] (* 4 *)
+        sa_handler*: PROCEDURE [ccall] (sig: int); (* 0+4 *)
+        sa_sigaction*: PROCEDURE [ccall] (sig: int; IN siginfo: siginfo_t; context: PosixCtypes.Pvoid); (* 0+4 *)
+      END; (* 0+4 *)
+      sa_mask*: sigset_t; (* 4+128 *)
+      sa_flags*: int; (* 132+4 *)
+    END;
+
+  CONST
+    SIG_BLOCK* = 0;
+    SIG_UNBLOCK* = 1;
+    SIG_SETMASK* = 2;
+
+  CONST
+    SA_NOCLDSTOP* = 1;
+    SA_ONSTACK* = 134217728;
+    SA_RESETHAND* = -2147483648;
+    SA_RESTART* = 268435456;
+    SA_SIGINFO* = 4;
+    SA_NOCLDWAIT* = 2;
+    SA_NODEFER* = 1073741824;
+    SS_ONSTACK* = 1;
+    SS_DISABLE* = 2;
+    MINSIGSTKSZ* = 2048;
+    SIGSTKSZ* = 8192;
+
+  TYPE
+    mcontext_t* = RECORD [noalign] _: ARRAY [untagged] 84 OF BYTE END;
+
+  TYPE
+    Pucontext_t* = POINTER TO ucontext_t;
+    ucontext_t* ['ucontext_t'] = RECORD [noalign] (* 744 *)
+      uc_link*: Pucontext_t; (* 4+4 *)
+      uc_stack*: stack_t; (* 8+12 *)
+      uc_mcontext*: mcontext_t; (* 20+84 *)
+      uc_sigmask*: sigset_t; (* 104+128 *)
+    END;
+
+  TYPE
+    Pstack_t* = POINTER TO stack_t;
+    stack_t* ['stack_t'] = RECORD [noalign] (* 12 *)
+      ss_sp*: PosixCtypes.Pvoid; (* 0+4 *)
+      ss_flags*: int; (* 4+4 *)
+      ss_size*: size_t; (* 8+4 *)
+    END;
+
+  TYPE
+    P_siginfo_t* = POINTER TO _siginfo_t;
+    _siginfo_t* ['siginfo_t'] = RECORD [noalign] (* 128 *)
+      si_signo*: int; (* 0+4 *)
+      si_errno*: int; (* 4+4 *)
+      si_code*: int; (* 8+4 *)
+      si_pid*: pid_t; (* 12+4 *)
+      si_addr*: PosixCtypes.Pvoid; (* 12+4 *)
+      si_band*: long; (* 12+4 *)
+      si_uid*: uid_t; (* 16+4 *)
+      si_status*: int; (* 20+4 *)
+      si_value*: union_sigval; (* 20+4 *)
+    END;
+
+  TYPE
+    Psiginfo_t* = POINTER TO siginfo_t;
+    siginfo_t* ['siginfo_t'] = RECORD [noalign] (* 128 *)
+      si_signo*: int; (* 0+4 *)
+      si_errno*: int; (* 4+4 *)
+      si_code*: int; (* 8+4 *)
+      info*: RECORD [union] (* 12 *)
+        sigill*: RECORD [noalign] (* 4 *)
+          si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
+        END; (* 0+4 *)
+        sigfpe*: RECORD [noalign] (* 4 *)
+          si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
+        END; (* 0+4 *)
+        sigsegv*: RECORD [noalign] (* 4 *)
+          si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
+        END; (* 0+4 *)
+        sigbus*: RECORD [noalign] (* 4 *)
+          si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
+        END; (* 0+4 *)
+        sigchld*: RECORD [noalign] (* 12 *)
+          si_pid*: pid_t; (* 0+4 *)
+          si_uid*: uid_t; (* 4+4 *)
+          si_status*: int; (* 8+4 *)
+        END; (* 0+12 *)
+        sigpoll*: RECORD [noalign] (* 4 *)
+          si_band*: long; (* 0+4 *)
+        END; (* 0+4 *)
+        other*: RECORD [noalign] (* 4 *)
+          si_value*: union_sigval; (* 0+4 *)
+        END; (* 8+4 *)
+      END; (* 12+12 *)
+    END;
+
+  CONST
+    ILL_ILLOPC* = 1;
+    ILL_ILLOPN* = 2;
+    ILL_ILLADR* = 3;
+    ILL_ILLTRP* = 4;
+    ILL_PRVOPC* = 5;
+    ILL_PRVREG* = 6;
+    ILL_COPROC* = 7;
+    ILL_BADSTK* = 8;
+
+  CONST
+    FPE_INTDIV* = 1;
+    FPE_INTOVF* = 2;
+    FPE_FLTDIV* = 3;
+    FPE_FLTOVF* = 4;
+    FPE_FLTUND* = 5;
+    FPE_FLTRES* = 6;
+    FPE_FLTINV* = 7;
+    FPE_FLTSUB* = 8;
+
+  CONST
+    SEGV_MAPERR* = 1;
+    SEGV_ACCERR* = 2;
+
+  CONST
+    BUS_ADRALN* = 1;
+    BUS_ADRERR* = 2;
+    BUS_OBJERR* = 3;
+
+  CONST
+    CLD_EXITED* = 1;
+    CLD_KILLED* = 2;
+    CLD_DUMPED* = 3;
+    CLD_TRAPPED* = 4;
+    CLD_STOPPED* = 5;
+    CLD_CONTINUED* = 6;
+
+  CONST
+    POLL_IN* = 1;
+    POLL_OUT* = 2;
+    POLL_MSG* = 3;
+    POLL_ERR* = 4;
+    POLL_PRI* = 5;
+    POLL_HUP* = 6;
+
+  CONST
+    SI_USER* = 0;
+    SI_QUEUE* = -1;
+    SI_TIMER* = -2;
+    SI_ASYNCIO* = -4;
+    SI_MESGQ* = -3;
+
+  PROCEDURE [ccall] kill* (pid: pid_t; sig: int): int;
+  PROCEDURE [ccall] killpg* (pgrp, sig: int): int;
+  PROCEDURE [ccall] psiginfo* (IN pinfo: siginfo_t; IN [nil] s: ARRAY [untagged] OF SHORTCHAR);
+  PROCEDURE [ccall] psignal* (sig: int; IN [nil] s: ARRAY [untagged] OF SHORTCHAR);
+  PROCEDURE [ccall] pthread_kill* (thread: pthread_t; sig: int): int;
+  PROCEDURE [ccall] pthread_sigmask* (how: int; IN [nil] set: sigset_t; VAR [nil] oldset: sigset_t): int;
+  PROCEDURE [ccall] raise* (sig: int): int;
+  PROCEDURE [ccall] sigaction* (sig: int; IN [nil] act: struct_sigaction; VAR [nil] oact: struct_sigaction): int;
+  PROCEDURE [ccall] sigaddset* (VAR set: sigset_t; signum: int): int;
+  PROCEDURE [ccall] sigaltstack* (IN [nil] ss: stack_t; VAR [nil] oss: stack_t): int;
+  PROCEDURE [ccall] sigdelset* (VAR set: sigset_t; signum: int): int;
+  PROCEDURE [ccall] sigemptyset* (VAR set: sigset_t): int;
+  PROCEDURE [ccall] sigfillset* (VAR set: sigset_t): int;
+  PROCEDURE [ccall] sighold* (sig: int): int;
+  PROCEDURE [ccall] sigignore* (sig: int): int;
+  PROCEDURE [ccall] siginterrupt* (sig, flag: int): int;
+  PROCEDURE [ccall] sigismember* (IN set: sigset_t; signum: int): int;
+  PROCEDURE [ccall] sigpause* (sig: int): int;
+  PROCEDURE [ccall] sigpending* (VAR set: sigset_t): int;
+  PROCEDURE [ccall] sigprocmask* (how: int; IN [nil] set: sigset_t; VAR [nil] oset: sigset_t): int;
+  PROCEDURE [ccall] sigqueue* (pid: pid_t; sig: int; IN value: union_sigval): int;
+  PROCEDURE [ccall] sigrelse* (sig: int): int;
+  PROCEDURE [ccall] sigsuspend* (IN sigmask: sigset_t): int;
+  PROCEDURE [ccall] sigtimedwait* (IN set: sigset_t; VAR [nil] info: siginfo_t; IN timeout: struct_timespec): int;
+  PROCEDURE [ccall] sigwait* (IN set: sigset_t; VAR sig: int): int;
+  PROCEDURE [ccall] sigwaitinfo* (IN set: sigset_t; VAR [nil] info: siginfo_t): int;
+
+END PosixCsignal.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Cstdio.cp b/src/cpfront/linux/arm/Posix/Mod/Cstdio.cp
new file mode 100644 (file)
index 0000000..53d43d9
--- /dev/null
@@ -0,0 +1,91 @@
+MODULE PosixCstdio ['stdio.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  TYPE
+    PFILE* = POINTER TO FILE;
+    FILE ['FILE'] = LIMITED RECORD [untagged] END;
+
+  TYPE
+    fpos_t* = RECORD [noalign] _: ARRAY [untagged] 12 OF BYTE END;
+
+  TYPE
+    off_t* = PosixCsys_types.off_t;
+    ssize_t* = PosixCsys_types.ssize_t;
+
+  TYPE
+    size_t* = INTEGER;
+
+  TYPE
+    va_list* = INTEGER;
+
+  CONST
+    BUFSIZ* = 8192;
+    L_ctermid* = 9;
+    L_tmpnam* = 20;
+
+  CONST
+    _IOFBF* = 0;
+    _IOLBF* = 1;
+    _IONBF* = 2;
+
+  CONST
+    SEEK_CUR* = 1;
+    SEEK_END* = 2;
+    SEEK_SET* = 0;
+
+  CONST
+    FILENAME_MAX* = 4096;
+    FOPEN_MAX* = 16;
+    TMP_MAX* = 238328;
+
+  CONST
+    EOF* = -1;
+
+  PROCEDURE [ccall] fclose* (stream: PFILE): int;
+  PROCEDURE [ccall] ferror* (stream: PFILE): int;
+  PROCEDURE [ccall] fflush* (stream: PFILE): int;
+  PROCEDURE [ccall] fopen* (IN pathname, mode: ARRAY [untagged] OF SHORTCHAR): PFILE;
+  PROCEDURE [ccall] fread* (ptr: PosixCtypes.Pvoid; size, n: size_t; stream: PFILE): size_t;
+  PROCEDURE [ccall] fseek* (stream: PFILE; offset: long; whence: int): int;
+  PROCEDURE [ccall] ftell* (stream: PFILE): long;
+  PROCEDURE [ccall] fwrite* (ptr: PosixCtypes.Pvoid; size, n: size_t; stream: PFILE): size_t;
+  PROCEDURE [ccall] feof* (stream: PFILE): int;
+  PROCEDURE [ccall] remove* (IN pathname: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] rename* (IN old, new: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] tmpfile* (): PFILE;
+
+END PosixCstdio.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Cstdlib.cp b/src/cpfront/linux/arm/Posix/Mod/Cstdlib.cp
new file mode 100644 (file)
index 0000000..9ef98f3
--- /dev/null
@@ -0,0 +1,66 @@
+MODULE PosixCstdlib ['stdlib.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  CONST
+    EXIT_FAILURE* = 1;
+    EXIT_SUCCESS* = 0;
+    RAND_MAX* = 2147483647;
+
+  CONST
+    MB_CUR_MAX* = 1;
+
+  TYPE
+    div_t* = RECORD [noalign] _: ARRAY [untagged] 8 OF BYTE END;
+    ldiv_t* = RECORD [noalign] _: ARRAY [untagged] 8 OF BYTE END;
+    lldiv_t* = RECORD [noalign] _: ARRAY [untagged] 16 OF BYTE END;
+
+  TYPE
+    size_t* = INTEGER;
+    wchar_t* = INTEGER;
+
+  PROCEDURE [ccall] _Exit* (status: int);
+  PROCEDURE [ccall] abort* ;
+  PROCEDURE [ccall] atexit* (function: PROCEDURE [ccall]): int;
+  PROCEDURE [ccall] exit* (status: int);
+  PROCEDURE [ccall] free* (ptr: PosixCtypes.Pvoid);
+  PROCEDURE [ccall] getenv* (IN name: ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] malloc* (size: size_t): PosixCtypes.Pvoid;
+  PROCEDURE [ccall] system* (IN command: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] mkstemp* (VAR template: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] realpath* (IN path: ARRAY [untagged] OF SHORTCHAR; VAR [nil] resolved_path: ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+
+END PosixCstdlib.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Csys_mman.cp b/src/cpfront/linux/arm/Posix/Mod/Csys_mman.cp
new file mode 100644 (file)
index 0000000..6ff9357
--- /dev/null
@@ -0,0 +1,86 @@
+MODULE PosixCsys_mman ['sys/mman.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  CONST
+    PROT_EXEC* = 4;
+    PROT_NONE* = 0;
+    PROT_READ* = 1;
+    PROT_WRITE* = 2;
+
+  CONST
+    MAP_FIXED* = 16;
+    MAP_PRIVATE* = 2;
+    MAP_SHARED* = 1;
+
+  CONST
+    MS_ASYNC* = 1;
+    MS_INVALIDATE* = 2;
+    MS_SYNC* = 4;
+
+  CONST
+    MCL_CURRENT* = 1;
+    MCL_FUTURE* = 2;
+
+  CONST
+    MAP_FAILED* = -1;
+
+  CONST
+    POSIX_MADV_DONTNEED* = 4;
+    POSIX_MADV_NORMAL* = 0;
+    POSIX_MADV_RANDOM* = 1;
+    POSIX_MADV_SEQUENTIAL* = 2;
+    POSIX_MADV_WILLNEED* = 3;
+
+  TYPE
+    mode_t* = PosixCsys_types.mode_t;
+    off_t* = PosixCsys_types.off_t;
+    size_t* = PosixCsys_types.size_t;
+
+  PROCEDURE [ccall] mlock* (addr: PosixCtypes.Pvoid; len: size_t): int;
+  PROCEDURE [ccall] mlockall* (flags: int): int;
+  PROCEDURE [ccall] mmap* (addr: PosixCtypes.Pvoid; len: size_t; prot, flags, fildes: int; off: off_t): PosixCtypes.Pvoid;
+  PROCEDURE [ccall] mprotect* (addr: PosixCtypes.Pvoid; len: size_t; prot: int): int;
+  PROCEDURE [ccall] msync* (addr: PosixCtypes.Pvoid; len: size_t; flags: int): int;
+  PROCEDURE [ccall] munlock* (addr: PosixCtypes.Pvoid; len: size_t): int;
+  PROCEDURE [ccall] munlockall* (): int;
+  PROCEDURE [ccall] munmap* (addr: PosixCtypes.Pvoid; len: size_t): int;
+  PROCEDURE [ccall] posix_madvise* (addr: PosixCtypes.Pvoid; len: size_t; advice: int): int;
+  PROCEDURE [ccall] posix_mem_offset* (addr: PosixCtypes.Pvoid; len: size_t; VAR off: off_t; VAR contng_len: size_t; VAR fildes: int): int;
+  PROCEDURE [ccall] shm_open* (IN name: ARRAY [untagged] OF SHORTCHAR; oflag, mode: int): int;
+  PROCEDURE [ccall] shm_unlink* (IN name: ARRAY [untagged] OF SHORTCHAR): int;
+
+END PosixCsys_mman.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Csys_stat.cp b/src/cpfront/linux/arm/Posix/Mod/Csys_stat.cp
new file mode 100644 (file)
index 0000000..1d7c38f
--- /dev/null
@@ -0,0 +1,119 @@
+MODULE PosixCsys_stat ['sys/stat.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCtime, PosixCsys_types;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  CONST
+    S_IFMT* = 61440;
+    S_IFBLK* = 24576;
+    S_IFCHR* = 8192;
+    S_IFIFO* = 4096;
+    S_IFREG* = 32768;
+    S_IFDIR* = 16384;
+    S_IFLNK* = 40960;
+    S_IFSOCK* = 49152;
+
+  CONST
+    S_IRWXU* = 448;
+    S_IRUSR* = 256;
+    S_IWUSR* = 128;
+    S_IXUSR* = 64;
+    S_IRWXG* = 56;
+    S_IRGRP* = 32;
+    S_IWGRP* = 16;
+    S_IXGRP* = 8;
+    S_IRWXO* = 7;
+    S_IROTH* = 4;
+    S_IWOTH* = 2;
+    S_IXOTH* = 1;
+    S_ISUID* = 2048;
+    S_ISGID* = 1024;
+    S_ISVTX* = 512;
+
+  CONST
+    UTIME_NOW* = 1073741823;
+    UTIME_OMIT* = 1073741822;
+
+  TYPE
+    blkcnt_t* = PosixCsys_types.blkcnt_t;
+    blksize_t* = PosixCsys_types.blksize_t;
+    dev_t* = PosixCsys_types.dev_t;
+    ino_t* = PosixCsys_types.ino_t;
+    mode_t* = PosixCsys_types.mode_t;
+    nlink_t* = PosixCsys_types.nlink_t;
+    uid_t* = PosixCsys_types.uid_t;
+    gid_t* = PosixCsys_types.gid_t;
+    off_t* = PosixCsys_types.off_t;
+    time_t* = PosixCsys_types.time_t;
+
+  TYPE
+    struct_timespec* = PosixCtime.struct_timespec;
+
+  TYPE
+    Pstruct_stat* = POINTER TO struct_stat;
+    struct_stat* ['struct stat'] = RECORD [noalign] (* 88 *)
+      st_dev*: dev_t; (* 0+8 *)
+      st_ino*: ino_t; (* 12+4 *)
+      st_mode*: mode_t; (* 16+4 *)
+      st_nlink*: nlink_t; (* 20+4 *)
+      st_uid*: uid_t; (* 24+4 *)
+      st_gid*: gid_t; (* 28+4 *)
+      st_rdev*: dev_t; (* 32+8 *)
+      st_size*: off_t; (* 44+4 *)
+      st_blksize*: blksize_t; (* 48+4 *)
+      st_blocks*: blkcnt_t; (* 52+4 *)
+      st_atim*: struct_timespec; (* 56+8 *)
+      st_mtim*: struct_timespec; (* 64+8 *)
+      st_ctim*: struct_timespec; (* 72+8 *)
+    END;
+
+  PROCEDURE [ccall] chmod* (IN path: ARRAY [untagged] OF SHORTCHAR; mode: mode_t): int;
+  PROCEDURE [ccall] fchmod* (fd: int; IN path: ARRAY [untagged] OF SHORTCHAR; mode: mode_t): int;
+  PROCEDURE [ccall] fchmodat* (fd: int; IN path: ARRAY [untagged] OF SHORTCHAR; mode: mode_t; flag: int): int;
+  PROCEDURE [ccall] fstat* (fd: int; VAR buf: struct_stat): int;
+  PROCEDURE [ccall] fstatat* (fd: int; IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: struct_stat; flag: int): int;
+  PROCEDURE [ccall] futimens* (fd: int; IN times: ARRAY [untagged] 2 OF struct_timespec): int;
+  PROCEDURE [ccall] lstat* (IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: struct_stat): int;
+  PROCEDURE [ccall] mkdir* (IN path: ARRAY [untagged] OF SHORTCHAR; mode: mode_t): int;
+  PROCEDURE [ccall] mkdirat* (fd: int; IN path: ARRAY [untagged] OF SHORTCHAR; mode: mode_t): int;
+  PROCEDURE [ccall] mkfifo* (IN pathname: ARRAY [untagged] OF SHORTCHAR; mode: mode_t): int;
+  PROCEDURE [ccall] mkfifoat* (dirfd: int; IN pathname: ARRAY [untagged] OF SHORTCHAR; mode: mode_t): int;
+  PROCEDURE [ccall] mknod* (IN path: ARRAY [untagged] OF SHORTCHAR; mode: mode_t; dev: dev_t): int;
+  PROCEDURE [ccall] mknodat* (df: int; IN path: ARRAY [untagged] OF SHORTCHAR; mode: mode_t; dev: dev_t): int;
+  PROCEDURE [ccall] stat* (IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: struct_stat): int;
+  PROCEDURE [ccall] umask* (mode: mode_t): mode_t;
+  PROCEDURE [ccall] utimensat* (dirfd: int; IN pathname: ARRAY [untagged] OF SHORTCHAR; IN times: ARRAY [untagged] 2 OF struct_timespec; flags: int): int;
+
+END PosixCsys_stat.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Csys_types.cp b/src/cpfront/linux/arm/Posix/Mod/Csys_types.cp
new file mode 100644 (file)
index 0000000..25f6e93
--- /dev/null
@@ -0,0 +1,75 @@
+MODULE PosixCsys_types ['sys/types.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  TYPE
+    blkcnt_t* = INTEGER;
+    blksize_t* = INTEGER;
+    clock_t* = INTEGER;
+    clockid_t* = INTEGER;
+    dev_t* = LONGINT;
+    fsblkcnt_t* = INTEGER;
+    fsfilcnt_t* = INTEGER;
+    gid_t* = INTEGER;
+    id_t* = INTEGER;
+    ino_t* = INTEGER;
+    key_t* = INTEGER;
+    mode_t* = INTEGER;
+    nlink_t* = INTEGER;
+    off_t* = INTEGER;
+    pid_t* = INTEGER;
+    pthread_attr_t* = RECORD [noalign] _: ARRAY [untagged] 36 OF BYTE END;
+    pthread_barrier_t* = RECORD [noalign] _: ARRAY [untagged] 20 OF BYTE END;
+    pthread_barrierattr_t* = INTEGER;
+    pthread_cond_t* = RECORD [noalign] _: ARRAY [untagged] 48 OF BYTE END;
+    pthread_condattr_t* = INTEGER;
+    pthread_key_t* = INTEGER;
+    pthread_mutex_t* = RECORD [noalign] _: ARRAY [untagged] 24 OF BYTE END;
+    pthread_mutexattr_t* = INTEGER;
+    pthread_once_t* = INTEGER;
+    pthread_rwlock_t* = RECORD [noalign] _: ARRAY [untagged] 32 OF BYTE END;
+    pthread_rwlockattr_t* = RECORD [noalign] _: ARRAY [untagged] 8 OF BYTE END;
+    pthread_spinlock_t* = INTEGER;
+    pthread_t* = INTEGER;
+    size_t* = INTEGER;
+    ssize_t* = INTEGER;
+    suseconds_t* = INTEGER;
+    time_t* = INTEGER;
+    timer_t* = INTEGER;
+    uid_t* = INTEGER;
+
+
+END PosixCsys_types.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Ctime.cp b/src/cpfront/linux/arm/Posix/Mod/Ctime.cp
new file mode 100644 (file)
index 0000000..e9ece92
--- /dev/null
@@ -0,0 +1,117 @@
+MODULE PosixCtime ['time.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCsys_types, PosixClocale;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  TYPE
+    clock_t* = PosixCsys_types.clock_t;
+    size_t* = PosixCsys_types.size_t;
+    time_t* = PosixCsys_types.time_t;
+    clockid_t* = PosixCsys_types.clockid_t;
+    timer_t* = PosixCsys_types.timer_t;
+    pid_t* = PosixCsys_types.pid_t;
+
+  TYPE
+    locale_t* = PosixClocale.locale_t;
+
+  TYPE
+    Pstruct_tm* = POINTER TO struct_tm;
+    struct_tm* ['struct tm'] = RECORD [noalign] (* 44 *)
+      tm_sec*: int; (* 0+4 *)
+      tm_min*: int; (* 4+4 *)
+      tm_hour*: int; (* 8+4 *)
+      tm_mday*: int; (* 12+4 *)
+      tm_mon*: int; (* 16+4 *)
+      tm_year*: int; (* 20+4 *)
+      tm_wday*: int; (* 24+4 *)
+      tm_yday*: int; (* 28+4 *)
+      tm_isdst*: int; (* 32+4 *)
+    END;
+
+  TYPE
+    Pstruct_timespec* = POINTER TO struct_timespec;
+    struct_timespec* ['struct timespec'] = RECORD [noalign] (* 8 *)
+      tv_sec*: time_t; (* 0+4 *)
+      tv_nsec*: long; (* 4+4 *)
+    END;
+
+  TYPE
+    Pstruct_itimerspec* = POINTER TO struct_itimerspec;
+    struct_itimerspec* ['struct itimerspec'] = RECORD [noalign] (* 16 *)
+      it_interval*: struct_timespec; (* 0+8 *)
+      it_value*: struct_timespec; (* 8+8 *)
+    END;
+
+  CONST
+    CLOCKS_PER_SEC* = 1000000;
+
+  CONST
+    CLOCK_MONOTONIC* = 1;
+    CLOCK_PROCESS_CPUTIME_ID* = 2;
+    CLOCK_REALTIME* = 0;
+    CLOCK_THREAD_CPUTIME_ID* = 3;
+
+  CONST
+    TIMER_ABSTIME* = 1;
+
+  PROCEDURE [ccall] asctime* (IN tm: struct_tm): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] asctime_r* (IN tm: struct_tm; buf: POINTER TO ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] clock* (): clock_t;
+  PROCEDURE [ccall] clock_getcpuclockid* (pid: pid_t; VAR clock_id: clockid_t): int;
+  PROCEDURE [ccall] clock_getres* (clk_id: clockid_t; VAR res: struct_timespec): int;
+  PROCEDURE [ccall] clock_gettime* (clk_id: clockid_t; VAR res: struct_timespec): int;
+  PROCEDURE [ccall] clock_nanosleep* (clock_id: clockid_t; falgs: int; IN [nil] rqtp: struct_timespec; VAR [nil] rmtp: struct_timespec): int;
+  PROCEDURE [ccall] clock_settime* (clk_id: clockid_t; IN res: struct_timespec): int;
+  PROCEDURE [ccall] ctime* (VAR timep: time_t): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] ctime_r* (VAR timep: time_t; buf: POINTER TO ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] difftime* (time0, time1: time_t): double;
+  PROCEDURE [ccall] getdate* (IN string: ARRAY [untagged] OF SHORTCHAR): Pstruct_tm;
+  PROCEDURE [ccall] gmtime* (VAR timep: time_t): Pstruct_tm;
+  PROCEDURE [ccall] gmtime_r* (VAR timep: time_t; VAR result: struct_tm): Pstruct_tm;
+  PROCEDURE [ccall] localtime* (VAR timep: time_t): Pstruct_tm;
+  PROCEDURE [ccall] localtime_r* (VAR timep: time_t; VAR result: struct_tm): Pstruct_tm;
+  PROCEDURE [ccall] mktime* (VAR tm: struct_tm): time_t;
+  PROCEDURE [ccall] nanosleep* (IN [nil] rqtp: struct_timespec; VAR [nil] rmtp: struct_timespec): int;
+  PROCEDURE [ccall] strftime* (VAR s: ARRAY [untagged] OF SHORTCHAR; max: size_t; IN format: ARRAY [untagged] OF SHORTCHAR; IN tm: struct_tm): size_t;
+  PROCEDURE [ccall] strftime_l* (VAR s: ARRAY [untagged] OF SHORTCHAR; max: size_t; IN format: ARRAY [untagged] OF SHORTCHAR; IN tm: struct_tm; locale: locale_t): size_t;
+  PROCEDURE [ccall] strptime* (IN s, format: ARRAY [untagged] OF SHORTCHAR; VAR tm: struct_tm): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] time* (VAR [nil] tloc: time_t): time_t;
+  PROCEDURE [ccall] timer_delete* (timerid: timer_t): int;
+  PROCEDURE [ccall] timer_getoverrun* (timerid: timer_t): int;
+  PROCEDURE [ccall] timer_gettime* (timerid: timer_t; VAR value: struct_itimerspec): int;
+  PROCEDURE [ccall] timer_settime* (timerid: timer_t; flags: int; IN value: struct_itimerspec; VAR [nil] ovalue: struct_itimerspec): int;
+  PROCEDURE [ccall] tzset* ;
+
+END PosixCtime.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Ctypes.cp b/src/cpfront/linux/arm/Posix/Mod/Ctypes.cp
new file mode 100644 (file)
index 0000000..fab32f1
--- /dev/null
@@ -0,0 +1,40 @@
+MODULE PosixCtypes;
+
+  (* generated by genposix.sh, do not modify *)
+
+IMPORT SYSTEM;
+
+  TYPE
+    char* = BYTE;
+    signed_char* = BYTE;
+    unsigned_char* = BYTE;
+    short* = SHORTINT;
+    short_int* = SHORTINT;
+    signed_short* = SHORTINT;
+    signed_short_int* = SHORTINT;
+    unsigned_short* = SHORTINT;
+    unsigned_short_int* = SHORTINT;
+    int* = INTEGER;
+    signed* = INTEGER;
+    signed_int* = INTEGER;
+    unsigned* = INTEGER;
+    unsigned_int* = INTEGER;
+    long* = INTEGER;
+    long_int* = INTEGER;
+    signed_long* = INTEGER;
+    signed_long_int* = INTEGER;
+    unsigned_long* = INTEGER;
+    unsigned_long_int* = INTEGER;
+    long_long* = LONGINT;
+    long_long_int* = LONGINT;
+    signed_long_long* = LONGINT;
+    signed_long_long_int* = LONGINT;
+    unsigned_long_long* = LONGINT;
+    unsigned_long_long_int* = LONGINT;
+    float* = SHORTREAL;
+    double* = REAL;
+    long_double* = RECORD [noalign] _: ARRAY [untagged] 8 OF BYTE END;
+    Pvoid* = INTEGER;
+
+
+END PosixCtypes.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Cunistd.cp b/src/cpfront/linux/arm/Posix/Mod/Cunistd.cp
new file mode 100644 (file)
index 0000000..07357b7
--- /dev/null
@@ -0,0 +1,430 @@
+MODULE PosixCunistd ['unistd.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  CONST
+    _POSIX_VERSION* = 200809;
+    _POSIX2_VERSION* = 200809;
+    _XOPEN_VERSION* = 700;
+
+  CONST
+    _POSIX_ADVISORY_INFO* = 200809;
+    _POSIX_ASYNCHRONOUS_IO* = 200809;
+    _POSIX_BARRIERS* = 200809;
+    _POSIX_CHOWN_RESTRICTED* = 0;
+    _POSIX_CLOCK_SELECTION* = 200809;
+    _POSIX_CPUTIME* = 0;
+    _POSIX_FSYNC* = 200809;
+    _POSIX_IPV6* = 200809;
+    _POSIX_JOB_CONTROL* = 1;
+    _POSIX_MAPPED_FILES* = 200809;
+    _POSIX_MEMLOCK* = 200809;
+    _POSIX_MEMLOCK_RANGE* = 200809;
+    _POSIX_MEMORY_PROTECTION* = 200809;
+    _POSIX_MESSAGE_PASSING* = 200809;
+    _POSIX_MONOTONIC_CLOCK* = 0;
+    _POSIX_NO_TRUNC* = 1;
+    _POSIX_PRIORITIZED_IO* = 200809;
+    _POSIX_PRIORITY_SCHEDULING* = 200809;
+    _POSIX_RAW_SOCKETS* = 200809;
+    _POSIX_READER_WRITER_LOCKS* = 200809;
+    _POSIX_REALTIME_SIGNALS* = 200809;
+    _POSIX_REGEXP* = 1;
+    _POSIX_SAVED_IDS* = 1;
+    _POSIX_SEMAPHORES* = 200809;
+    _POSIX_SHARED_MEMORY_OBJECTS* = 200809;
+    _POSIX_SHELL* = 1;
+    _POSIX_SPAWN* = 200809;
+    _POSIX_SPIN_LOCKS* = 200809;
+    _POSIX_SPORADIC_SERVER* = -1;
+    _POSIX_SYNCHRONIZED_IO* = 200809;
+    _POSIX_THREAD_ATTR_STACKADDR* = 200809;
+    _POSIX_THREAD_ATTR_STACKSIZE* = 200809;
+    _POSIX_THREAD_CPUTIME* = 0;
+    _POSIX_THREAD_PRIO_INHERIT* = 200809;
+    _POSIX_THREAD_PRIO_PROTECT* = 200809;
+    _POSIX_THREAD_PRIORITY_SCHEDULING* = 200809;
+    _POSIX_THREAD_PROCESS_SHARED* = 200809;
+    _POSIX_THREAD_ROBUST_PRIO_INHERIT* = 200809;
+    _POSIX_THREAD_ROBUST_PRIO_PROTECT* = -1;
+    _POSIX_THREAD_SAFE_FUNCTIONS* = 200809;
+    _POSIX_THREAD_SPORADIC_SERVER* = -1;
+    _POSIX_THREADS* = 200809;
+    _POSIX_TIMEOUTS* = 200809;
+    _POSIX_TIMERS* = 200809;
+    _POSIX_TRACE* = -1;
+    _POSIX_TRACE_EVENT_FILTER* = -1;
+    _POSIX_TRACE_INHERIT* = -1;
+    _POSIX_TRACE_LOG* = -1;
+    _POSIX_TYPED_MEMORY_OBJECTS* = -1;
+    _POSIX_V6_ILP32_OFF32* = 1;
+    _POSIX_V6_ILP32_OFFBIG* = 1;
+    _POSIX_V6_LP64_OFF64* = -1;
+    _POSIX_V6_LPBIG_OFFBIG* = -1;
+    _POSIX_V7_ILP32_OFF32* = 1;
+    _POSIX_V7_ILP32_OFFBIG* = 1;
+    _POSIX_V7_LP64_OFF64* = -1;
+    _POSIX_V7_LPBIG_OFFBIG* = -1;
+    _POSIX2_C_BIND* = 200809;
+    _POSIX2_C_DEV* = 200809;
+    _POSIX2_CHAR_TERM* = 200809;
+    _POSIX2_FORT_DEV* = -1;
+    _POSIX2_FORT_RUN* = -1;
+    _POSIX2_LOCALEDEF* = 200809;
+    _POSIX2_PBS* = -1;
+    _POSIX2_PBS_ACCOUNTING* = -1;
+    _POSIX2_PBS_CHECKPOINT* = -1;
+    _POSIX2_PBS_LOCATE* = -1;
+    _POSIX2_PBS_MESSAGE* = -1;
+    _POSIX2_PBS_TRACK* = -1;
+    _POSIX2_SW_DEV* = 200809;
+    _POSIX2_UPE* = -1;
+    _XOPEN_CRYPT* = 1;
+    _XOPEN_ENH_I18N* = 1;
+    _XOPEN_REALTIME* = 1;
+    _XOPEN_REALTIME_THREADS* = 1;
+    _XOPEN_SHM* = 1;
+    _XOPEN_STREAMS* = -1;
+    _XOPEN_UNIX* = 1;
+    _XOPEN_UUCP* = -1;
+
+  CONST
+    _POSIX_ASYNC_IO* = 1;
+    _POSIX_PRIO_IO* = -1;
+    _POSIX_SYNC_IO* = -1;
+    _POSIX_TIMESTAMP_RESOLUTION* = -1;
+    _POSIX2_SYMLINKS* = -1;
+
+  CONST
+    F_OK* = 0;
+    R_OK* = 4;
+    W_OK* = 2;
+    X_OK* = 1;
+
+  CONST
+    _CS_PATH* = 0;
+    _CS_POSIX_V7_ILP32_OFF32_CFLAGS* = 1132;
+    _CS_POSIX_V7_ILP32_OFF32_LDFLAGS* = 1133;
+    _CS_POSIX_V7_ILP32_OFF32_LIBS* = 1134;
+    _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS* = 1136;
+    _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS* = 1137;
+    _CS_POSIX_V7_ILP32_OFFBIG_LIBS* = 1138;
+    _CS_POSIX_V7_LP64_OFF64_CFLAGS* = 1140;
+    _CS_POSIX_V7_LP64_OFF64_LDFLAGS* = 1141;
+    _CS_POSIX_V7_LP64_OFF64_LIBS* = 1142;
+    _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS* = 1144;
+    _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS* = 1145;
+    _CS_POSIX_V7_LPBIG_OFFBIG_LIBS* = 1146;
+    _CS_POSIX_V7_THREADS_CFLAGS* = -1;
+    _CS_POSIX_V7_THREADS_LDFLAGS* = -1;
+    _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS* = 5;
+    _CS_V7_ENV* = 1149;
+    _CS_POSIX_V6_ILP32_OFF32_CFLAGS* = 1116;
+    _CS_POSIX_V6_ILP32_OFF32_LDFLAGS* = 1117;
+    _CS_POSIX_V6_ILP32_OFF32_LIBS* = 1118;
+    _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS* = 1120;
+    _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS* = 1121;
+    _CS_POSIX_V6_ILP32_OFFBIG_LIBS* = 1122;
+    _CS_POSIX_V6_LP64_OFF64_CFLAGS* = 1124;
+    _CS_POSIX_V6_LP64_OFF64_LDFLAGS* = 1125;
+    _CS_POSIX_V6_LP64_OFF64_LIBS* = 1126;
+    _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS* = 1128;
+    _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS* = 1129;
+    _CS_POSIX_V6_LPBIG_OFFBIG_LIBS* = 1130;
+    _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS* = 1;
+    _CS_V6_ENV* = 1148;
+
+  CONST
+    SEEK_CUR* = 1;
+    SEEK_END* = 2;
+    SEEK_SET* = 0;
+
+  CONST
+    F_LOCK* = 1;
+    F_TEST* = 3;
+    F_TLOCK* = 2;
+    F_ULOCK* = 0;
+
+  CONST
+    _PC_2_SYMLINKS* = 20;
+    _PC_ALLOC_SIZE_MIN* = 18;
+    _PC_ASYNC_IO* = 10;
+    _PC_CHOWN_RESTRICTED* = 6;
+    _PC_FILESIZEBITS* = 13;
+    _PC_LINK_MAX* = 0;
+    _PC_MAX_CANON* = 1;
+    _PC_MAX_INPUT* = 2;
+    _PC_NAME_MAX* = 3;
+    _PC_NO_TRUNC* = 7;
+    _PC_PATH_MAX* = 4;
+    _PC_PIPE_BUF* = 5;
+    _PC_PRIO_IO* = 11;
+    _PC_REC_INCR_XFER_SIZE* = 14;
+    _PC_REC_MAX_XFER_SIZE* = 15;
+    _PC_REC_MIN_XFER_SIZE* = 16;
+    _PC_REC_XFER_ALIGN* = 17;
+    _PC_SYMLINK_MAX* = 19;
+    _PC_SYNC_IO* = 9;
+    _PC_TIMESTAMP_RESOLUTION* = -1;
+    _PC_VDISABLE* = 8;
+
+  CONST
+    _SC_2_C_BIND* = 47;
+    _SC_2_C_DEV* = 48;
+    _SC_2_CHAR_TERM* = 95;
+    _SC_2_FORT_DEV* = 49;
+    _SC_2_FORT_RUN* = 50;
+    _SC_2_LOCALEDEF* = 52;
+    _SC_2_PBS* = 168;
+    _SC_2_PBS_ACCOUNTING* = 169;
+    _SC_2_PBS_CHECKPOINT* = 175;
+    _SC_2_PBS_LOCATE* = 170;
+    _SC_2_PBS_MESSAGE* = 171;
+    _SC_2_PBS_TRACK* = 172;
+    _SC_2_SW_DEV* = 51;
+    _SC_2_UPE* = 97;
+    _SC_2_VERSION* = 46;
+    _SC_ADVISORY_INFO* = 132;
+    _SC_AIO_LISTIO_MAX* = 23;
+    _SC_AIO_MAX* = 24;
+    _SC_AIO_PRIO_DELTA_MAX* = 25;
+    _SC_ARG_MAX* = 0;
+    _SC_ASYNCHRONOUS_IO* = 12;
+    _SC_ATEXIT_MAX* = 87;
+    _SC_BARRIERS* = 133;
+    _SC_BC_BASE_MAX* = 36;
+    _SC_BC_DIM_MAX* = 37;
+    _SC_BC_SCALE_MAX* = 38;
+    _SC_BC_STRING_MAX* = 39;
+    _SC_CHILD_MAX* = 1;
+    _SC_CLK_TCK* = 2;
+    _SC_CLOCK_SELECTION* = 137;
+    _SC_COLL_WEIGHTS_MAX* = 40;
+    _SC_CPUTIME* = 138;
+    _SC_DELAYTIMER_MAX* = 26;
+    _SC_EXPR_NEST_MAX* = 42;
+    _SC_FSYNC* = 15;
+    _SC_GETGR_R_SIZE_MAX* = 69;
+    _SC_GETPW_R_SIZE_MAX* = 70;
+    _SC_HOST_NAME_MAX* = 180;
+    _SC_IOV_MAX* = 60;
+    _SC_IPV6* = 235;
+    _SC_JOB_CONTROL* = 7;
+    _SC_LINE_MAX* = 43;
+    _SC_LOGIN_NAME_MAX* = 71;
+    _SC_MAPPED_FILES* = 16;
+    _SC_MEMLOCK* = 17;
+    _SC_MEMLOCK_RANGE* = 18;
+    _SC_MEMORY_PROTECTION* = 19;
+    _SC_MESSAGE_PASSING* = 20;
+    _SC_MONOTONIC_CLOCK* = 149;
+    _SC_MQ_OPEN_MAX* = 27;
+    _SC_MQ_PRIO_MAX* = 28;
+    _SC_NGROUPS_MAX* = 3;
+    _SC_OPEN_MAX* = 4;
+    _SC_PAGE_SIZE* = 30;
+    _SC_PAGESIZE* = 30;
+    _SC_PRIORITIZED_IO* = 13;
+    _SC_PRIORITY_SCHEDULING* = 10;
+    _SC_RAW_SOCKETS* = 236;
+    _SC_RE_DUP_MAX* = 44;
+    _SC_READER_WRITER_LOCKS* = 153;
+    _SC_REALTIME_SIGNALS* = 9;
+    _SC_REGEXP* = 155;
+    _SC_RTSIG_MAX* = 31;
+    _SC_SAVED_IDS* = 8;
+    _SC_SEM_NSEMS_MAX* = 32;
+    _SC_SEM_VALUE_MAX* = 33;
+    _SC_SEMAPHORES* = 21;
+    _SC_SHARED_MEMORY_OBJECTS* = 22;
+    _SC_SHELL* = 157;
+    _SC_SIGQUEUE_MAX* = 34;
+    _SC_SPAWN* = 159;
+    _SC_SPIN_LOCKS* = 154;
+    _SC_SPORADIC_SERVER* = 160;
+    _SC_SS_REPL_MAX* = 241;
+    _SC_STREAM_MAX* = 5;
+    _SC_SYMLOOP_MAX* = 173;
+    _SC_SYNCHRONIZED_IO* = 14;
+    _SC_THREAD_ATTR_STACKADDR* = 77;
+    _SC_THREAD_ATTR_STACKSIZE* = 78;
+    _SC_THREAD_CPUTIME* = 139;
+    _SC_THREAD_DESTRUCTOR_ITERATIONS* = 73;
+    _SC_THREAD_KEYS_MAX* = 74;
+    _SC_THREAD_PRIO_INHERIT* = 80;
+    _SC_THREAD_PRIO_PROTECT* = 81;
+    _SC_THREAD_PRIORITY_SCHEDULING* = 79;
+    _SC_THREAD_PROCESS_SHARED* = 82;
+    _SC_THREAD_ROBUST_PRIO_INHERIT* = 247;
+    _SC_THREAD_ROBUST_PRIO_PROTECT* = 248;
+    _SC_THREAD_SAFE_FUNCTIONS* = 68;
+    _SC_THREAD_SPORADIC_SERVER* = 161;
+    _SC_THREAD_STACK_MIN* = 75;
+    _SC_THREAD_THREADS_MAX* = 76;
+    _SC_THREADS* = 67;
+    _SC_TIMEOUTS* = 164;
+    _SC_TIMER_MAX* = 35;
+    _SC_TIMERS* = 11;
+    _SC_TRACE* = 181;
+    _SC_TRACE_EVENT_FILTER* = 182;
+    _SC_TRACE_EVENT_NAME_MAX* = 242;
+    _SC_TRACE_INHERIT* = 183;
+    _SC_TRACE_LOG* = 184;
+    _SC_TRACE_NAME_MAX* = 243;
+    _SC_TRACE_SYS_MAX* = 244;
+    _SC_TRACE_USER_EVENT_MAX* = 245;
+    _SC_TTY_NAME_MAX* = 72;
+    _SC_TYPED_MEMORY_OBJECTS* = 165;
+    _SC_TZNAME_MAX* = 6;
+    _SC_V7_ILP32_OFF32* = 237;
+    _SC_V7_ILP32_OFFBIG* = 238;
+    _SC_V7_LP64_OFF64* = 239;
+    _SC_V7_LPBIG_OFFBIG* = 240;
+    _SC_V6_ILP32_OFF32* = 176;
+    _SC_V6_ILP32_OFFBIG* = 177;
+    _SC_V6_LP64_OFF64* = 178;
+    _SC_V6_LPBIG_OFFBIG* = 179;
+    _SC_VERSION* = 29;
+    _SC_XOPEN_CRYPT* = 92;
+    _SC_XOPEN_ENH_I18N* = 93;
+    _SC_XOPEN_REALTIME* = 130;
+    _SC_XOPEN_REALTIME_THREADS* = 131;
+    _SC_XOPEN_SHM* = 94;
+    _SC_XOPEN_STREAMS* = 246;
+    _SC_XOPEN_UNIX* = 91;
+    _SC_XOPEN_UUCP* = -1;
+    _SC_XOPEN_VERSION* = 89;
+
+  CONST
+    STDERR_FILENO* = 2;
+    STDIN_FILENO* = 0;
+    STDOUT_FILENO* = 1;
+
+  CONST
+    _POSIX_VDISABLE* = 0;
+
+  TYPE
+    size_t* = PosixCsys_types.size_t;
+    ssize_t* = PosixCsys_types.ssize_t;
+    uid_t* = PosixCsys_types.uid_t;
+    gid_t* = PosixCsys_types.gid_t;
+    off_t* = PosixCsys_types.off_t;
+    pid_t* = PosixCsys_types.pid_t;
+
+  TYPE
+    intptr_t* = INTEGER;
+
+  PROCEDURE [ccall] access* (IN path: ARRAY [untagged] OF SHORTCHAR; amode: int): int;
+  PROCEDURE [ccall] alarm* (seconds: unsigned): unsigned;
+  PROCEDURE [ccall] chdir* (IN path: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] chown* (IN path: ARRAY [untagged] OF SHORTCHAR; owner: uid_t; group: gid_t): int;
+  PROCEDURE [ccall] close* (fd: int): int;
+  PROCEDURE [ccall] confstr* (name: int; VAR buf: ARRAY [untagged] OF SHORTCHAR; len: size_t);
+  PROCEDURE [ccall] crypt* (IN key, salt: ARRAY [untagged] OF SHORTCHAR);
+  PROCEDURE [ccall] dup* (oldfd: int): int;
+  PROCEDURE [ccall] dup2* (oldfd, newfd: int): int;
+  PROCEDURE [ccall] _exit* (status: int);
+  PROCEDURE [ccall] encrypt* (VAR block: ARRAY [untagged] 64 OF SHORTCHAR; edflag: int);
+  PROCEDURE [ccall] execv* (IN path: ARRAY [untagged] OF SHORTCHAR; IN argv: ARRAY [untagged] OF POINTER TO ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] execve* (IN path: ARRAY [untagged] OF SHORTCHAR; IN argv, envp: ARRAY [untagged] OF POINTER TO ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] execvp* (IN file: ARRAY [untagged] OF SHORTCHAR; IN argv, envp: ARRAY [untagged] OF POINTER TO ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] faccessat* (fd: int; IN path: ARRAY [untagged] OF SHORTCHAR; amode, flag: int): int;
+  PROCEDURE [ccall] fchdir* (fildes: int): int;
+  PROCEDURE [ccall] fchown* (fildes: int; owner: uid_t; group: gid_t): int;
+  PROCEDURE [ccall] fchownat* (fd: int; IN path: ARRAY [untagged] OF SHORTCHAR; owner: uid_t; group: gid_t; flag: int): int;
+  PROCEDURE [ccall] fdatasync* (fildes: int): int;
+  PROCEDURE [ccall] fexecve* (fd: int; IN argv, envp: ARRAY [untagged] OF POINTER TO ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] fork* (): pid_t;
+  PROCEDURE [ccall] fpathconf* (fd, name: int): long;
+  PROCEDURE [ccall] fsync* (fildes: int): int;
+  PROCEDURE [ccall] ftruncate* (fildes: int; length: off_t): int;
+  PROCEDURE [ccall] getcwd* (VAR [nil] buf: ARRAY [untagged] OF SHORTCHAR; size: size_t): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] getegid* (): gid_t;
+  PROCEDURE [ccall] geteuid* (): uid_t;
+  PROCEDURE [ccall] getgid* (): gid_t;
+  PROCEDURE [ccall] getgroups* (gidsetsize: int; VAR grouplist: ARRAY [untagged] OF gid_t): int;
+  PROCEDURE [ccall] gethostid* (): long;
+  PROCEDURE [ccall] gethostname* (VAR name: ARRAY [untagged] OF SHORTCHAR; namelen: size_t): int;
+  PROCEDURE [ccall] getlogin* (): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] getlogin_r* (VAR buf: ARRAY [untagged] OF SHORTCHAR; bufsize: size_t): int;
+  PROCEDURE [ccall] getopt* (argc: int; IN argv: ARRAY [untagged] OF POINTER TO ARRAY [untagged] OF SHORTCHAR; IN optstring: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] getpgid* (pid: pid_t): pid_t;
+  PROCEDURE [ccall] getpgrp* (): pid_t;
+  PROCEDURE [ccall] getpid* (): pid_t;
+  PROCEDURE [ccall] getppid* (): pid_t;
+  PROCEDURE [ccall] getsid* (): pid_t;
+  PROCEDURE [ccall] getuid* (): uid_t;
+  PROCEDURE [ccall] isatty* (fd: int): int;
+  PROCEDURE [ccall] lchown* (IN path: ARRAY [untagged] OF SHORTCHAR; owner: uid_t; group: gid_t): int;
+  PROCEDURE [ccall] link* (IN path1, path2: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] linkat* (fd1: int; IN path1: ARRAY [untagged] OF SHORTCHAR; fd2: int; IN path2: ARRAY [untagged] OF SHORTCHAR; flag: int): int;
+  PROCEDURE [ccall] lockf* (fd, cmd: int; len: off_t): int;
+  PROCEDURE [ccall] lseek* (fildes: int; offset: off_t; whence: int): off_t;
+  PROCEDURE [ccall] nice* (incr: int): int;
+  PROCEDURE [ccall] pathconf* (IN path: ARRAY [untagged] OF SHORTCHAR; name: int): long;
+  PROCEDURE [ccall] pause* (): int;
+  PROCEDURE [ccall] pipe* (VAR fildes: ARRAY [untagged] 2 OF int): int;
+  PROCEDURE [ccall] pread* (fildes: int; buf: PosixCtypes.Pvoid; nbyte: size_t; offset: off_t): ssize_t;
+  PROCEDURE [ccall] pwrite* (fildes: int; buf: PosixCtypes.Pvoid; nbyte: size_t; offset: off_t): ssize_t;
+  PROCEDURE [ccall] read* (fildes: int; buf: PosixCtypes.Pvoid; nbyte: size_t): ssize_t;
+  PROCEDURE [ccall] readlink* (IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: ARRAY [untagged] OF SHORTCHAR; bufsize: size_t): ssize_t;
+  PROCEDURE [ccall] readlinkat* (fd: int; IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: ARRAY [untagged] OF SHORTCHAR; bufsize: size_t): ssize_t;
+  PROCEDURE [ccall] rmdir* (IN path: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] setegid* (gid: gid_t): int;
+  PROCEDURE [ccall] seteuid* (uid: uid_t): int;
+  PROCEDURE [ccall] setgid* (gid: gid_t): int;
+  PROCEDURE [ccall] setpgid* (pid, pgid: pid_t): int;
+  PROCEDURE [ccall] setpgrp* (): pid_t;
+  PROCEDURE [ccall] setregid* (rgid, egid: pid_t): int;
+  PROCEDURE [ccall] setreuid* (ruid, euid: uid_t): int;
+  PROCEDURE [ccall] setsid* (): pid_t;
+  PROCEDURE [ccall] setuid* (uid: uid_t): int;
+  PROCEDURE [ccall] sleep* (seconds: unsigned): unsigned;
+  PROCEDURE [ccall] swab* (from, to: PosixCtypes.Pvoid; n: ssize_t);
+  PROCEDURE [ccall] symlink* (IN path1, path2: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] symlinkat* (IN path1: ARRAY [untagged] OF SHORTCHAR; fd: int; IN path2: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] sync* ;
+  PROCEDURE [ccall] sysconf* (name: int): long;
+  PROCEDURE [ccall] tcgetpgrp* (fd: int): pid_t;
+  PROCEDURE [ccall] tcsetpgrp* (fd: int; pgrp: pid_t): int;
+  PROCEDURE [ccall] truncate* (IN path: ARRAY [untagged] OF SHORTCHAR; length: off_t): int;
+  PROCEDURE [ccall] ttyname* (fd: int): POINTER TO ARRAY [untagged] OF SHORTCHAR;
+  PROCEDURE [ccall] ttyname_r* (fd: int; VAR buf: ARRAY [untagged] OF SHORTCHAR; buflen: size_t): int;
+  PROCEDURE [ccall] unlink* (IN path: ARRAY [untagged] OF SHORTCHAR): int;
+  PROCEDURE [ccall] unlinkat* (fd: int; IN path: ARRAY [untagged] OF SHORTCHAR; flag: int): int;
+  PROCEDURE [ccall] write* (fildes: int; buf: PosixCtypes.Pvoid; nbyte: size_t): int;
+
+END PosixCunistd.
diff --git a/src/cpfront/linux/arm/Posix/Mod/Cwctype.cp b/src/cpfront/linux/arm/Posix/Mod/Cwctype.cp
new file mode 100644 (file)
index 0000000..3bce926
--- /dev/null
@@ -0,0 +1,58 @@
+MODULE PosixCwctype ['wctype.h'];
+
+  (* generated by genposix.sh, do not modify *)
+
+  IMPORT SYSTEM, PosixCtypes, PosixClocale;
+
+  TYPE
+    char* = PosixCtypes.char;
+    signed_char* = PosixCtypes.signed_char;
+    unsigned_char* = PosixCtypes.unsigned_char;
+    short* = PosixCtypes.short;
+    short_int* = PosixCtypes.short_int;
+    signed_short* = PosixCtypes.signed_short;
+    signed_short_int* = PosixCtypes.signed_short_int;
+    unsigned_short* = PosixCtypes.unsigned_short;
+    unsigned_short_int* = PosixCtypes.unsigned_short_int;
+    int* = PosixCtypes.int;
+    signed* = PosixCtypes.signed;
+    signed_int* = PosixCtypes.signed_int;
+    unsigned* = PosixCtypes.unsigned;
+    unsigned_int* = PosixCtypes.unsigned_int;
+    long* = PosixCtypes.long;
+    long_int* = PosixCtypes.long_int;
+    signed_long* = PosixCtypes.signed_long;
+    signed_long_int* = PosixCtypes.signed_long_int;
+    unsigned_long* = PosixCtypes.unsigned_long;
+    unsigned_long_int* = PosixCtypes.unsigned_long_int;
+    long_long* = PosixCtypes.long_long;
+    long_long_int* = PosixCtypes.long_long_int;
+    signed_long_long* = PosixCtypes.signed_long_long;
+    signed_long_long_int* = PosixCtypes.signed_long_long_int;
+    unsigned_long_long* = PosixCtypes.unsigned_long_long;
+    unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
+    float* = PosixCtypes.float;
+    double* = PosixCtypes.double;
+    long_double* = PosixCtypes.long_double;
+
+  TYPE
+    wint_t* = INTEGER;
+    wctype_t* = INTEGER;
+
+  TYPE
+    wctrans_t* = INTEGER;
+
+  TYPE
+    locale_t* = PosixClocale.locale_t;
+
+  CONST
+    WEOF* = -1;
+
+  PROCEDURE [ccall] iswalpha* (wc: wint_t): int;
+  PROCEDURE [ccall] iswdigit* (wc: wint_t): int;
+  PROCEDURE [ccall] iswlower* (wc: wint_t): int;
+  PROCEDURE [ccall] iswupper* (wc: wint_t): int;
+  PROCEDURE [ccall] towlower* (wc: wint_t): wint_t;
+  PROCEDURE [ccall] towupper* (wc: wint_t): wint_t;
+
+END PosixCwctype.