### Compile POSIX bindings ###
###________________________###
- case "$_system" in
- linux)
- compile C99/Mod/types.cp \
- C99/Mod/sys_types.cp \
- C99/Mod/stdlib.cp C99/Mod/stdio.cp C99/Mod/unistd.cp \
- C99/Mod/dirent.cp C99/Mod/locale.cp C99/Mod/time.cp \
- C99/Mod/sys_stat.cp C99/Mod/fcntl.cp C99/Mod/errno.cp \
- C99/Mod/iconv.cp C99/Mod/wctype.cp C99/Mod/sys_mman.cp \
- C99/Mod/dlfcn.cp C99/Mod/signal.cp C99/Mod/setjmp.cp \
- C99/Mod/libgen.cp \
- C99/Mod/macro.cp
- ;;
- esac
+ if $_useposix; then
+ compile Posix/Mod/Ctypes.cp \
+ Posix/Mod/Csys_types.cp \
+ Posix/Mod/Cstdlib.cp Posix/Mod/Cstdio.cp Posix/Mod/Cunistd.cp \
+ Posix/Mod/Cdirent.cp Posix/Mod/Clocale.cp Posix/Mod/Ctime.cp \
+ Posix/Mod/Csys_stat.cp Posix/Mod/Cfcntl.cp Posix/Mod/Cerrno.cp \
+ Posix/Mod/Ciconv.cp Posix/Mod/Cwctype.cp Posix/Mod/Csys_mman.cp \
+ Posix/Mod/Cdlfcn.cp Posix/Mod/Csignal.cp Posix/Mod/Csetjmp.cp \
+ Posix/Mod/Clibgen.cp \
+ Posix/Mod/Cmacro.cp
+ fi
###^^^^^^^^^^^^^^^^^^^^^^^^^^^^###
### Compile BlackBox Framework ###
fi
link cpc486 \
- C99types C99macro \
+ PosixCtypes PosixCmacro \
Kernel Console Files Dates Math Strings Services Log \
HostLang HostConsole HostFiles HostDates DswLog $_debug_module \
DevCPM DevCPT DevCPS DevCPB DevCPP DevCPE DevCPH \
DswDocuments DswCompiler486Main
link cpl486 \
- C99types C99macro \
+ PosixCtypes PosixCmacro \
Kernel Console Files Math Strings Services Log \
HostLang HostConsole HostFiles DswLog $_debug_module \
Dev2LnkBase Dev2LnkChmod Dev2LnkLoad Dev2LnkWriteElf \
DswLinker486Main
link cpfront \
- C99types C99macro \
+ PosixCtypes PosixCmacro \
Kernel Console Files Dates Math Strings Services Log \
HostLang HostConsole HostFiles HostDates DswLog $_debug_module \
DevCPM DevCPT DevCPS DevCPB DevCPP DevCPE DevCPH \
+++ /dev/null
-MODULE C99dirent ['dirent.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99sys_types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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* = C99sys_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 C99dirent.
+++ /dev/null
-MODULE C99dlfcn ['dlfcn.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- CONST
- RTLD_LAZY* = 1;
- RTLD_NOW* = 2;
- RTLD_GLOBAL* = 256;
- RTLD_LOCAL* = 0;
-
- PROCEDURE [ccall] dlclose* (handle: C99types.Pvoid): int;
- PROCEDURE [ccall] dlerror* (): POINTER TO ARRAY [untagged] OF SHORTCHAR;
- PROCEDURE [ccall] dlopen* (IN [nil] filename: ARRAY [untagged] OF SHORTCHAR; flags: int): C99types.Pvoid;
- PROCEDURE [ccall] dlsym* (handle: C99types.Pvoid; IN symbol: ARRAY [untagged] OF SHORTCHAR): C99types.Pvoid;
-
-END C99dlfcn.
+++ /dev/null
-MODULE C99iconv ['iconv.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99sys_types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- iconv_t* = INTEGER;
-
- TYPE
- size_t* = C99sys_types.size_t;
-
- PROCEDURE [ccall] iconv* (cd: iconv_t; VAR [nil] inbuf: C99types.Pvoid; VAR inbytesleft: size_t; VAR [nil] outbuf: C99types.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 C99iconv.
+++ /dev/null
-MODULE C99libgen ['libgen.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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 C99libgen.
+++ /dev/null
-MODULE C99locale ['locale.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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 C99locale.
+++ /dev/null
-MODULE C99macro;
-
- IMPORT SYSTEM, C99errno, C99sys_stat;
-
- PROCEDURE errno* (): C99errno.int;
- BEGIN
- RETURN C99errno.__errno_location()[0]
- END errno;
-
- PROCEDURE stat* (IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: C99sys_stat.struct_stat): C99sys_stat.int;
- BEGIN
- RETURN C99sys_stat.stat(path, buf)
- END stat;
-
-END C99macro.
+++ /dev/null
-MODULE C99setjmp ['setjmp.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- jmp_buf* = ARRAY [untagged] 156 OF BYTE;
- sigjmp_buf* = ARRAY [untagged] 156 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 C99setjmp.
+++ /dev/null
-MODULE C99stdio ['stdio.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99sys_types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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* = C99sys_types.off_t;
- ssize_t* = C99sys_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: C99types.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: C99types.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 C99stdio.
+++ /dev/null
-MODULE C99stdlib ['stdlib.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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: C99types.Pvoid);
- PROCEDURE [ccall] getenv* (IN name: ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
- PROCEDURE [ccall] malloc* (size: size_t): C99types.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 C99stdlib.
+++ /dev/null
-MODULE C99sys_mman ['sys/mman.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99sys_types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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* = C99sys_types.mode_t;
- off_t* = C99sys_types.off_t;
- size_t* = C99sys_types.size_t;
-
- PROCEDURE [ccall] mlock* (addr: C99types.Pvoid; len: size_t): int;
- PROCEDURE [ccall] mlockall* (flags: int): int;
- PROCEDURE [ccall] mmap* (addr: C99types.Pvoid; len: size_t; prot, flags, fildes: int; off: off_t): C99types.Pvoid;
- PROCEDURE [ccall] mprotect* (addr: C99types.Pvoid; len: size_t; prot: int): int;
- PROCEDURE [ccall] msync* (addr: C99types.Pvoid; len: size_t; flags: int): int;
- PROCEDURE [ccall] munlock* (addr: C99types.Pvoid; len: size_t): int;
- PROCEDURE [ccall] munlockall* (): int;
- PROCEDURE [ccall] munmap* (addr: C99types.Pvoid; len: size_t): int;
- PROCEDURE [ccall] posix_madvise* (addr: C99types.Pvoid; len: size_t; advice: int): int;
- PROCEDURE [ccall] posix_mem_offset* (addr: C99types.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 C99sys_mman.
+++ /dev/null
-MODULE C99sys_types ['sys/types.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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 C99sys_types.
+++ /dev/null
-MODULE C99wctype ['wctype.h'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99locale;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- wint_t* = INTEGER;
- wctype_t* = INTEGER;
-
- TYPE
- wctrans_t* = INTEGER;
-
- TYPE
- locale_t* = C99locale.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 C99wctype.
--- /dev/null
+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.
--- /dev/null
+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.
-MODULE C99errno ['libc.so.6'];
+MODULE PosixCerrno ['errno.h'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types;
+ IMPORT SYSTEM, PosixCtypes;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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;
PROCEDURE [ccall] __errno_location* (): POINTER TO ARRAY [untagged] 1 OF int;
-END C99errno.
+END PosixCerrno.
-MODULE C99fcntl ['fcntl.h'];
+MODULE PosixCfcntl ['fcntl.h'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99sys_types;
+ IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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;
END;
TYPE
- mode_t* = C99sys_types.mode_t;
- off_t* = C99sys_types.off_t;
- pid_t* = C99sys_types.pid_t;
+ 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] posix_fadvise* (fd: int; offset, len: off_t; advice: int): int;
PROCEDURE [ccall] posix_fallocate* (fd: int; offset, len: off_t): int;
-END C99fcntl.
+END PosixCfcntl.
--- /dev/null
+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.
--- /dev/null
+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.
--- /dev/null
+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.
--- /dev/null
+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] 156 OF BYTE;
+ sigjmp_buf* = ARRAY [untagged] 156 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.
-MODULE C99signal ['signal.h'];
+MODULE PosixCsignal ['signal.h'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99sys_types, C99time;
+ IMPORT SYSTEM, PosixCtypes, PosixCsys_types, PosixCtime;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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_IGN* = 1;
TYPE
- pthread_t* = C99sys_types.pthread_t;
- pthread_attr_t* = C99sys_types.pthread_attr_t;
- size_t* = C99sys_types.size_t;
- uid_t* = C99sys_types.uid_t;
- pid_t* = C99sys_types.pid_t;
+ 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* = C99time.struct_timespec;
+ struct_timespec* = PosixCtime.struct_timespec;
TYPE
sig_atomic_t* = INTEGER;
Punion_sigval* = POINTER TO union_sigval;
union_sigval* ['union sigval'] = RECORD [union] (* 4 *)
sival_int*: int; (* 0+4 *)
- sival_ptr*: C99types.Pvoid; (* 0+4 *)
+ sival_ptr*: PosixCtypes.Pvoid; (* 0+4 *)
END;
CONST
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: C99types.Pvoid); (* 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;
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: C99types.Pvoid); (* 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 *)
MINSIGSTKSZ* = 2048;
SIGSTKSZ* = 8192;
+ CONST
+ __NGREG* = 19;
+
TYPE
- mcontext_t* = RECORD [noalign] _: ARRAY [untagged] 88 OF BYTE END;
+ greg_t* = INTEGER;
+
+ TYPE gregset_t* = ARRAY [untagged] __NGREG OF greg_t;
+
+ TYPE
+ Pstruct__libc_fpreg* = POINTER TO struct__libc_fpreg;
+ struct__libc_fpreg* ['struct _libc_fpreg'] = RECORD [noalign] (* 10 *)
+ significand*: INTEGER; (* 0+8 *)
+ exponent*: unsigned_short_int; (* 8+2 *)
+ END;
+
+ TYPE
+ Pstruct__libc_fpstate* = POINTER TO struct__libc_fpstate;
+ struct__libc_fpstate* ['struct _libc_fpstate'] = RECORD [noalign] (* 112 *)
+ cw*: unsigned_long_int; (* 0+4 *)
+ sw*: unsigned_long_int; (* 4+4 *)
+ tag*: unsigned_long_int; (* 8+4 *)
+ ipoff*: unsigned_long_int; (* 12+4 *)
+ cssel*: unsigned_long_int; (* 16+4 *)
+ dataoff*: unsigned_long_int; (* 20+4 *)
+ datasel*: unsigned_long_int; (* 24+4 *)
+ _st*: ARRAY [untagged] 8 OF struct__libc_fpreg; (* 28+80 *)
+ status*: unsigned_long_int; (* 108+4 *)
+ END;
+
+ TYPE fpregset_t* = Pstruct__libc_fpstate;
+
+ TYPE
+ Pmcontext_t* = POINTER TO mcontext_t;
+ mcontext_t* ['mcontext_t'] = RECORD [noalign] (* 88 *)
+ gregs*: gregset_t; (* 0+76 *)
+ fpregs*: fpregset_t; (* 76+4 *)
+ oldmask*: unsigned_long_int; (* 80+4 *)
+ cr2*: unsigned_long_int; (* 84+4 *)
+ END;
TYPE
Pucontext_t* = POINTER TO ucontext_t;
ucontext_t* ['ucontext_t'] = RECORD [noalign] (* 348 *)
+ uc_flags*: unsigned_long_int; (* 0+4 *)
uc_link*: Pucontext_t; (* 4+4 *)
uc_stack*: stack_t; (* 8+12 *)
uc_mcontext*: mcontext_t; (* 20+88 *)
uc_sigmask*: sigset_t; (* 108+128 *)
+ __fpregs_mem*: struct__libc_fpstate; (* 236+112 *)
END;
TYPE
Pstack_t* = POINTER TO stack_t;
stack_t* ['stack_t'] = RECORD [noalign] (* 12 *)
- ss_sp*: C99types.Pvoid; (* 0+4 *)
+ ss_sp*: PosixCtypes.Pvoid; (* 0+4 *)
ss_flags*: int; (* 4+4 *)
ss_size*: size_t; (* 8+4 *)
END;
si_errno*: int; (* 4+4 *)
si_code*: int; (* 8+4 *)
si_pid*: pid_t; (* 12+4 *)
- si_addr*: C99types.Pvoid; (* 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_signo*: int; (* 0+4 *)
si_errno*: int; (* 4+4 *)
si_code*: int; (* 8+4 *)
- info*: RECORD [union] (* 24 *)
- sigill*: RECORD [noalign] (* 16 *)
- si_addr*: C99types.Pvoid; (* 12+4 *)
- END; (* 0+16 *)
- sigfpe*: RECORD [noalign] (* 16 *)
- si_addr*: C99types.Pvoid; (* 12+4 *)
- END; (* 0+16 *)
- sigsegv*: RECORD [noalign] (* 16 *)
- si_addr*: C99types.Pvoid; (* 12+4 *)
- END; (* 0+16 *)
- sigbus*: RECORD [noalign] (* 16 *)
- si_addr*: C99types.Pvoid; (* 12+4 *)
- END; (* 0+16 *)
- sigchld*: RECORD [noalign] (* 24 *)
- si_pid*: pid_t; (* 12+4 *)
- si_uid*: uid_t; (* 16+4 *)
- si_status*: int; (* 20+4 *)
- END; (* 0+24 *)
- sigpoll*: RECORD [noalign] (* 16 *)
- si_band*: long; (* 12+4 *)
- END; (* 0+16 *)
- other*: RECORD [noalign] (* 24 *)
- si_value*: union_sigval; (* 20+4 *)
- END; (* 0+24 *)
- END; (* 12+24 *)
+ 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
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 C99signal.
+END PosixCsignal.
--- /dev/null
+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.
--- /dev/null
+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.
--- /dev/null
+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.
-MODULE C99sys_stat ['sys/stat.h'];
+MODULE PosixCsys_stat ['sys/stat.h'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99time, C99sys_types;
+ IMPORT SYSTEM, PosixCtypes, PosixCtime, PosixCsys_types;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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;
UTIME_OMIT* = 1073741822;
TYPE
- blkcnt_t* = C99sys_types.blkcnt_t;
- blksize_t* = C99sys_types.blksize_t;
- dev_t* = C99sys_types.dev_t;
- ino_t* = C99sys_types.ino_t;
- mode_t* = C99sys_types.mode_t;
- nlink_t* = C99sys_types.nlink_t;
- uid_t* = C99sys_types.uid_t;
- gid_t* = C99sys_types.gid_t;
- off_t* = C99sys_types.off_t;
- time_t* = C99sys_types.time_t;
+ 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* = C99time.struct_timespec;
+ struct_timespec* = PosixCtime.struct_timespec;
TYPE
Pstruct_stat* = POINTER TO struct_stat;
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 C99sys_stat.
+END PosixCsys_stat.
--- /dev/null
+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.
-MODULE C99time ['time.h'];
+MODULE PosixCtime ['time.h'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99sys_types, C99locale;
+ IMPORT SYSTEM, PosixCtypes, PosixCsys_types, PosixClocale;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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* = C99sys_types.clock_t;
- size_t* = C99sys_types.size_t;
- time_t* = C99sys_types.time_t;
- clockid_t* = C99sys_types.clockid_t;
- timer_t* = C99sys_types.timer_t;
- pid_t* = C99sys_types.pid_t;
+ 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* = C99locale.locale_t;
+ locale_t* = PosixClocale.locale_t;
TYPE
Pstruct_tm* = POINTER TO struct_tm;
PROCEDURE [ccall] timer_settime* (timerid: timer_t; flags: int; IN value: struct_itimerspec; VAR [nil] ovalue: struct_itimerspec): int;
PROCEDURE [ccall] tzset* ;
-END C99time.
+END PosixCtime.
-MODULE C99types;
+MODULE PosixCtypes;
(* generated by genposix.sh, do not modify *)
Pvoid* = INTEGER;
-END C99types.
+END PosixCtypes.
-MODULE C99unistd ['unistd.h'];
+MODULE PosixCunistd ['unistd.h'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99sys_types;
+ IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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;
_POSIX_VDISABLE* = 0;
TYPE
- size_t* = C99sys_types.size_t;
- ssize_t* = C99sys_types.ssize_t;
- uid_t* = C99sys_types.uid_t;
- gid_t* = C99sys_types.gid_t;
- off_t* = C99sys_types.off_t;
- pid_t* = C99sys_types.pid_t;
+ 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] 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: C99types.Pvoid; nbyte: size_t; offset: off_t): ssize_t;
- PROCEDURE [ccall] pwrite* (fildes: int; buf: C99types.Pvoid; nbyte: size_t; offset: off_t): ssize_t;
- PROCEDURE [ccall] read* (fildes: int; buf: C99types.Pvoid; nbyte: size_t): ssize_t;
+ 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] setsid* (): pid_t;
PROCEDURE [ccall] setuid* (uid: uid_t): int;
PROCEDURE [ccall] sleep* (seconds: unsigned): unsigned;
- PROCEDURE [ccall] swab* (from, to: C99types.Pvoid; n: ssize_t);
+ 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] 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: C99types.Pvoid; nbyte: size_t): int;
+ PROCEDURE [ccall] write* (fildes: int; buf: PosixCtypes.Pvoid; nbyte: size_t): int;
-END C99unistd.
+END PosixCunistd.
--- /dev/null
+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.
--- /dev/null
+MODULE PosixCmacro;
+
+ IMPORT SYSTEM, PosixCerrno, PosixCsys_stat;
+
+ PROCEDURE errno* (): PosixCerrno.int;
+ BEGIN
+ RETURN PosixCerrno.__errno_location()[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.
MODULE Kernel;
- IMPORT S := SYSTEM, stdlib := C99stdlib, stdio := C99stdio,
- time := C99time, wctype := C99wctype, sysmman := C99sys_mman,
- dlfcn := C99dlfcn, fcntl := C99fcntl, types := C99types,
- unistd := C99unistd, signal := C99signal, setjmp := C99setjmp;
+ IMPORT S := SYSTEM, stdlib := PosixCstdlib, stdio := PosixCstdio,
+ time := PosixCtime, wctype := PosixCwctype, sysmman := PosixCsys_mman,
+ dlfcn := PosixCdlfcn, fcntl := PosixCfcntl, types := PosixCtypes,
+ unistd := PosixCunistd, signal := PosixCsignal, setjmp := PosixCsetjmp;
(* init fpu? *)
(* add signal blocking to avoid race conditions in Try/Trap/TrapHandler *)
+++ /dev/null
-MODULE C99dirent ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99sys_types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- PDIR* = POINTER TO DIR;
- DIR = LIMITED RECORD [untagged] END;
-
- TYPE
- Pstruct_dirent* = POINTER TO struct_dirent;
- struct_dirent* = RECORD [noalign] (* 268 *)
- d_ino*: ino_t; (* 0+4 *)
- _____align0_____: ARRAY 7 OF BYTE;
- d_name*: ARRAY [untagged] 256 OF SHORTCHAR; (* 11+256 *)
- _____align1_____: ARRAY 1 OF BYTE;
- END;
-
- TYPE
- ino_t* = C99sys_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 C99dirent.
+++ /dev/null
-MODULE C99dlfcn ['libdl.so.2'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- CONST
- RTLD_LAZY* = 1;
- RTLD_NOW* = 2;
- RTLD_GLOBAL* = 256;
- RTLD_LOCAL* = 0;
-
- PROCEDURE [ccall] dlclose* (handle: C99types.Pvoid): int;
- PROCEDURE [ccall] dlerror* (): POINTER TO ARRAY [untagged] OF SHORTCHAR;
- PROCEDURE [ccall] dlopen* (IN [nil] filename: ARRAY [untagged] OF SHORTCHAR; flags: int): C99types.Pvoid;
- PROCEDURE [ccall] dlsym* (handle: C99types.Pvoid; IN symbol: ARRAY [untagged] OF SHORTCHAR): C99types.Pvoid;
-
-END C99dlfcn.
+++ /dev/null
-MODULE C99iconv ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99sys_types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- iconv_t* = INTEGER;
-
- TYPE
- size_t* = C99sys_types.size_t;
-
- PROCEDURE [ccall] iconv* (cd: iconv_t; VAR [nil] inbuf: C99types.Pvoid; VAR inbytesleft: size_t; VAR [nil] outbuf: C99types.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 C99iconv.
+++ /dev/null
-MODULE C99libgen ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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 C99libgen.
+++ /dev/null
-MODULE C99locale ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- Pstruct_lconv* = POINTER TO 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 C99locale.
+++ /dev/null
-MODULE C99macro;
-
- IMPORT SYSTEM, C99errno, C99sys_stat;
-
- PROCEDURE errno* (): C99errno.int;
- BEGIN
- RETURN C99errno.__errno_location()[0]
- END errno;
-
- PROCEDURE stat* (IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: C99sys_stat.struct_stat): C99sys_stat.int;
- BEGIN
- RETURN C99sys_stat.__xstat(C99sys_stat._STAT_VER, path, buf)
- END stat;
-
-END C99macro.
+++ /dev/null
-MODULE C99setjmp ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- jmp_buf* = ARRAY [untagged] 156 OF BYTE;
- sigjmp_buf* = ARRAY [untagged] 156 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* ['__sigsetjmp'] (VAR env: sigjmp_buf; savesigs: int): int;
-
-END C99setjmp.
+++ /dev/null
-MODULE C99stdio ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99sys_types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- PFILE* = POINTER TO FILE;
- FILE = LIMITED RECORD [untagged] END;
-
- TYPE
- fpos_t* = RECORD [noalign] _: ARRAY [untagged] 12 OF BYTE END;
-
- TYPE
- off_t* = C99sys_types.off_t;
- ssize_t* = C99sys_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: C99types.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: C99types.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 C99stdio.
+++ /dev/null
-MODULE C99stdlib ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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: C99types.Pvoid);
- PROCEDURE [ccall] getenv* (IN name: ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
- PROCEDURE [ccall] malloc* (size: size_t): C99types.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 C99stdlib.
+++ /dev/null
-MODULE C99sys_mman ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99sys_types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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* = C99sys_types.mode_t;
- off_t* = C99sys_types.off_t;
- size_t* = C99sys_types.size_t;
-
- PROCEDURE [ccall] mlock* (addr: C99types.Pvoid; len: size_t): int;
- PROCEDURE [ccall] mlockall* (flags: int): int;
- PROCEDURE [ccall] mmap* (addr: C99types.Pvoid; len: size_t; prot, flags, fildes: int; off: off_t): C99types.Pvoid;
- PROCEDURE [ccall] mprotect* (addr: C99types.Pvoid; len: size_t; prot: int): int;
- PROCEDURE [ccall] msync* (addr: C99types.Pvoid; len: size_t; flags: int): int;
- PROCEDURE [ccall] munlock* (addr: C99types.Pvoid; len: size_t): int;
- PROCEDURE [ccall] munlockall* (): int;
- PROCEDURE [ccall] munmap* (addr: C99types.Pvoid; len: size_t): int;
- PROCEDURE [ccall] posix_madvise* (addr: C99types.Pvoid; len: size_t; advice: int): int;
- PROCEDURE [ccall] posix_mem_offset* (addr: C99types.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 C99sys_mman.
+++ /dev/null
-MODULE C99sys_types ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.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 C99sys_types.
+++ /dev/null
-MODULE C99wctype ['libc.so.6'];
-
- (* generated by genposix.sh, do not modify *)
-
- IMPORT SYSTEM, C99types, C99locale;
-
- TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
-
- TYPE
- wint_t* = INTEGER;
- wctype_t* = INTEGER;
-
- TYPE
- wctrans_t* = INTEGER;
-
- TYPE
- locale_t* = C99locale.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 C99wctype.
--- /dev/null
+MODULE PosixCdirent ['libc.so.6'];
+
+ (* 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 = LIMITED RECORD [untagged] END;
+
+ TYPE
+ Pstruct_dirent* = POINTER TO struct_dirent;
+ struct_dirent* = RECORD [noalign] (* 268 *)
+ d_ino*: ino_t; (* 0+4 *)
+ _____align0_____: ARRAY 7 OF BYTE;
+ d_name*: ARRAY [untagged] 256 OF SHORTCHAR; (* 11+256 *)
+ _____align1_____: ARRAY 1 OF BYTE;
+ 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.
--- /dev/null
+MODULE PosixCdlfcn ['libdl.so.2'];
+
+ (* 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.
-MODULE C99errno ['errno.h'];
+MODULE PosixCerrno ['libc.so.6'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types;
+ IMPORT SYSTEM, PosixCtypes;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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;
PROCEDURE [ccall] __errno_location* (): POINTER TO ARRAY [untagged] 1 OF int;
-END C99errno.
+END PosixCerrno.
-MODULE C99fcntl ['libc.so.6'];
+MODULE PosixCfcntl ['libc.so.6'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99sys_types;
+ IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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;
END;
TYPE
- mode_t* = C99sys_types.mode_t;
- off_t* = C99sys_types.off_t;
- pid_t* = C99sys_types.pid_t;
+ 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] posix_fadvise* (fd: int; offset, len: off_t; advice: int): int;
PROCEDURE [ccall] posix_fallocate* (fd: int; offset, len: off_t): int;
-END C99fcntl.
+END PosixCfcntl.
--- /dev/null
+MODULE PosixCiconv ['libc.so.6'];
+
+ (* 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.
--- /dev/null
+MODULE PosixClibgen ['libc.so.6'];
+
+ (* 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.
--- /dev/null
+MODULE PosixClocale ['libc.so.6'];
+
+ (* 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 = 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.
--- /dev/null
+MODULE PosixCsetjmp ['libc.so.6'];
+
+ (* 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] 156 OF BYTE;
+ sigjmp_buf* = ARRAY [untagged] 156 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* ['__sigsetjmp'] (VAR env: sigjmp_buf; savesigs: int): int;
+
+END PosixCsetjmp.
-MODULE C99signal ['libc.so.6'];
+MODULE PosixCsignal ['libc.so.6'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99sys_types, C99time;
+ IMPORT SYSTEM, PosixCtypes, PosixCsys_types, PosixCtime;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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_IGN* = 1;
TYPE
- pthread_t* = C99sys_types.pthread_t;
- pthread_attr_t* = C99sys_types.pthread_attr_t;
- size_t* = C99sys_types.size_t;
- uid_t* = C99sys_types.uid_t;
- pid_t* = C99sys_types.pid_t;
+ 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* = C99time.struct_timespec;
+ struct_timespec* = PosixCtime.struct_timespec;
TYPE
sig_atomic_t* = INTEGER;
Punion_sigval* = POINTER TO union_sigval;
union_sigval* = RECORD [union] (* 4 *)
sival_int*: int; (* 0+4 *)
- sival_ptr*: C99types.Pvoid; (* 0+4 *)
+ sival_ptr*: PosixCtypes.Pvoid; (* 0+4 *)
END;
CONST
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: C99types.Pvoid); (* 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 *)
TYPE
Pstack_t* = POINTER TO stack_t;
stack_t* = RECORD [noalign] (* 12 *)
- ss_sp*: C99types.Pvoid; (* 0+4 *)
+ ss_sp*: PosixCtypes.Pvoid; (* 0+4 *)
ss_flags*: int; (* 4+4 *)
ss_size*: size_t; (* 8+4 *)
END;
si_code*: int; (* 8+4 *)
info*: RECORD [union] (* 12 *)
sigill*: RECORD [noalign] (* 4 *)
- si_addr*: C99types.Pvoid; (* 0+4 *)
+ si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
END; (* 0+4 *)
sigfpe*: RECORD [noalign] (* 4 *)
- si_addr*: C99types.Pvoid; (* 0+4 *)
+ si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
END; (* 0+4 *)
sigsegv*: RECORD [noalign] (* 4 *)
- si_addr*: C99types.Pvoid; (* 0+4 *)
+ si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
END; (* 0+4 *)
sigbus*: RECORD [noalign] (* 4 *)
- si_addr*: C99types.Pvoid; (* 0+4 *)
+ si_addr*: PosixCtypes.Pvoid; (* 0+4 *)
END; (* 0+4 *)
sigchld*: RECORD [noalign] (* 12 *)
si_pid*: pid_t; (* 0+4 *)
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 C99signal.
+END PosixCsignal.
--- /dev/null
+MODULE PosixCstdio ['libc.so.6'];
+
+ (* 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 = 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.
--- /dev/null
+MODULE PosixCstdlib ['libc.so.6'];
+
+ (* 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.
--- /dev/null
+MODULE PosixCsys_mman ['libc.so.6'];
+
+ (* 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.
-MODULE C99sys_stat ['libc.so.6'];
+MODULE PosixCsys_stat ['libc.so.6'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99time, C99sys_types;
+ IMPORT SYSTEM, PosixCtypes, PosixCtime, PosixCsys_types;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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;
UTIME_OMIT* = 1073741822;
TYPE
- blkcnt_t* = C99sys_types.blkcnt_t;
- blksize_t* = C99sys_types.blksize_t;
- dev_t* = C99sys_types.dev_t;
- ino_t* = C99sys_types.ino_t;
- mode_t* = C99sys_types.mode_t;
- nlink_t* = C99sys_types.nlink_t;
- uid_t* = C99sys_types.uid_t;
- gid_t* = C99sys_types.gid_t;
- off_t* = C99sys_types.off_t;
- time_t* = C99sys_types.time_t;
+ 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* = C99time.struct_timespec;
+ struct_timespec* = PosixCtime.struct_timespec;
TYPE
Pstruct_stat* = POINTER TO struct_stat;
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 C99sys_stat.
+END PosixCsys_stat.
--- /dev/null
+MODULE PosixCsys_types ['libc.so.6'];
+
+ (* 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.
-MODULE C99time ['librt.so.1'];
+MODULE PosixCtime ['librt.so.1'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99sys_types, C99locale;
+ IMPORT SYSTEM, PosixCtypes, PosixCsys_types, PosixClocale;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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* = C99sys_types.clock_t;
- size_t* = C99sys_types.size_t;
- time_t* = C99sys_types.time_t;
- clockid_t* = C99sys_types.clockid_t;
- timer_t* = C99sys_types.timer_t;
- pid_t* = C99sys_types.pid_t;
+ 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* = C99locale.locale_t;
+ locale_t* = PosixClocale.locale_t;
TYPE
Pstruct_tm* = POINTER TO struct_tm;
PROCEDURE [ccall] timer_settime* (timerid: timer_t; flags: int; IN value: struct_itimerspec; VAR [nil] ovalue: struct_itimerspec): int;
PROCEDURE [ccall] tzset* ;
-END C99time.
+END PosixCtime.
-MODULE C99types;
+MODULE PosixCtypes;
(* generated by genposix.sh, do not modify *)
+IMPORT SYSTEM;
+
TYPE
char* = BYTE;
signed_char* = BYTE;
Pvoid* = INTEGER;
-END C99types.
+END PosixCtypes.
-MODULE C99unistd ['libc.so.6'];
+MODULE PosixCunistd ['libc.so.6'];
(* generated by genposix.sh, do not modify *)
- IMPORT SYSTEM, C99types, C99sys_types;
+ IMPORT SYSTEM, PosixCtypes, PosixCsys_types;
TYPE
- char* = C99types.char;
- signed_char* = C99types.signed_char;
- unsigned_char* = C99types.unsigned_char;
- short* = C99types.short;
- short_int* = C99types.short_int;
- signed_short* = C99types.signed_short;
- signed_short_int* = C99types.signed_short_int;
- unsigned_short* = C99types.unsigned_short;
- unsigned_short_int* = C99types.unsigned_short_int;
- int* = C99types.int;
- signed* = C99types.signed;
- signed_int* = C99types.signed_int;
- unsigned* = C99types.unsigned;
- unsigned_int* = C99types.unsigned_int;
- long* = C99types.long;
- long_int* = C99types.long_int;
- signed_long* = C99types.signed_long;
- signed_long_int* = C99types.signed_long_int;
- unsigned_long* = C99types.unsigned_long;
- unsigned_long_int* = C99types.unsigned_long_int;
- long_long* = C99types.long_long;
- long_long_int* = C99types.long_long_int;
- signed_long_long* = C99types.signed_long_long;
- signed_long_long_int* = C99types.signed_long_long_int;
- unsigned_long_long* = C99types.unsigned_long_long;
- unsigned_long_long_int* = C99types.unsigned_long_long_int;
- float* = C99types.float;
- double* = C99types.double;
- long_double* = C99types.long_double;
+ 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;
_POSIX_VDISABLE* = 0;
TYPE
- size_t* = C99sys_types.size_t;
- ssize_t* = C99sys_types.ssize_t;
- uid_t* = C99sys_types.uid_t;
- gid_t* = C99sys_types.gid_t;
- off_t* = C99sys_types.off_t;
- pid_t* = C99sys_types.pid_t;
+ 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] 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: C99types.Pvoid; nbyte: size_t; offset: off_t): ssize_t;
- PROCEDURE [ccall] pwrite* (fildes: int; buf: C99types.Pvoid; nbyte: size_t; offset: off_t): ssize_t;
- PROCEDURE [ccall] read* (fildes: int; buf: C99types.Pvoid; nbyte: size_t): ssize_t;
+ 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] setsid* (): pid_t;
PROCEDURE [ccall] setuid* (uid: uid_t): int;
PROCEDURE [ccall] sleep* (seconds: unsigned): unsigned;
- PROCEDURE [ccall] swab* (from, to: C99types.Pvoid; n: ssize_t);
+ 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] 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: C99types.Pvoid; nbyte: size_t): int;
+ PROCEDURE [ccall] write* (fildes: int; buf: PosixCtypes.Pvoid; nbyte: size_t): int;
-END C99unistd.
+END PosixCunistd.
--- /dev/null
+MODULE PosixCwctype ['libc.so.6'];
+
+ (* 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.
--- /dev/null
+MODULE PosixCmacro;
+
+ IMPORT SYSTEM, PosixCerrno, PosixCsys_stat;
+
+ PROCEDURE errno* (): PosixCerrno.int;
+ BEGIN
+ RETURN PosixCerrno.__errno_location()[0]
+ END errno;
+
+ PROCEDURE stat* (IN path: ARRAY [untagged] OF SHORTCHAR; VAR buf: PosixCsys_stat.struct_stat): PosixCsys_stat.int;
+ BEGIN
+ RETURN PosixCsys_stat.__xstat(PosixCsys_stat._STAT_VER, path, buf)
+ END stat;
+
+END PosixCmacro.
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 *)
MODULE HostConsole;
- IMPORT S := SYSTEM, Console, HostLang, unistd := C99unistd;
+ IMPORT S := SYSTEM, Console, HostLang, unistd := PosixCunistd;
TYPE
Directory = POINTER TO RECORD (Console.Directory) END;
MODULE HostDates;
- IMPORT Dates, Strings, time := C99time;
+ IMPORT Dates, Strings, time := PosixCtime;
(* add localization? *)
MODULE HostFiles;
- IMPORT S := SYSTEM, Kernel, HostLang, Files, Log, stdlib := C99stdlib,
- unistd := C99unistd, dirent := C99dirent, fcntl := C99fcntl,
- sysstat := C99sys_stat, stdio := C99stdio, errno := C99errno,
- macro := C99macro, libgen := C99libgen, time := C99time;
+ IMPORT S := SYSTEM, Kernel, HostLang, Files, Log, stdlib := PosixCstdlib,
+ unistd := PosixCunistd, dirent := PosixCdirent, fcntl := PosixCfcntl,
+ sysstat := PosixCsys_stat, stdio := PosixCstdio, errno := PosixCerrno,
+ macro := PosixCmacro, libgen := PosixClibgen, time := PosixCtime;
(* !!! add buffer cache *)
MODULE HostLang;
- IMPORT S := SYSTEM, Kernel, stdlib := C99stdlib, locale := C99locale,
- iconv := C99iconv, errno := C99errno, macro := C99macro;
+ IMPORT S := SYSTEM, Kernel, stdlib := PosixCstdlib, locale := PosixClocale,
+ iconv := PosixCiconv, errno := PosixCerrno, macro := PosixCmacro;
CONST
maxLen = 32;