ossysc.inc 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. {
  2. $Id$
  3. Copyright (c) 2002 by Marco van de Voort
  4. The base *BSD syscalls required to implement the system unit. These
  5. are aliased for use in other units (to avoid poluting the system units
  6. interface)
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. ****************************************************************************
  13. }
  14. {$ifdef uselibc}
  15. {$Linklib c}
  16. // Out of date atm.
  17. { var
  18. Errno : cint; external name 'errno';}
  19. function Fptime(tloc:ptime_t): time_t; cdecl; external name 'time';
  20. function Fpopen(const path: pchar; flags : cint; mode: mode_t):cint; cdecl; external name 'open';
  21. function Fpclose(fd : cint): cint; cdecl; external name 'close';
  22. function Fplseek(fd : cint; offset : off_t; whence : cint): off_t; cdecl; external name 'lseek';
  23. function Fpread(fd: cint; buf: pchar; nbytes : size_t): ssize_t; cdecl; external name 'read';
  24. function Fpwrite(fd: cint;const buf:pchar; nbytes : size_t): ssize_t; cdecl; external name 'write';
  25. function Fpunlink(const path: pchar): cint; cdecl; external name 'unlink';
  26. function Fprename(const old : pchar; const newpath: pchar): cint; cdecl;external name 'rename';
  27. function Fpstat(const path: pchar; var buf : stat): cint; cdecl; external name 'stat';
  28. function Fpchdir(const path : pchar): cint; cdecl; external name 'chdir';
  29. function Fpmkdir(const path : pchar; mode: mode_t):cint; cdecl; external name 'mkdir';
  30. function Fprmdir(const path : pchar): cint; cdecl; external name 'rmdir';
  31. function Fpopendir(const dirname : pchar): pdir; cdecl; external name 'opendir';
  32. function Fpreaddir(var dirp : dir) : pdirent;cdecl; external name 'readdir';
  33. function Fpclosedir(var dirp : dir): cint; cdecl; external name 'closedir';
  34. procedure Fpexit(status : cint); cdecl; external name '_exit';
  35. function Fpsigaction(sig: cint; var act : sigactionrec; var oact : sigactionrec): cint; cdecl; external name 'sigaction';
  36. function Fpftruncate(fd : cint; flength : off_t): cint; cdecl; external name 'ftruncate';
  37. function Fprename(const old : pchar; const newpath: pchar): cint; cdecl;external name 'rename';
  38. function Fpfstat(fd : cint; var sb : stat): cint; cdecl; external name 'fstat';
  39. function Fpfork : pid_t; cdecl; external name 'fork';
  40. function Fpexecve(const path : pchar; const argv : ppchar; const envp: ppchar): cint; cdecl; external name 'execve';
  41. function Fpwaitpid(pid : pid_t; var stat_loc : cint; options: cint): pid_t; cdecl; external name 'waitpid';
  42. function Fpaccess(const pathname : pchar; amode : cint): cint; cdecl; external name 'access';
  43. function Fpuname(var name: utsname): cint; cdecl; external name 'uname';
  44. function FpDup(oldd:cint):cint; cdecl; external name 'dup';
  45. function FpDup2(oldd:cint;newd:cint):cint; cdecl; external name 'dup2';
  46. {$else}
  47. {*****************************************************************************
  48. --- Main:The System Call Self ---
  49. *****************************************************************************}
  50. { The system designed for Linux can't be used for *BSD so easily, since
  51. *BSD pushes arguments, instead of loading them to registers.}
  52. // Var ErrNo : Longint;
  53. {$I syscallh.inc}
  54. {$I syscall.inc}
  55. {$I sysnr.inc}
  56. {$I bunxmacr.inc}
  57. {$I ostypes.inc}
  58. // Should be moved to a FreeBSD specific unit in the future.
  59. function Fptime( tloc:ptime): time_t; [public, alias : 'FPC_SYSC_TIME'];
  60. VAR tv : timeval;
  61. tz : timezone;
  62. retval : longint;
  63. begin
  64. Retval:=do_syscall(syscall_nr_gettimeofday,TSysParam(@tv),TSysParam(@tz));
  65. If retval=-1 then
  66. Fptime:=-1
  67. else
  68. Begin
  69. If Assigned(tloc) Then
  70. TLoc^:=tv.tv_sec;
  71. Fptime:=tv.tv_sec;
  72. End;
  73. End;
  74. {*****************************************************************************
  75. --- File:File handling related calls ---
  76. *****************************************************************************}
  77. function Fpopen(path: pchar; flags : cint; mode: mode_t):cint; [public, alias : 'FPC_SYSC_OPEN'];
  78. Begin
  79. Fpopen:=do_syscall(syscall_nr_open,TSysParam(path),TSysParam(flags),TSysParam(mode));
  80. End;
  81. function Fpclose(fd : cint): cint;
  82. begin
  83. Fpclose:=do_syscall(syscall_nr_close,fd);
  84. end;
  85. {$if powerpc and NetBSD}
  86. {$i sysofft.inc} // odd ball calling convention.
  87. {$else}
  88. // generic versions.
  89. function Fplseek(fd : cint; offset : off_t; whence : cint): off_t; [public, alias : 'FPC_SYSC_LSEEK'];
  90. {
  91. this one is special for the return value being 64-bit..
  92. hi/lo offset not yet tested.
  93. NetBSD: ok, but implicit return value in edx:eax
  94. FreeBSD: same implementation as NetBSD.
  95. }
  96. begin
  97. Fplseek:=do_syscall(syscall_nr___syscall,syscall_nr_lseek,0,TSysParam(fd),0,lo(Offset),{0} hi(offset),Whence);
  98. end;
  99. function Fpftruncate(fd : cint; flength : off_t): cint; [public, alias : 'FPC_SYSC_FTRUNCATE'];
  100. begin
  101. Fpftruncate:=Do_syscall(syscall_nr___syscall,syscall_nr_ftruncate,0,fd,0,lo(flength),hi(flength));
  102. end;
  103. Function Fpmmap(adr,len,prot,flags,fdes,off:longint):longint; [public, alias : 'FPC_SYSC_MMAP'];
  104. begin
  105. Fpmmap:=do_syscall(syscall_nr_mmap,Adr,Len,Prot,Flags,fdes,{$ifdef powerpc} 0,{$endif}off{$ifdef i386},0{$endif});
  106. end;
  107. {$endif}
  108. function Fpread(fd: cint; buf: pchar; nbytes : size_t): ssize_t; [public, alias : 'FPC_SYSC_READ'];
  109. begin
  110. Fpread:=do_syscall(syscall_nr_read,Fd,TSysParam(buf),nbytes);
  111. end;
  112. function Fpwrite(fd: cint;buf:pchar; nbytes : size_t): ssize_t; [public, alias : 'FPC_SYSC_WRITE'];
  113. begin
  114. Fpwrite:=do_syscall(syscall_nr_write,Fd,TSysParam(buf),nbytes);
  115. end;
  116. function Fpunlink(const path: pchar): cint; [public, alias : 'FPC_SYSC_UNLINK'];
  117. begin
  118. Fpunlink:=do_syscall(syscall_nr_unlink,TSysParam(path));
  119. end;
  120. function Fprename(old : pchar; newpath: pchar): cint; [public, alias : 'FPC_SYSC_RENAME'];
  121. begin
  122. Fprename:=do_syscall(syscall_nr_rename,TSysParam(old),TSysParam(newpath));
  123. end;
  124. function Fpstat(const path: pchar; var buf : stat):cint; [public, alias : 'FPC_SYSC_STAT'];
  125. begin
  126. Fpstat:=do_syscall(syscall_nr_stat,TSysParam(path),TSysParam(@buf));
  127. end;
  128. {*****************************************************************************
  129. --- Directory:Directory related calls ---
  130. *****************************************************************************}
  131. function Fpchdir(path : pchar): cint; [public, alias : 'FPC_SYSC_CHDIR'];
  132. begin
  133. Fpchdir:=do_syscall(syscall_nr_chdir,TSysParam(path));
  134. end;
  135. function Fpmkdir(path : pchar; mode: mode_t):cint; [public, alias : 'FPC_SYSC_MKDIR'];
  136. begin {Mode is 16-bit on F-BSD 4!}
  137. Fpmkdir:=do_syscall(syscall_nr_mkdir,TSysParam(path),mode);
  138. end;
  139. function Fprmdir(path : pchar): cint; [public, alias : 'FPC_SYSC_RMDIR'];
  140. begin
  141. Fprmdir:=do_syscall(syscall_nr_rmdir,TSysParam(path));
  142. end;
  143. {$ifndef NewReaddir}
  144. const DIRBLKSIZ=1024;
  145. function Fpopendir(dirname : pchar): pdir; [public, alias : 'FPC_SYSC_OPENDIR'];
  146. var
  147. fd:longint;
  148. st:stat;
  149. ptr:pdir;
  150. begin
  151. Fpopendir:=nil;
  152. if Fpstat(dirname,st)<0 then
  153. exit;
  154. { Is it a dir ? }
  155. if not((st.st_mode and $f000)=$4000)then
  156. begin
  157. errno:=ESysENOTDIR;
  158. exit
  159. end;
  160. { Open it}
  161. fd:=Fpopen(dirname,O_RDONLY,438);
  162. if fd<0 then
  163. Begin
  164. Errno:=-1;
  165. exit;
  166. End;
  167. new(ptr);
  168. if ptr=nil then
  169. Begin
  170. Errno:=1;
  171. exit;
  172. End;
  173. Getmem(ptr^.dd_buf,2*DIRBLKSIZ);
  174. if ptr^.dd_buf=nil then
  175. exit;
  176. ptr^.dd_fd:=fd;
  177. ptr^.dd_loc:=-1;
  178. ptr^.dd_rewind:=longint(ptr^.dd_buf);
  179. ptr^.dd_size:=0;
  180. // ptr^.dd_max:=sizeof(ptr^.dd_buf^);
  181. Fpopendir:=ptr;
  182. end;
  183. function Fpclosedir(dirp : pdir): cint; [public, alias : 'FPC_SYSC_CLOSEDIR'];
  184. begin
  185. Fpclosedir:=Fpclose(dirp^.dd_fd);
  186. Freemem(dirp^.dd_buf);
  187. dispose(dirp);
  188. end;
  189. function Fpreaddir(dirp : pdir) : pdirent; [public, alias : 'FPC_SYSC_READDIR'];
  190. {Different from Linux, Readdir on BSD is based on Getdents, due to the
  191. missing of the readdir syscall.
  192. Getdents requires the buffer to be larger than the blocksize.
  193. This usually the sectorsize =512 bytes, but maybe tapedrives and harddisks
  194. with blockmode have this higher?}
  195. function readbuffer:longint;
  196. var retval :longint;
  197. begin
  198. Retval:=do_syscall(syscall_nr_getdents,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)});
  199. dirp^.dd_rewind:=TSysParam(dirp^.dd_buf);
  200. if retval=0 then
  201. begin
  202. dirp^.dd_rewind:=0;
  203. dirp^.dd_loc:=0;
  204. end
  205. else
  206. dirP^.dd_loc:=retval;
  207. readbuffer:=retval;
  208. end;
  209. var
  210. FinalEntry : pdirent;
  211. novalid : boolean;
  212. Reclen : Longint;
  213. CurEntry : PDirent;
  214. begin
  215. if (dirp^.dd_buf=nil) or (dirp^.dd_loc=0) THEN
  216. exit(nil);
  217. if (dirp^.dd_loc=-1) OR {First readdir on this pdir. Initial fill of buffer}
  218. (dirp^.dd_rewind>=(longint(dirp^.dd_buf)+dirblksiz)) then {no more entries left?}
  219. Begin
  220. if readbuffer=0 then {succesful read?}
  221. Exit(NIL); {No more data}
  222. End;
  223. FinalEntry:=NIL;
  224. CurEntry:=nil;
  225. repeat
  226. novalid:=false;
  227. CurEntry:=pdirent(dirp^.dd_rewind);
  228. RecLen:=CurEntry^.d_reclen;
  229. if RecLen<>0 Then
  230. begin {valid direntry?}
  231. if CurEntry^.d_fileno<>0 then
  232. FinalEntry:=CurEntry;
  233. inc(dirp^.dd_rewind,Reclen);
  234. end
  235. else
  236. begin {block entirely searched or reclen=0}
  237. Novalid:=True;
  238. if dirp^.dd_loc<>0 THEN {blocks left?}
  239. if readbuffer()<>0 then {succesful read?}
  240. novalid:=false;
  241. end;
  242. until (FinalEntry<>nil) or novalid;
  243. If novalid then
  244. FinalEntry:=nil;
  245. FpReadDir:=FinalEntry;
  246. end;
  247. {$endif}
  248. {*****************************************************************************
  249. --- Process:Process & program handling - related calls ---
  250. *****************************************************************************}
  251. procedure Fpexit(status : cint); [public, alias : 'FPC_SYSC_EXIT'];
  252. begin
  253. do_syscall(syscall_nr_exit,status);
  254. end;
  255. {
  256. Change action of process upon receipt of a signal.
  257. Signum specifies the signal (all except SigKill and SigStop).
  258. If Act is non-nil, it is used to specify the new action.
  259. If OldAct is non-nil the previous action is saved there.
  260. }
  261. function Fpsigaction(sig: cint; var act : sigactionrec; var oact : sigactionrec): cint; [public, alias : 'FPC_SYSC_SIGACTION'];
  262. {
  263. Change action of process upon receipt of a signal.
  264. Signum specifies the signal (all except SigKill and SigStop).
  265. If Act is non-nil, it is used to specify the new action.
  266. If OldAct is non-nil the previous action is saved there.
  267. }
  268. begin
  269. do_syscall(syscall_nr_sigaction,TSysParam(sig),TSysParam(@act),TSysParam(@oact));
  270. end;
  271. (*=================== MOVED from sysunix.inc ========================*)
  272. function Fpfstat(fd : cint; var sb : stat): cint; [public, alias : 'FPC_SYSC_FSTAT'];
  273. begin
  274. fpFStat:=do_SysCall(syscall_nr_fstat,fd,TSysParam(@sb));
  275. end;
  276. {$ifdef NewReaddir}
  277. {$I readdir.inc}
  278. {$endif}
  279. function Fpfork : pid_t; [public, alias : 'FPC_SYSC_FORK'];
  280. {
  281. This function issues the 'fork' System call. the program is duplicated in memory
  282. and Execution continues in parent and child process.
  283. In the parent process, fork returns the PID of the child. In the child process,
  284. zero is returned.
  285. A negative value indicates that an error has occurred, the error is returned in
  286. LinuxError.
  287. }
  288. Begin
  289. Fpfork:=Do_syscall(SysCall_nr_fork);
  290. End;
  291. {
  292. function Fpexecve(const path : pathstr; const argv : ppchar; const envp: ppchar): cint;
  293. }
  294. {
  295. Replaces the current program by the program specified in path,
  296. arguments in args are passed to Execve.
  297. environment specified in ep is passed on.
  298. }
  299. {
  300. Begin
  301. path:=path+#0;
  302. do_syscall(syscall_nr_Execve,TSysParam(@path[1]),TSysParam(Argv),TSysParam(envp));
  303. End;
  304. }
  305. {
  306. function Fpexecve(const path : pchar; const argv : ppchar; const envp: ppchar): cint; [public, alias : 'FPC_SYSC_EXECVE'];
  307. }
  308. {
  309. Replaces the current program by the program specified in path,
  310. arguments in args are passed to Execve.
  311. environment specified in ep is passed on.
  312. }
  313. {
  314. Begin
  315. do_syscall(syscall_nr_Execve,TSysParam(path),TSysParam(Argv),TSysParam(envp));
  316. End;
  317. }
  318. function Fpwaitpid(pid : pid_t; var stat_loc : cint; options: cint): pid_t; [public, alias : 'FPC_SYSC_WAITPID'];
  319. {
  320. Waits until a child with PID Pid exits, or returns if it is exited already.
  321. Any resources used by the child are freed.
  322. The exit status is reported in the adress referred to by Status. It should
  323. be a longint.
  324. }
  325. begin // actually a wait4() call with 4th arg 0.
  326. FpWaitPID:=do_syscall(syscall_nr_WaitPID,PID,TSysParam(@Stat_loc),options,0);
  327. end;
  328. function Fpaccess(const pathname : pchar; amode : cint): cint; [public, alias : 'FPC_SYSC_ACCESS'];
  329. {
  330. Test users access rights on the specified file.
  331. Mode is a mask xosisting of one or more of R_OK, W_OK, X_OK, F_OK.
  332. R,W,X stand for read,write and Execute access, simultaneously.
  333. F_OK checks whether the test would be allowed on the file.
  334. i.e. It checks the search permissions in all directory components
  335. of the path.
  336. The test is done with the real user-ID, instead of the effective.
  337. If access is denied, or an error occurred, false is returned.
  338. If access is granted, true is returned.
  339. Errors other than no access,are reported in unixerror.
  340. }
  341. begin
  342. FpAccess:=do_syscall(syscall_nr_access,TSysParam(pathname),amode);
  343. end;
  344. {
  345. function Fpaccess(const pathname : pathstr; amode : cint): cint;
  346. {
  347. Test users access rights on the specified file.
  348. Mode is a mask xosisting of one or more of R_OK, W_OK, X_OK, F_OK.
  349. R,W,X stand for read,write and Execute access, simultaneously.
  350. F_OK checks whether the test would be allowed on the file.
  351. i.e. It checks the search permissions in all directory components
  352. of the path.
  353. The test is done with the real user-ID, instead of the effective.
  354. If access is denied, or an error occurred, false is returned.
  355. If access is granted, true is returned.
  356. Errors other than no access,are reported in unixerror.
  357. }
  358. begin
  359. pathname:=pathname+#0;
  360. Access:=do_syscall(syscall_nr_access, TSysParam(@pathname[1]),mode)=0;
  361. end;
  362. }
  363. Function FpDup(fildes:cint):cint; [public, alias : 'FPC_SYSC_DUP'];
  364. begin
  365. Fpdup:=Do_syscall(syscall_nr_dup,TSysParam(fildes));
  366. end;
  367. Function FpDup2(fildes,fildes2:cint):cint; [public, alias : 'FPC_SYSC_DUP2'];
  368. begin
  369. Fpdup2:=do_syscall(syscall_nr_dup2,TSysParam(fildes),TSysParam(fildes2));
  370. end;
  371. CONST
  372. { Constansts for MMAP }
  373. MAP_PRIVATE =2;
  374. MAP_ANONYMOUS =$1000;
  375. Function Fpmunmap(adr:longint;len:size_t):longint; [public, alias :'FPC_SYSC_MUNMAP'];
  376. begin
  377. Fpmunmap:=do_syscall(syscall_nr_munmap,TSysParam(Adr),Len);
  378. end;
  379. Function sbrk(size : longint) : Longint;
  380. begin
  381. sbrk:=Fpmmap(0,Size,3,MAP_PRIVATE+MAP_ANONYMOUS,-1,0);
  382. if sbrk<>-1 then
  383. errno:=0;
  384. {! It must be -1, not 0 as before, see heap.inc. Should be in sysmmap?}
  385. end;
  386. {
  387. Interface to Unix ioctl call.
  388. Performs various operations on the filedescriptor Handle.
  389. Ndx describes the operation to perform.
  390. Data points to data needed for the Ndx function. The structure of this
  391. data is function-dependent.
  392. }
  393. Function FpIOCtl(Handle,Ndx: Longint;Data: Pointer):LongInt; [public, alias : 'FPC_SYSC_IOCTL'];
  394. // This was missing here, instead hardcoded in Do_IsDevice
  395. begin
  396. FpIOCtl:=do_SysCall(syscall_nr_ioctl,handle,Ndx,TSysParam(data));
  397. end;
  398. CONST
  399. IOCtl_TCGETS=$5401;
  400. Function Do_IsDevice(Handle:Longint):boolean;
  401. {
  402. Interface to Unix ioctl call.
  403. Performs various operations on the filedescriptor Handle.
  404. Ndx describes the operation to perform.
  405. Data points to data needed for the Ndx function. The structure of this
  406. data is function-dependent.
  407. }
  408. var
  409. Data : array[0..255] of byte; {Large enough for termios info}
  410. begin
  411. Do_IsDevice:=(Fpioctl(handle,IOCTL_TCGETS,@data)<>-1);
  412. end;
  413. Function FpGetPid:LongInt; [public, alias : 'FPC_SYSC_GETPID'];
  414. {
  415. Get Process ID.
  416. }
  417. begin
  418. FpGetPID:=do_syscall(syscall_nr_getpid);
  419. end;
  420. Function FpReadLink(name,linkname:pchar;maxlen:longint):longint; [public, alias : 'FPC_SYSC_READLINK'];
  421. begin
  422. Fpreadlink:=do_syscall(syscall_nr_readlink, TSysParam(name),TSysParam(linkname),maxlen);
  423. end;
  424. Function FpNanoSleep(const req : timespec;var rem : timespec) : longint; [public, alias : 'FPC_SYSC_NANOSLEEP'];
  425. begin
  426. {$ifndef darwin}
  427. FpNanoSleep:=Do_SysCall(syscall_nr_nanosleep,TSysParam(@req),TSysParam(@rem));
  428. {$else not darwin}
  429. {$warning: TODO: nanosleep!!!}
  430. {$endif not darwin}
  431. end;
  432. function Fpgetcwd(pt:pchar; _size:size_t):pchar;[public, alias :'FPC_SYSC_GETCWD'];
  433. {$ifndef darwin}
  434. const intpathmax = 1024-4; // didn't use POSIX data in libc
  435. // implementation.
  436. var ept,bpt : pchar;
  437. c : char;
  438. ret : cint;
  439. begin
  440. if pt=NIL Then
  441. begin
  442. // POSIX: undefined. (exit(nil) ?)
  443. // BSD : allocate mem for path.
  444. getmem(pt,intpathmax);
  445. if pt=nil Then
  446. exit(nil);
  447. ept:=pt+intpathmax;
  448. end
  449. else
  450. Begin
  451. if (_size=0) Then
  452. Begin
  453. seterrno(ESysEINVAL);
  454. exit(nil);
  455. End;
  456. if (_size=1) Then
  457. Begin
  458. seterrno(ESysERANGE);
  459. exit(nil);
  460. End;
  461. ept:=pt+_size;
  462. end;
  463. ret := do_syscall(syscall_nr___getcwd,TSysParam(pt),TSysParam( ept - pt));
  464. If (ret = 0) Then
  465. If (pt[0] <> '/') Then
  466. Begin
  467. bpt := pt;
  468. ept := pt + strlen(pt) - 1;
  469. While (bpt < ept) Do
  470. Begin
  471. c := bpt^;
  472. bpt^:=ept^;
  473. inc(bpt);
  474. ept^:=c;
  475. dec(ept);
  476. End;
  477. End;
  478. Fpgetcwd:=pt;
  479. end;
  480. {$else not darwin}
  481. {$i getcwd.inc}
  482. {$endif darwin}
  483. {$endif}
  484. {
  485. $Log$
  486. Revision 1.3 2003-05-29 20:52:55 marco
  487. * only moved around the off_t calls, and made an exception (includefile)
  488. for NetBSD/powerpc
  489. Revision 1.2 2003/05/26 21:29:16 jonas
  490. - disabled nanosleep for darwin for now
  491. + getcwd for darwin
  492. Revision 1.1 2003/01/05 19:01:28 marco
  493. * FreeBSD compiles now with baseunix mods.
  494. Revision 1.9 2002/11/13 18:15:08 marco
  495. * sigset functions more flexible, small changes to sys_ktime
  496. Revision 1.8 2002/10/27 17:21:29 marco
  497. * Only "difficult" functions + execvp + termios + rewinddir left to do
  498. Revision 1.7 2002/10/27 11:58:29 marco
  499. * Modifications from Saturday.
  500. Revision 1.6 2002/10/26 18:27:51 marco
  501. * First series POSIX calls commits. Including getcwd.
  502. Revision 1.5 2002/10/18 12:19:58 marco
  503. * Fixes to get the generic *BSD RTL compiling again + fixes for thread
  504. support. Still problems left in fexpand. (inoutres?) Therefore fixed
  505. sysposix not yet commited
  506. Revision 1.4 2002/10/16 18:44:18 marco
  507. * Lseek and ftruncate 64-bit fix
  508. Revision 1.3 2002/09/07 16:01:17 peter
  509. * old logs removed and tabs fixed
  510. Revision 1.2 2002/08/21 07:03:16 marco
  511. * Fixes from Tuesday.
  512. Revision 1.1 2002/08/19 12:29:11 marco
  513. * First working POSIX *BSD system unit.
  514. Revision 1.2 2002/08/04 04:29:34 marco
  515. * More POSIX updates. Small changes to lseek and ftruncate in osposix.inc
  516. Initial versions of the type includefiles
  517. Revision 1.1 2002/08/03 19:34:19 marco
  518. * Initial *BSD versions. Seems that OpenBSD doesn't need much change,
  519. NetBSD may need some fixes to stat record and ftruncate and lseek.
  520. It is all close together, and it should be doable to have just one copy
  521. of these for *BSD.
  522. }