DEADSOFTWARE

added cygwin support (only via cpfront)
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 21 Jun 2019 19:14:05 +0000 (22:14 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 21 Jun 2019 19:14:05 +0000 (22:14 +0300)
25 files changed:
make-all.sh
make-bootstrap.sh
make.sh
src/cpfront/cygwin/486/Posix/Mod/Cdirent.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Cdlfcn.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Cerrno.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Cfcntl.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Ciconv.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Clibgen.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Clocale.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Csetjmp.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Csignal.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Cstdio.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Cstdlib.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Csys_mman.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Csys_stat.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Csys_types.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Ctime.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Ctypes.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Cunistd.cp [new file with mode: 0644]
src/cpfront/cygwin/486/Posix/Mod/Cwctype.cp [new file with mode: 0644]
src/cpfront/cygwin/generic/Posix/Mod/Cmacro.cp [new file with mode: 0644]
src/cpfront/posix/generic/Posix/Mod/Cmacro.cp [moved from src/cpfront/linux/generic/Posix/Mod/Cmacro.cp with 100% similarity]
src/native/posix/generic/System/Mod/Kernel.cp
src/posix/generic/Host/Mod/Files.cp

index 696571af89f7c3560845482592976bd84d2dac7e..54294677e5deee81390cc17ba4a7e5dec5d049f5 100755 (executable)
@@ -45,6 +45,7 @@ usage() {
   echo "    cpfront           Generic C"
   echo "Operation systems:"
   echo "    linux             GNU/Linux"
+  echo "    cygwin            Cygwin"
   echo "Environment variables:"
   echo "    CC                C compiler binary"
   echo "    CFLAGS            C compiler options"
@@ -63,13 +64,17 @@ make_stage() {
   local _this_system="$4"
   shift 4
   "$_this/make.sh" -o "$_dir" -c "$_compiler" -l "$_linker" "$@" "$_this_cpu" "$_this_target" "$_this_system"
+  local _ext=
+  if [ "$_host_system" = "cygwin" ]; then
+    _ext=".exe"
+  fi
   if [ "$_target" = "cpfront" ]; then
-    _compiler="$_dir/cpfront"
+    _compiler="$_dir/cpfront${_ext}"
     _linker=
   else
     if [ "$_cpu" = "486" ]; then
-      _compiler="$_dir/cpc486"
-      _linker="$_dir/cpl486"
+      _compiler="$_dir/cpc486${_ext}"
+      _linker="$_dir/cpl486${_ext}"
     else
       error "unsupported cpu $_cpu"
     fi
index db2a7eb519b17da99beca90dd13feffe06931407..e82d0a682d0d8edbb13eb361669e71c0f3c6aeb5 100755 (executable)
@@ -31,6 +31,7 @@ make_bootstrap() {
 rm -rf "$_this/bootstrap"
 mkdir -p "$_this/bootstrap"
 make_bootstrap 486 cpfront linux
+make_bootstrap 486 cpfront cygwin
 make_bootstrap arm cpfront linux
 
 ###^^^^^^^^^^^^^^^^^^^^^^###
diff --git a/make.sh b/make.sh
index 9aa6e5247ff581ff08502098c5b2a29e5603532a..070241473dfc406ad0a5442093ec611f9267ccd3 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -39,6 +39,7 @@ usage() {
   echo "    cpfront           Generic C"
   echo "Operation systems:"
   echo "    linux             GNU/Linux"
+  echo "    cygwin            Cygwin"
   echo "Environment variables:"
   echo "    CC                C compiler binary"
   echo "    CFLAGS            C compiler options"
@@ -65,8 +66,15 @@ native_compile() {
 
 native_link() {
   if $_dolink; then
-    "$_linker" -os "$_system" -kernel Kernel -main Kernel -legacycodedir . -o "$@"
-  fi
+    local _outexe="$1";
+    local _outsystem="$_system"
+    if [ "$_system" = "cygwin" ]; then
+      _outexe="${_outexe}.exe"
+      _outsystem="win32"
+    fi
+    shift
+    "$_linker" -os "$_outsystem" -kernel Kernel -main Kernel -legacycodedir . -o "$_outexe" "$@"
+    fi
 }
 
 cpfront_import_list() {
@@ -84,7 +92,11 @@ cpfront_import_list() {
 cpfront_main_module() {
    local _name="$1"
    shift
-   echo "MODULE ${_name};\n\n  IMPORT $(cpfront_import_list "$@");\n\nEND ${_name}."
+   echo "MODULE ${_name};"
+   echo
+   echo "  IMPORT $(cpfront_import_list "$@");"
+   echo
+   echo "END ${_name}."
 }
 
 cpfront_compile() {
@@ -115,7 +127,12 @@ cpfront_link() {
       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
+    local _system_cflags=
+    case "$_system" in
+      cygwin)  _system_cflags="-liconv" ;;
+      *)  _system_cflags="" ;;
+    esac
+    "$CC" $_cc_cflags $_cpu_cflags $CFLAGS -o "${_main}" -I "$_this/C" "$_this/C/SYSTEM.c" $_list -lm -ldl $_system_cflags
   fi
 }
 
@@ -296,6 +313,7 @@ esac
 
 case "$_system" in
   linux) _useposix=true ;;
+  cygwin) _useposix=true ;;
   "") error "operation system not specified" ;;
   *) error "unsuported operation system $_system" ;;
 esac
diff --git a/src/cpfront/cygwin/486/Posix/Mod/Cdirent.cp b/src/cpfront/cygwin/486/Posix/Mod/Cdirent.cp
new file mode 100644 (file)
index 0000000..d74feb2
--- /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] (* 276 *)
+      d_ino*: ino_t; (* 4+8 *)
+      d_name*: ARRAY [untagged] 256 OF SHORTCHAR; (* 20+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/cygwin/486/Posix/Mod/Cdlfcn.cp b/src/cpfront/cygwin/486/Posix/Mod/Cdlfcn.cp
new file mode 100644 (file)
index 0000000..507a4af
--- /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* = 4;
+    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/cygwin/486/Posix/Mod/Cerrno.cp b/src/cpfront/cygwin/486/Posix/Mod/Cerrno.cp
new file mode 100644 (file)
index 0000000..670c076
--- /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* = 112;
+    EADDRNOTAVAIL* = 125;
+    EAFNOSUPPORT* = 106;
+    EAGAIN* = 11;
+    EALREADY* = 120;
+    EBADF* = 9;
+    EBADMSG* = 77;
+    EBUSY* = 16;
+    ECANCELED* = 140;
+    ECHILD* = 10;
+    ECONNABORTED* = 113;
+    ECONNREFUSED* = 111;
+    ECONNRESET* = 104;
+    EDEADLK* = 45;
+    EDESTADDRREQ* = 121;
+    EDOM* = 33;
+    EDQUOT* = 132;
+    EEXIST* = 17;
+    EFAULT* = 14;
+    EFBIG* = 27;
+    EHOSTUNREACH* = 118;
+    EIDRM* = 36;
+    EILSEQ* = 138;
+    EINPROGRESS* = 119;
+    EINTR* = 4;
+    EINVAL* = 22;
+    EIO* = 5;
+    EISCONN* = 127;
+    EISDIR* = 21;
+    ELOOP* = 92;
+    EMFILE* = 24;
+    EMLINK* = 31;
+    EMSGSIZE* = 122;
+    EMULTIHOP* = 74;
+    ENAMETOOLONG* = 91;
+    ENETDOWN* = 115;
+    ENETRESET* = 126;
+    ENETUNREACH* = 114;
+    ENFILE* = 23;
+    ENOBUFS* = 105;
+    ENODATA* = 61;
+    ENODEV* = 19;
+    ENOENT* = 2;
+    ENOEXEC* = 8;
+    ENOLCK* = 46;
+    ENOLINK* = 67;
+    ENOMEM* = 12;
+    ENOMSG* = 35;
+    ENOPROTOOPT* = 109;
+    ENOSPC* = 28;
+    ENOSR* = 63;
+    ENOSTR* = 60;
+    ENOSYS* = 88;
+    ENOTCONN* = 128;
+    ENOTDIR* = 20;
+    ENOTEMPTY* = 90;
+    ENOTRECOVERABLE* = 141;
+    ENOTSOCK* = 108;
+    ENOTSUP* = 134;
+    ENOTTY* = 25;
+    ENXIO* = 6;
+    EOPNOTSUPP* = 95;
+    EOVERFLOW* = 139;
+    EOWNERDEAD* = 142;
+    EPERM* = 1;
+    EPIPE* = 32;
+    EPROTO* = 71;
+    EPROTONOSUPPORT* = 123;
+    EPROTOTYPE* = 107;
+    ERANGE* = 34;
+    EROFS* = 30;
+    ESPIPE* = 29;
+    ESRCH* = 3;
+    ESTALE* = 133;
+    ETIME* = 62;
+    ETIMEDOUT* = 116;
+    ETXTBSY* = 26;
+    EWOULDBLOCK* = 11;
+    EXDEV* = 18;
+
+  PROCEDURE [ccall] __errno* (): POINTER TO ARRAY [untagged] 1 OF int;
+
+END PosixCerrno.
diff --git a/src/cpfront/cygwin/486/Posix/Mod/Cfcntl.cp b/src/cpfront/cygwin/486/Posix/Mod/Cfcntl.cp
new file mode 100644 (file)
index 0000000..1c10146
--- /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* = 14;
+    F_GETFD* = 1;
+    F_SETFD* = 2;
+    F_GETFL* = 3;
+    F_SETFL* = 4;
+    F_GETLK* = 7;
+    F_SETLK* = 8;
+    F_SETLKW* = 9;
+    F_GETOWN* = 5;
+    F_SETOWN* = 6;
+
+  CONST
+    FD_CLOEXEC* = 1;
+
+  CONST
+    F_RDLCK* = 1;
+    F_UNLCK* = 3;
+    F_WRLCK* = 2;
+
+  CONST
+    SEEK_SET* = 0;
+    SEEK_CUR* = 1;
+    SEEK_END* = 2;
+
+  CONST
+    O_CLOEXEC* = 262144;
+    O_CREAT* = 512;
+    O_DIRECTORY* = 2097152;
+    O_EXCL* = 2048;
+    O_NOCTTY* = 32768;
+    O_NOFOLLOW* = 1048576;
+    O_TRUNC* = 1024;
+    O_APPEND* = 8;
+    O_DSYNC* = 8192;
+    O_NONBLOCK* = 16384;
+    O_RSYNC* = 8192;
+    O_SYNC* = 8192;
+    O_ACCMODE* = 3;
+    O_RDONLY* = 0;
+    O_RDWR* = 2;
+    O_WRONLY* = 1;
+
+  CONST
+    AT_FDCWD* = -2;
+    AT_EACCESS* = 1;
+    AT_SYMLINK_NOFOLLOW* = 2;
+    AT_SYMLINK_FOLLOW* = 4;
+    AT_REMOVEDIR* = 8;
+
+  CONST
+    POSIX_FADV_DONTNEED* = 4;
+    POSIX_FADV_NOREUSE* = 5;
+    POSIX_FADV_NORMAL* = 0;
+    POSIX_FADV_RANDOM* = 2;
+    POSIX_FADV_SEQUENTIAL* = 1;
+    POSIX_FADV_WILLNEED* = 3;
+
+  TYPE
+    Pstruct_flock* = POINTER TO struct_flock;
+    struct_flock* ['struct flock'] = RECORD [noalign] (* 32 *)
+      l_type*: short; (* 0+2 *)
+      l_whence*: short; (* 2+2 *)
+      l_start*: off_t; (* 8+8 *)
+      l_len*: off_t; (* 16+8 *)
+      l_pid*: pid_t; (* 24+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/cygwin/486/Posix/Mod/Ciconv.cp b/src/cpfront/cygwin/486/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/cygwin/486/Posix/Mod/Clibgen.cp b/src/cpfront/cygwin/486/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/cygwin/486/Posix/Mod/Clocale.cp b/src/cpfront/cygwin/486/Posix/Mod/Clocale.cp
new file mode 100644 (file)
index 0000000..af4adb6
--- /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* = 0;
+    LC_COLLATE* = 1;
+    LC_CTYPE* = 2;
+    LC_MESSAGES* = 6;
+    LC_MONETARY* = 3;
+    LC_NUMERIC* = 4;
+    LC_TIME* = 5;
+
+  CONST
+    LC_COLLATE_MASK* = 2;
+    LC_CTYPE_MASK* = 4;
+    LC_MESSAGES_MASK* = 64;
+    LC_MONETARY_MASK* = 8;
+    LC_NUMERIC_MASK* = 16;
+    LC_TIME_MASK* = 32;
+
+  CONST
+    LC_ALL_MASK* = 1;
+
+  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/cygwin/486/Posix/Mod/Csetjmp.cp b/src/cpfront/cygwin/486/Posix/Mod/Csetjmp.cp
new file mode 100644 (file)
index 0000000..3f720e2
--- /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] 208 OF BYTE;
+    sigjmp_buf* = ARRAY [untagged] 216 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/cygwin/486/Posix/Mod/Csignal.cp b/src/cpfront/cygwin/486/Posix/Mod/Csignal.cp
new file mode 100644 (file)
index 0000000..eeb4fe7
--- /dev/null
@@ -0,0 +1,277 @@
+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* = INTEGER;
+
+  TYPE
+    Pstruct_sigevent* = POINTER TO struct_sigevent;
+    struct_sigevent* ['struct sigevent'] = RECORD [noalign] (* 20 *)
+      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* = 32;
+    SIGRTMAX* = 32;
+    RTSIG_MAX* = 1;
+
+  CONST
+    SIGABRT* = 6;
+    SIGALRM* = 14;
+    SIGBUS* = 10;
+    SIGCHLD* = 20;
+    SIGCONT* = 19;
+    SIGFPE* = 8;
+    SIGHUP* = 1;
+    SIGILL* = 4;
+    SIGINT* = 2;
+    SIGKILL* = 9;
+    SIGPIPE* = 13;
+    SIGQUIT* = 3;
+    SIGSEGV* = 11;
+    SIGSTOP* = 17;
+    SIGTERM* = 15;
+    SIGTSTP* = 18;
+    SIGTTIN* = 21;
+    SIGTTOU* = 22;
+    SIGUSR1* = 30;
+    SIGUSR2* = 31;
+    SIGSYS* = 12;
+    SIGTRAP* = 5;
+    SIGURG* = 16;
+    SIGVTALRM* = 26;
+    SIGXCPU* = 24;
+    SIGXFSZ* = 25;
+
+  TYPE
+    P_struct_sigaction* = POINTER TO _struct_sigaction;
+    _struct_sigaction* ['struct sigaction'] = RECORD [noalign] (* 12 *)
+      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+4 *)
+      sa_flags*: int; (* 8+4 *)
+    END;
+
+  TYPE
+    Pstruct_sigaction* = POINTER TO struct_sigaction;
+    struct_sigaction* ['struct sigaction'] = RECORD [noalign] (* 12 *)
+      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+4 *)
+      sa_flags*: int; (* 8+4 *)
+    END;
+
+  CONST
+    SIG_BLOCK* = 1;
+    SIG_UNBLOCK* = 2;
+    SIG_SETMASK* = 0;
+
+  CONST
+    SA_NOCLDSTOP* = 1;
+    SA_ONSTACK* = 536870912;
+    SA_RESETHAND* = -2147483648;
+    SA_RESTART* = 268435456;
+    SA_SIGINFO* = 2;
+    SA_NODEFER* = 1073741824;
+    SS_ONSTACK* = 1;
+    SS_DISABLE* = 2;
+    MINSIGSTKSZ* = 8192;
+    SIGSTKSZ* = 32768;
+
+  TYPE
+    mcontext_t* = RECORD [noalign] _: ARRAY [untagged] 724 OF BYTE END;
+
+  TYPE
+    Pucontext_t* = POINTER TO ucontext_t;
+    ucontext_t* ['ucontext_t'] = RECORD [noalign] (* 748 *)
+      uc_mcontext*: mcontext_t; (* 0+724 *)
+      uc_link*: Pucontext_t; (* 724+4 *)
+      uc_sigmask*: sigset_t; (* 728+4 *)
+      uc_stack*: stack_t; (* 732+12 *)
+    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] (* 148 *)
+      si_signo*: int; (* 0+4 *)
+      si_code*: int; (* 4+4 *)
+      si_pid*: pid_t; (* 8+4 *)
+      si_uid*: uid_t; (* 12+4 *)
+      si_errno*: int; (* 16+4 *)
+      si_addr*: PosixCtypes.Pvoid; (* 20+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] (* 148 *)
+      si_signo*: int; (* 0+4 *)
+      si_code*: int; (* 4+4 *)
+      info*: RECORD [union] (* 16 *)
+        sigchld*: RECORD [noalign] (* 16 *)
+          si_pid*: pid_t; (* 0+4 *)
+          si_uid*: uid_t; (* 4+4 *)
+          si_status*: int; (* 12+4 *)
+        END; (* 0+16 *)
+        sigfpe*: RECORD [noalign] (* 4 *)
+          si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
+        END; (* 12+4 *)
+        sigsegv*: RECORD [noalign] (* 4 *)
+          si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
+        END; (* 12+4 *)
+        sigbus*: RECORD [noalign] (* 4 *)
+          si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
+        END; (* 12+4 *)
+        sigill*: RECORD [noalign] (* 4 *)
+          si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
+        END; (* 12+4 *)
+        other*: RECORD [noalign] (* 4 *)
+          si_value*: union_sigval; (* 0+4 *)
+        END; (* 12+4 *)
+      END; (* 8+16 *)
+      si_errno*: int; (* 16+4 *)
+    END;
+
+  CONST
+    ILL_ILLOPC* = 7;
+    ILL_ILLOPN* = 8;
+    ILL_ILLADR* = 9;
+    ILL_ILLTRP* = 10;
+    ILL_PRVOPC* = 11;
+    ILL_PRVREG* = 12;
+    ILL_COPROC* = 13;
+    ILL_BADSTK* = 14;
+
+  CONST
+    FPE_INTDIV* = 15;
+    FPE_INTOVF* = 16;
+    FPE_FLTDIV* = 17;
+    FPE_FLTOVF* = 18;
+    FPE_FLTUND* = 19;
+    FPE_FLTRES* = 20;
+    FPE_FLTINV* = 21;
+    FPE_FLTSUB* = 22;
+
+  CONST
+    SEGV_MAPERR* = 23;
+    SEGV_ACCERR* = 24;
+
+  CONST
+    BUS_ADRALN* = 25;
+    BUS_ADRERR* = 26;
+    BUS_OBJERR* = 27;
+
+  CONST
+    CLD_EXITED* = 28;
+    CLD_KILLED* = 29;
+    CLD_DUMPED* = 30;
+    CLD_TRAPPED* = 31;
+    CLD_STOPPED* = 32;
+    CLD_CONTINUED* = 33;
+
+  CONST
+    SI_USER* = 0;
+    SI_QUEUE* = 5;
+    SI_TIMER* = 4;
+    SI_ASYNCIO* = 2;
+    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; VAR [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] sigismember* (VAR set: sigset_t; signum: int): int;
+  PROCEDURE [ccall] sigpending* (VAR set: sigset_t): int;
+  PROCEDURE [ccall] sigprocmask* (how: int; VAR [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] sigsuspend* (VAR sigmask: sigset_t): int;
+  PROCEDURE [ccall] sigtimedwait* (VAR set: sigset_t; VAR [nil] info: siginfo_t; IN timeout: struct_timespec): int;
+  PROCEDURE [ccall] sigwait* (VAR set: sigset_t; VAR sig: int): int;
+  PROCEDURE [ccall] sigwaitinfo* (VAR set: sigset_t; VAR [nil] info: siginfo_t): int;
+
+END PosixCsignal.
diff --git a/src/cpfront/cygwin/486/Posix/Mod/Cstdio.cp b/src/cpfront/cygwin/486/Posix/Mod/Cstdio.cp
new file mode 100644 (file)
index 0000000..6f95ad6
--- /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* = LONGINT;
+
+  TYPE
+    off_t* = PosixCsys_types.off_t;
+    ssize_t* = PosixCsys_types.ssize_t;
+
+  TYPE
+    size_t* = INTEGER;
+
+  TYPE
+    va_list* = INTEGER;
+
+  CONST
+    BUFSIZ* = 1024;
+    L_ctermid* = 16;
+    L_tmpnam* = 4096;
+
+  CONST
+    _IOFBF* = 0;
+    _IOLBF* = 1;
+    _IONBF* = 2;
+
+  CONST
+    SEEK_CUR* = 1;
+    SEEK_END* = 2;
+    SEEK_SET* = 0;
+
+  CONST
+    FILENAME_MAX* = 4096;
+    FOPEN_MAX* = 20;
+    TMP_MAX* = 26;
+
+  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/cygwin/486/Posix/Mod/Cstdlib.cp b/src/cpfront/cygwin/486/Posix/Mod/Cstdlib.cp
new file mode 100644 (file)
index 0000000..7955ae7
--- /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* = SHORTINT;
+
+  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/cygwin/486/Posix/Mod/Csys_mman.cp b/src/cpfront/cygwin/486/Posix/Mod/Csys_mman.cp
new file mode 100644 (file)
index 0000000..18fa5af
--- /dev/null
@@ -0,0 +1,80 @@
+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* = 4;
+    MS_SYNC* = 2;
+
+  CONST
+    MAP_FAILED* = -1;
+
+  CONST
+    POSIX_MADV_DONTNEED* = 4;
+    POSIX_MADV_NORMAL* = 0;
+    POSIX_MADV_RANDOM* = 2;
+    POSIX_MADV_SEQUENTIAL* = 1;
+    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] 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] 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/cygwin/486/Posix/Mod/Csys_stat.cp b/src/cpfront/cygwin/486/Posix/Mod/Csys_stat.cp
new file mode 100644 (file)
index 0000000..94b38ab
--- /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* = -2;
+    UTIME_OMIT* = -1;
+
+  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] (* 96 *)
+      st_dev*: dev_t; (* 0+4 *)
+      st_ino*: ino_t; (* 8+8 *)
+      st_mode*: mode_t; (* 16+4 *)
+      st_nlink*: nlink_t; (* 20+2 *)
+      st_uid*: uid_t; (* 24+4 *)
+      st_gid*: gid_t; (* 28+4 *)
+      st_rdev*: dev_t; (* 32+4 *)
+      st_size*: off_t; (* 40+8 *)
+      st_atim*: struct_timespec; (* 48+8 *)
+      st_mtim*: struct_timespec; (* 56+8 *)
+      st_ctim*: struct_timespec; (* 64+8 *)
+      st_blksize*: blksize_t; (* 72+4 *)
+      st_blocks*: blkcnt_t; (* 80+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/cygwin/486/Posix/Mod/Csys_types.cp b/src/cpfront/cygwin/486/Posix/Mod/Csys_types.cp
new file mode 100644 (file)
index 0000000..df4808b
--- /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* = LONGINT;
+    blksize_t* = INTEGER;
+    clock_t* = INTEGER;
+    clockid_t* = INTEGER;
+    dev_t* = INTEGER;
+    fsblkcnt_t* = INTEGER;
+    fsfilcnt_t* = INTEGER;
+    gid_t* = INTEGER;
+    id_t* = INTEGER;
+    ino_t* = LONGINT;
+    key_t* = LONGINT;
+    mode_t* = INTEGER;
+    nlink_t* = SHORTINT;
+    off_t* = LONGINT;
+    pid_t* = INTEGER;
+    pthread_attr_t* = INTEGER;
+    pthread_barrier_t* = INTEGER;
+    pthread_barrierattr_t* = INTEGER;
+    pthread_cond_t* = INTEGER;
+    pthread_condattr_t* = INTEGER;
+    pthread_key_t* = INTEGER;
+    pthread_mutex_t* = INTEGER;
+    pthread_mutexattr_t* = INTEGER;
+    pthread_once_t* = RECORD [noalign] _: ARRAY [untagged] 8 OF BYTE END;
+    pthread_rwlock_t* = INTEGER;
+    pthread_rwlockattr_t* = INTEGER;
+    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/cygwin/486/Posix/Mod/Ctime.cp b/src/cpfront/cygwin/486/Posix/Mod/Ctime.cp
new file mode 100644 (file)
index 0000000..cb20c9f
--- /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* = 1000;
+
+  CONST
+    CLOCK_MONOTONIC* = 4;
+    CLOCK_PROCESS_CPUTIME_ID* = 2;
+    CLOCK_REALTIME* = 1;
+    CLOCK_THREAD_CPUTIME_ID* = 3;
+
+  CONST
+    TIMER_ABSTIME* = 4;
+
+  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/cygwin/486/Posix/Mod/Ctypes.cp b/src/cpfront/cygwin/486/Posix/Mod/Ctypes.cp
new file mode 100644 (file)
index 0000000..6cdc535
--- /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] 12 OF BYTE END;
+    Pvoid* = INTEGER;
+
+
+END PosixCtypes.
diff --git a/src/cpfront/cygwin/486/Posix/Mod/Cunistd.cp b/src/cpfront/cygwin/486/Posix/Mod/Cunistd.cp
new file mode 100644 (file)
index 0000000..30cb28c
--- /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* = -1;
+
+  CONST
+    _POSIX_ADVISORY_INFO* = 200809;
+    _POSIX_ASYNCHRONOUS_IO* = 200809;
+    _POSIX_BARRIERS* = 200809;
+    _POSIX_CHOWN_RESTRICTED* = 1;
+    _POSIX_CLOCK_SELECTION* = 200809;
+    _POSIX_CPUTIME* = 200809;
+    _POSIX_FSYNC* = 200809;
+    _POSIX_IPV6* = 200809;
+    _POSIX_JOB_CONTROL* = 1;
+    _POSIX_MAPPED_FILES* = 200809;
+    _POSIX_MEMLOCK* = -1;
+    _POSIX_MEMLOCK_RANGE* = 200809;
+    _POSIX_MEMORY_PROTECTION* = 200809;
+    _POSIX_MESSAGE_PASSING* = 200809;
+    _POSIX_MONOTONIC_CLOCK* = 200809;
+    _POSIX_NO_TRUNC* = 1;
+    _POSIX_PRIORITIZED_IO* = -1;
+    _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* = 200809;
+    _POSIX_THREAD_PRIO_INHERIT* = -1;
+    _POSIX_THREAD_PRIO_PROTECT* = -1;
+    _POSIX_THREAD_PRIORITY_SCHEDULING* = 200809;
+    _POSIX_THREAD_PROCESS_SHARED* = 200809;
+    _POSIX_THREAD_ROBUST_PRIO_INHERIT* = -1;
+    _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* = -1;
+    _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* = 200809;
+    _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* = 1;
+    _CS_POSIX_V7_ILP32_OFF32_LDFLAGS* = 2;
+    _CS_POSIX_V7_ILP32_OFF32_LIBS* = 3;
+    _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS* = 5;
+    _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS* = 6;
+    _CS_POSIX_V7_ILP32_OFFBIG_LIBS* = 7;
+    _CS_POSIX_V7_LP64_OFF64_CFLAGS* = 9;
+    _CS_POSIX_V7_LP64_OFF64_LDFLAGS* = 10;
+    _CS_POSIX_V7_LP64_OFF64_LIBS* = 11;
+    _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS* = 13;
+    _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS* = 14;
+    _CS_POSIX_V7_LPBIG_OFFBIG_LIBS* = 15;
+    _CS_POSIX_V7_THREADS_CFLAGS* = 18;
+    _CS_POSIX_V7_THREADS_LDFLAGS* = 19;
+    _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS* = 17;
+    _CS_V7_ENV* = 20;
+    _CS_POSIX_V6_ILP32_OFF32_CFLAGS* = 1;
+    _CS_POSIX_V6_ILP32_OFF32_LDFLAGS* = 2;
+    _CS_POSIX_V6_ILP32_OFF32_LIBS* = 3;
+    _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS* = 5;
+    _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS* = 6;
+    _CS_POSIX_V6_ILP32_OFFBIG_LIBS* = 7;
+    _CS_POSIX_V6_LP64_OFF64_CFLAGS* = 9;
+    _CS_POSIX_V6_LP64_OFF64_LDFLAGS* = 10;
+    _CS_POSIX_V6_LP64_OFF64_LIBS* = 11;
+    _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS* = 13;
+    _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS* = 14;
+    _CS_POSIX_V6_LPBIG_OFFBIG_LIBS* = 15;
+    _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS* = 17;
+    _CS_V6_ENV* = 20;
+
+  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* = 13;
+    _PC_ALLOC_SIZE_MIN* = 15;
+    _PC_ASYNC_IO* = 9;
+    _PC_CHOWN_RESTRICTED* = 6;
+    _PC_FILESIZEBITS* = 12;
+    _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* = 10;
+    _PC_REC_INCR_XFER_SIZE* = 16;
+    _PC_REC_MAX_XFER_SIZE* = 17;
+    _PC_REC_MIN_XFER_SIZE* = 18;
+    _PC_REC_XFER_ALIGN* = 19;
+    _PC_SYMLINK_MAX* = 14;
+    _PC_SYNC_IO* = 11;
+    _PC_TIMESTAMP_RESOLUTION* = 20;
+    _PC_VDISABLE* = 8;
+
+  CONST
+    _SC_2_C_BIND* = 108;
+    _SC_2_C_DEV* = 109;
+    _SC_2_CHAR_TERM* = 107;
+    _SC_2_FORT_DEV* = 110;
+    _SC_2_FORT_RUN* = 111;
+    _SC_2_LOCALEDEF* = 112;
+    _SC_2_PBS* = 113;
+    _SC_2_PBS_ACCOUNTING* = 114;
+    _SC_2_PBS_CHECKPOINT* = 115;
+    _SC_2_PBS_LOCATE* = 116;
+    _SC_2_PBS_MESSAGE* = 117;
+    _SC_2_PBS_TRACK* = 118;
+    _SC_2_SW_DEV* = 119;
+    _SC_2_UPE* = 120;
+    _SC_2_VERSION* = 121;
+    _SC_ADVISORY_INFO* = 54;
+    _SC_AIO_LISTIO_MAX* = 34;
+    _SC_AIO_MAX* = 35;
+    _SC_AIO_PRIO_DELTA_MAX* = 36;
+    _SC_ARG_MAX* = 0;
+    _SC_ASYNCHRONOUS_IO* = 21;
+    _SC_ATEXIT_MAX* = 55;
+    _SC_BARRIERS* = 56;
+    _SC_BC_BASE_MAX* = 57;
+    _SC_BC_DIM_MAX* = 58;
+    _SC_BC_SCALE_MAX* = 59;
+    _SC_BC_STRING_MAX* = 60;
+    _SC_CHILD_MAX* = 1;
+    _SC_CLK_TCK* = 2;
+    _SC_CLOCK_SELECTION* = 61;
+    _SC_COLL_WEIGHTS_MAX* = 62;
+    _SC_CPUTIME* = 63;
+    _SC_DELAYTIMER_MAX* = 37;
+    _SC_EXPR_NEST_MAX* = 64;
+    _SC_FSYNC* = 22;
+    _SC_GETGR_R_SIZE_MAX* = 50;
+    _SC_GETPW_R_SIZE_MAX* = 51;
+    _SC_HOST_NAME_MAX* = 65;
+    _SC_IOV_MAX* = 66;
+    _SC_IPV6* = 67;
+    _SC_JOB_CONTROL* = 5;
+    _SC_LINE_MAX* = 68;
+    _SC_LOGIN_NAME_MAX* = 52;
+    _SC_MAPPED_FILES* = 23;
+    _SC_MEMLOCK* = 24;
+    _SC_MEMLOCK_RANGE* = 25;
+    _SC_MEMORY_PROTECTION* = 26;
+    _SC_MESSAGE_PASSING* = 27;
+    _SC_MONOTONIC_CLOCK* = 69;
+    _SC_MQ_OPEN_MAX* = 13;
+    _SC_MQ_PRIO_MAX* = 14;
+    _SC_NGROUPS_MAX* = 3;
+    _SC_OPEN_MAX* = 4;
+    _SC_PAGE_SIZE* = 8;
+    _SC_PAGESIZE* = 8;
+    _SC_PRIORITIZED_IO* = 28;
+    _SC_PRIORITY_SCHEDULING* = 101;
+    _SC_RAW_SOCKETS* = 70;
+    _SC_RE_DUP_MAX* = 73;
+    _SC_READER_WRITER_LOCKS* = 71;
+    _SC_REALTIME_SIGNALS* = 29;
+    _SC_REGEXP* = 72;
+    _SC_RTSIG_MAX* = 15;
+    _SC_SAVED_IDS* = 6;
+    _SC_SEM_NSEMS_MAX* = 16;
+    _SC_SEM_VALUE_MAX* = 17;
+    _SC_SEMAPHORES* = 30;
+    _SC_SHARED_MEMORY_OBJECTS* = 31;
+    _SC_SHELL* = 74;
+    _SC_SIGQUEUE_MAX* = 18;
+    _SC_SPAWN* = 75;
+    _SC_SPIN_LOCKS* = 76;
+    _SC_SPORADIC_SERVER* = 77;
+    _SC_SS_REPL_MAX* = 78;
+    _SC_STREAM_MAX* = 100;
+    _SC_SYMLOOP_MAX* = 79;
+    _SC_SYNCHRONIZED_IO* = 32;
+    _SC_THREAD_ATTR_STACKADDR* = 43;
+    _SC_THREAD_ATTR_STACKSIZE* = 44;
+    _SC_THREAD_CPUTIME* = 80;
+    _SC_THREAD_DESTRUCTOR_ITERATIONS* = 53;
+    _SC_THREAD_KEYS_MAX* = 38;
+    _SC_THREAD_PRIO_INHERIT* = 46;
+    _SC_THREAD_PRIO_PROTECT* = 47;
+    _SC_THREAD_PRIORITY_SCHEDULING* = 45;
+    _SC_THREAD_PROCESS_SHARED* = 48;
+    _SC_THREAD_ROBUST_PRIO_INHERIT* = 122;
+    _SC_THREAD_ROBUST_PRIO_PROTECT* = 123;
+    _SC_THREAD_SAFE_FUNCTIONS* = 49;
+    _SC_THREAD_SPORADIC_SERVER* = 81;
+    _SC_THREAD_STACK_MIN* = 39;
+    _SC_THREAD_THREADS_MAX* = 40;
+    _SC_THREADS* = 42;
+    _SC_TIMEOUTS* = 82;
+    _SC_TIMER_MAX* = 19;
+    _SC_TIMERS* = 33;
+    _SC_TRACE* = 83;
+    _SC_TRACE_EVENT_FILTER* = 84;
+    _SC_TRACE_EVENT_NAME_MAX* = 85;
+    _SC_TRACE_INHERIT* = 86;
+    _SC_TRACE_LOG* = 87;
+    _SC_TRACE_NAME_MAX* = 88;
+    _SC_TRACE_SYS_MAX* = 89;
+    _SC_TRACE_USER_EVENT_MAX* = 90;
+    _SC_TTY_NAME_MAX* = 41;
+    _SC_TYPED_MEMORY_OBJECTS* = 91;
+    _SC_TZNAME_MAX* = 20;
+    _SC_V7_ILP32_OFF32* = 92;
+    _SC_V7_ILP32_OFFBIG* = 93;
+    _SC_V7_LP64_OFF64* = 94;
+    _SC_V7_LPBIG_OFFBIG* = 95;
+    _SC_V6_ILP32_OFF32* = 92;
+    _SC_V6_ILP32_OFFBIG* = 93;
+    _SC_V6_LP64_OFF64* = 94;
+    _SC_V6_LPBIG_OFFBIG* = 95;
+    _SC_VERSION* = 7;
+    _SC_XOPEN_CRYPT* = 96;
+    _SC_XOPEN_ENH_I18N* = 97;
+    _SC_XOPEN_REALTIME* = 99;
+    _SC_XOPEN_REALTIME_THREADS* = 102;
+    _SC_XOPEN_SHM* = 103;
+    _SC_XOPEN_STREAMS* = 104;
+    _SC_XOPEN_UNIX* = 105;
+    _SC_XOPEN_UUCP* = 124;
+    _SC_XOPEN_VERSION* = 106;
+
+  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/cygwin/486/Posix/Mod/Cwctype.cp b/src/cpfront/cygwin/486/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.
diff --git a/src/cpfront/cygwin/generic/Posix/Mod/Cmacro.cp b/src/cpfront/cygwin/generic/Posix/Mod/Cmacro.cp
new file mode 100644 (file)
index 0000000..629146e
--- /dev/null
@@ -0,0 +1,15 @@
+MODULE PosixCmacro;
+
+  IMPORT SYSTEM, PosixCerrno, PosixCsys_stat;
+
+  PROCEDURE errno* (): PosixCerrno.int;
+  BEGIN
+    RETURN PosixCerrno.__errno()[0]
+  END errno;
+
+  PROCEDURE stat* (IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: PosixCsys_stat.struct_stat): PosixCsys_stat.int;
+  BEGIN
+    RETURN PosixCsys_stat.stat(path, buf)
+  END stat;
+
+END PosixCmacro.
index 986425d7ce5ae66305c5713c3735afd21afedf72..5773b4ebcdedcbc3fe3124c6bb9fe428d8043569 100644 (file)
@@ -1,9 +1,9 @@
 MODULE Kernel;
 
-  IMPORT S := SYSTEM, stdlib := C99stdlib, stdio := C99stdio,
-    time := C99time, wctype := C99wctype, sysmman := C99sys_mman,
-    dlfcn := C99dlfcn, types := C99types, fcntl := C99fcntl,
-    unistd := C99unistd, signal := C99signal, setjmp := C99setjmp;
+  IMPORT S := SYSTEM, stdlib := PosixCstdlib, stdio := PosixCstdio,
+    time := PosixCtime, wctype := PosixCwctype, sysmman := PosixCsys_mman,
+    dlfcn := PosixCdlfcn, types := PosixCtypes, fcntl := PosixCfcntl,
+    unistd := PosixCunistd, signal := PosixCsignal, setjmp := PosixCsetjmp;
 
   (* init fpu? *)
   (* add signal blocking to avoid race conditions in Try/Trap/TrapHandler *)
index c7026a2b80c675e5f91bf7b457f1d94b1cad450d..e9a1e496f58ce8722786070a171718757c3aaa55 100644 (file)
@@ -6,6 +6,7 @@ MODULE HostFiles;
     macro := PosixCmacro, libgen := PosixClibgen, time := PosixCtime;
 
   (* !!! add buffer cache *)
+  (* !!! HostFiles64 must be base for HostFiles *)
 
   CONST
     closed = 0; new = 1; temp = 2; shared = 3; exclusive = 4;
@@ -22,7 +23,7 @@ MODULE HostFiles;
 
     File = POINTER TO RECORD (Files.File)
       state: INTEGER;
-      len: INTEGER;
+      len: INTEGER; (* !!! must be sysstat.off_t *)
       fd: unistd.int;
       ino: sysstat.ino_t;
       pathname: FullName
@@ -445,7 +446,7 @@ MODULE HostFiles;
                   IF res # -1 THEN
                     NEW(f); HostLang.HostToString(pathname, f.pathname, HostLang.pep383, err);
                     IF err = 0 THEN
-                      f.fd := fd; f.len := s.st_size; f.ino := s.st_ino;
+                      f.fd := fd; f.len := S.VAL((*!!!*)INTEGER, s.st_size); f.ino := s.st_ino;
                       IF isShared THEN f.state := shared
                       ELSE f.state := exclusive
                       END;
@@ -638,7 +639,7 @@ MODULE HostFiles;
                   END;
                   t.name := name$;
                   t.type := ""; (* ??? *)
-                  t.length := s.st_size;
+                  t.length := S.VAL((*!!!*)INTEGER, s.st_size);
                   tm := time.localtime(s.st_mtim.tv_sec);
                   IF tm # NIL THEN
                     t.modified.year := tm.tm_year + 1900;