unix module fixes for freebsd; -- noch

This commit is contained in:
norayr 2015-05-20 16:20:39 +00:00
parent ffe9476fd2
commit d749f3e8e9
2 changed files with 46 additions and 73 deletions

View file

@ -154,81 +154,55 @@ CONST sigsetarrlength = 1024 / 8 * SIZE(LONGINT);
TYPE TYPE
(* bits/sigset.h
_SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
1024 / 8*8 = 16
1024 / 8*4 = 32
*)
sigsett* = RECORD
val : ARRAY 16 OF LONGINT (* 32 for 32 bit *)
(*val : ARRAY sigsetarrlength OF LONGINT *)
END;
JmpBuf* = RECORD JmpBuf* = RECORD
(* macosx darwin 64bit, cpp /usr/include/setjmp.h jmpbuf: ARRAY 12 OF LONGINT;
typedef int jmp_buf[((9 * 2) + 3 + 16)]; END ;
*)
(*bx*, si*, di*, bp*, sp*, pc*: LONGINT;*)
(* bits/setjmp.h sets up longer array in GNU libc *)
(* (*
# if __WORDSIZE == 64 from output of cpp /usr/include/sys/stat.h
typedef long int __jmp_buf[8];
# else struct stat {
typedef int __jmp_buf[6]; __dev_t st_dev;
# endif ino_t st_ino;
*) mode_t st_mode;
(*bx*, si*, di*, bp*, sp*, pc*, ki*, ku*: LONGINT;*) nlink_t st_nlink;
f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, uid_t st_uid;
f16, f17, f18, f19, f20, f21, f22, f23, f24, f25, f26, f27, f28, f29, gid_t st_gid;
f30, f31, f32, f33, f34, f35, f36: INTEGER; __dev_t st_rdev;
(* setjmp.h struct timespec st_atim;
/* Calling environment, plus possibly a saved signal mask. */ struct timespec st_mtim;
struct __jmp_buf_tag struct timespec st_ctim;
{ off_t st_size;
/* NOTE: The machine-dependent definitions of `__sigsetjmp' blkcnt_t st_blocks;
assume that a `jmp_buf' begins with a `__jmp_buf' and that blksize_t st_blksize;
`__mask_was_saved' follows it. Do not move these members fflags_t st_flags;
or add others before it. */ __uint32_t st_gen;
__jmp_buf __jmpbuf; /* Calling environment. */ __int32_t st_lspare;
int __mask_was_saved; /* Saved the signal mask? */ struct timespec st_birthtim;
__sigset_t __saved_mask; /* Saved signal mask. */ # 148 "/usr/include/sys/stat.h"
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
}; };
*) sizes on freebsd 64 bit
(*maskWasSaved*, savedMask*: LONGINT;*) short int 2
(*maskWasSaved*: INTEGER; *) int 4
(* long 8
# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) long int 8
typedef struct size_t 8
{ dev_t 4
unsigned long int __val[_SIGSET_NWORDS]; ino_t 4
} __sigset_t; mode_t 2
nlink_t 2
*) uid_t 4
(*savedMask*: sigsett;*) gid_t 4
END ; off_t 8
(* blksize_t 4
Status* = RECORD (* struct stat *) blkcnt_t 8
dev* : INTEGER; (* dev_t 4 *) time_t 8
mode*: SHORTINT; mode1*: SHORTINT; (* mode_t 2 *) fflags_t 4
nlink* : SHORTINT; nlink1*: SHORTINT; (* nlink_t 2 *) __uint32_t 4
ino* : LONGINT; (* __darwin_ino64_t 8 *) __int32_t 4
uid*, gid*: INTEGER; (* uid_t, gid_t 4 *)
rdev*: INTEGER; (* dev_t 4 *)
atime* : LONGINT; atimences* : LONGINT; (* struct timespec 16 *)
mtime* : LONGINT; mtimences* : LONGINT; (* struct timespec 16 *)
ctime* : LONGINT; ctimences* : LONGINT; (* struct timespec 16 *)
birthtime* : LONGINT; birthtimences* : LONGINT; (* struct timespec 16 *)
size*: LONGINT; (* off_t 8 *)
blocks* : LONGINT;
blksize* : INTEGER;
flags* : INTEGER;
gen* : INTEGER;
lspare* : INTEGER;
qspare*, qspare1*: LONGINT;
END ;
*) *)
Status* = RECORD (* struct stat *) Status* = RECORD (* struct stat *)
dev* : INTEGER; (* dev_t 4 *) dev* : INTEGER; (* dev_t 4 *)
@ -247,7 +221,6 @@ typedef struct
gen* : INTEGER; gen* : INTEGER;
lspare* : INTEGER; lspare* : INTEGER;
birthtime* : LONGINT; birthtimences* : LONGINT; (* struct timespec 16 *) birthtime* : LONGINT; birthtimences* : LONGINT; (* struct timespec 16 *)
qspare*, qspare1*: INTEGER;
END ; END ;

View file

@ -1,5 +1,5 @@
MODULE prf; MODULE prf;
CONST prefix* = "/Users/noch/local"; CONST prefix* = "/opt";
END prf. END prf.