sysunix.inc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Michael Van Canneyt,
  5. member of the Free Pascal development team.
  6. This is the core of the system unit *nix systems (now FreeBSD
  7. and Unix).
  8. See the file COPYING.FPC, included in this distribution,
  9. for details about the copyright.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. **********************************************************************}
  14. { These things are set in the makefile, }
  15. { But you can override them here.}
  16. { If you use an aout system, set the conditional AOUT}
  17. { $Define AOUT}
  18. {$I system.inc}
  19. { used in syscall to report errors.}
  20. var
  21. Errno : longint;
  22. { Include constant and type definitions }
  23. {$i errno.inc } { Error numbers }
  24. {$i sysnr.inc } { System call numbers }
  25. {$i sysconst.inc } { Miscellaneous constants }
  26. {$i systypes.inc } { Types needed for system calls }
  27. { Read actual system call definitions. }
  28. {$i signal.inc}
  29. {$i syscalls.inc }
  30. {*****************************************************************************
  31. Misc. System Dependent Functions
  32. *****************************************************************************}
  33. procedure prthaltproc;external name '_haltproc';
  34. Procedure System_exit;
  35. Begin
  36. prthaltproc;
  37. End;
  38. Function ParamCount: Longint;
  39. Begin
  40. Paramcount:=argc-1;
  41. End;
  42. Function ParamStr(l: Longint): String;
  43. var
  44. link,
  45. hs : string;
  46. i : longint;
  47. begin
  48. if l=0 then
  49. begin
  50. str(sys_getpid,hs);
  51. {$ifdef FreeBSD}
  52. hs:='/proc/'+hs+'/file'#0;
  53. {$else}
  54. hs:='/proc/'+hs+'/exe'#0;
  55. {$endif}
  56. i:=Sys_readlink(@hs[1],@link[1],high(link));
  57. { it must also be an absolute filename, linux 2.0 points to a memory
  58. location so this will skip that }
  59. if (i>0) and (link[1]='/') then
  60. begin
  61. link[0]:=chr(i);
  62. paramstr:=link;
  63. end
  64. else
  65. paramstr:=strpas(argv[0]);
  66. end
  67. else
  68. if (l>0) and (l<argc) then
  69. paramstr:=strpas(argv[l])
  70. else
  71. paramstr:='';
  72. end;
  73. Procedure Randomize;
  74. Begin
  75. randseed:=sys_time;
  76. End;
  77. {*****************************************************************************
  78. Heap Management
  79. *****************************************************************************}
  80. var
  81. _HEAP : pointer;external name 'HEAP';
  82. _HEAPSIZE : longint;external name 'HEAPSIZE';
  83. function getheapstart:pointer;assembler;
  84. {$undef fpc_getheapstart_ok}
  85. {$ifdef i386}
  86. {$define fpc_getheapstart_ok}
  87. asm
  88. leal _HEAP,%eax
  89. end ['EAX'];
  90. {$endif i386}
  91. {$ifdef m68k}
  92. {$define fpc_getheapstart_ok}
  93. asm
  94. lea.l _HEAP,a0
  95. move.l a0,d0
  96. end['A0','D0'];
  97. {$endif m68k}
  98. {$ifndef fpc_getheapstart_ok}
  99. {$error Getheapstart code is not implemented }
  100. {$endif not fpc_getheapstart_ok}
  101. function getheapsize:longint;assembler;
  102. {$undef fpc_getheapsize_ok}
  103. {$ifdef i386}
  104. {$define fpc_getheapsize_ok}
  105. asm
  106. movl _HEAPSIZE,%eax
  107. end ['EAX'];
  108. {$endif i386}
  109. {$ifdef m68k}
  110. {$define fpc_getheapsize_ok}
  111. asm
  112. move.l _HEAPSIZE,d0
  113. end ['D0'];
  114. {$endif m68k}
  115. {$ifndef fpc_getheapsize_ok}
  116. {$error Getheapsize code is not implemented }
  117. {$endif not fpc_getheapsize_ok}
  118. Function sbrk(size : longint) : Longint;
  119. begin
  120. sbrk:=Sys_mmap(0,Size,3,MAP_PRIVATE+MAP_ANONYMOUS,-1,0);
  121. if sbrk<>-1 then
  122. errno:=0;
  123. {! It must be -1, not 0 as before, see heap.inc. Should be in sysmmap?}
  124. end;
  125. { include standard heap management }
  126. {$I heap.inc}
  127. {*****************************************************************************
  128. Low Level File Routines
  129. *****************************************************************************}
  130. {
  131. The lowlevel file functions should take care of setting the InOutRes to the
  132. correct value if an error has occured, else leave it untouched
  133. }
  134. Procedure Errno2Inoutres;
  135. {
  136. Convert ErrNo error to the correct Inoutres value
  137. }
  138. begin
  139. if ErrNo=0 then { Else it will go through all the cases }
  140. exit;
  141. If errno<0 then Errno:=-errno;
  142. case ErrNo of
  143. Sys_ENFILE,
  144. Sys_EMFILE : Inoutres:=4;
  145. Sys_ENOENT : Inoutres:=2;
  146. Sys_EBADF : Inoutres:=6;
  147. Sys_ENOMEM,
  148. Sys_EFAULT : Inoutres:=217;
  149. Sys_EINVAL : Inoutres:=218;
  150. Sys_EPIPE,
  151. Sys_EINTR,
  152. Sys_EIO,
  153. Sys_EAGAIN,
  154. Sys_ENOSPC : Inoutres:=101;
  155. Sys_ENAMETOOLONG,
  156. Sys_ELOOP,
  157. Sys_ENOTDIR : Inoutres:=3;
  158. Sys_EROFS,
  159. Sys_EEXIST,
  160. Sys_EISDIR,
  161. Sys_EACCES : Inoutres:=5;
  162. Sys_ETXTBSY : Inoutres:=162;
  163. else
  164. InOutRes := Integer(Errno);
  165. end;
  166. end;
  167. Procedure Do_Close(Handle:Longint);
  168. Begin
  169. sys_close(Handle);
  170. {Errno2Inoutres;}
  171. End;
  172. Procedure Do_Erase(p:pchar);
  173. Begin
  174. sys_unlink(p);
  175. Errno2Inoutres;
  176. { tp compatible result }
  177. if (Errno=Sys_EISDIR) then
  178. InOutRes:=2;
  179. End;
  180. Procedure Do_Rename(p1,p2:pchar);
  181. Begin
  182. sys_rename(p1,p2);
  183. Errno2Inoutres;
  184. End;
  185. Function Do_Write(Handle,Addr,Len:Longint):longint;
  186. Begin
  187. repeat
  188. Do_Write:=sys_write(Handle,pchar(addr),len);
  189. until ErrNo<>Sys_EINTR;
  190. Errno2Inoutres;
  191. if Do_Write<0 then
  192. Do_Write:=0;
  193. End;
  194. Function Do_Read(Handle,Addr,Len:Longint):Longint;
  195. Begin
  196. repeat
  197. Do_Read:=sys_read(Handle,pchar(addr),len);
  198. until ErrNo<>Sys_EINTR;
  199. Errno2Inoutres;
  200. if Do_Read<0 then
  201. Do_Read:=0;
  202. End;
  203. Function Do_FilePos(Handle: Longint): Longint;
  204. Begin
  205. Do_FilePos:=sys_lseek(Handle, 0, Seek_Cur);
  206. Errno2Inoutres;
  207. End;
  208. Procedure Do_Seek(Handle,Pos:Longint);
  209. Begin
  210. sys_lseek(Handle, pos, Seek_set);
  211. errno2inoutres;
  212. End;
  213. Function Do_SeekEnd(Handle:Longint): Longint;
  214. begin
  215. Do_SeekEnd:=sys_lseek(Handle,0,Seek_End);
  216. errno2inoutres;
  217. end;
  218. Function Do_FileSize(Handle:Longint): Longint;
  219. var
  220. Info : Stat;
  221. Begin
  222. if sys_fstat(handle,info)=0 then
  223. Do_FileSize:=Info.Size
  224. else
  225. Do_FileSize:=0;
  226. Errno2Inoutres;
  227. End;
  228. Procedure Do_Truncate(Handle,fPos:longint);
  229. begin
  230. sys_ftruncate(handle,fpos);
  231. Errno2Inoutres;
  232. end;
  233. Procedure Do_Open(var f;p:pchar;flags:longint);
  234. {
  235. FileRec and textrec have both Handle and mode as the first items so
  236. they could use the same routine for opening/creating.
  237. when (flags and $100) the file will be append
  238. when (flags and $1000) the file will be truncate/rewritten
  239. when (flags and $10000) there is no check for close (needed for textfiles)
  240. }
  241. var
  242. oflags : longint;
  243. Begin
  244. { close first if opened }
  245. if ((flags and $10000)=0) then
  246. begin
  247. case FileRec(f).mode of
  248. fminput,fmoutput,fminout : Do_Close(FileRec(f).Handle);
  249. fmclosed : ;
  250. else
  251. begin
  252. inoutres:=102; {not assigned}
  253. exit;
  254. end;
  255. end;
  256. end;
  257. { reset file Handle }
  258. FileRec(f).Handle:=UnusedHandle;
  259. { We do the conversion of filemodes here, concentrated on 1 place }
  260. case (flags and 3) of
  261. 0 : begin
  262. oflags :=Open_RDONLY;
  263. FileRec(f).mode:=fminput;
  264. end;
  265. 1 : begin
  266. oflags :=Open_WRONLY;
  267. FileRec(f).mode:=fmoutput;
  268. end;
  269. 2 : begin
  270. oflags :=Open_RDWR;
  271. FileRec(f).mode:=fminout;
  272. end;
  273. end;
  274. if (flags and $1000)=$1000 then
  275. oflags:=oflags or (Open_CREAT or Open_TRUNC)
  276. else
  277. if (flags and $100)=$100 then
  278. oflags:=oflags or (Open_APPEND);
  279. { empty name is special }
  280. if p[0]=#0 then
  281. begin
  282. case FileRec(f).mode of
  283. fminput :
  284. FileRec(f).Handle:=StdInputHandle;
  285. fminout, { this is set by rewrite }
  286. fmoutput :
  287. FileRec(f).Handle:=StdOutputHandle;
  288. fmappend :
  289. begin
  290. FileRec(f).Handle:=StdOutputHandle;
  291. FileRec(f).mode:=fmoutput; {fool fmappend}
  292. end;
  293. end;
  294. exit;
  295. end;
  296. { real open call }
  297. FileRec(f).Handle:=sys_open(p,oflags,438);
  298. if (ErrNo=Sys_EROFS) and ((OFlags and Open_RDWR)<>0) then
  299. begin
  300. Oflags:=Oflags and not(Open_RDWR);
  301. FileRec(f).Handle:=sys_open(p,oflags,438);
  302. end;
  303. Errno2Inoutres;
  304. End;
  305. Function Do_IsDevice(Handle:Longint):boolean;
  306. {
  307. Interface to Unix ioctl call.
  308. Performs various operations on the filedescriptor Handle.
  309. Ndx describes the operation to perform.
  310. Data points to data needed for the Ndx function. The structure of this
  311. data is function-dependent.
  312. }
  313. var
  314. Data : array[0..255] of byte; {Large enough for termios info}
  315. begin
  316. Do_IsDevice:=(sys_ioctl(handle,IOCTL_TCGETS,@data)<>-1);
  317. end;
  318. {*****************************************************************************
  319. UnTyped File Handling
  320. *****************************************************************************}
  321. {$i file.inc}
  322. {*****************************************************************************
  323. Typed File Handling
  324. *****************************************************************************}
  325. {$i typefile.inc}
  326. {*****************************************************************************
  327. Text File Handling
  328. *****************************************************************************}
  329. {$DEFINE SHORT_LINEBREAK}
  330. {$DEFINE EXTENDED_EOF}
  331. {$i text.inc}
  332. {*****************************************************************************
  333. Directory Handling
  334. *****************************************************************************}
  335. Procedure MkDir(Const s: String);[IOCheck];
  336. Var
  337. Buffer: Array[0..255] of Char;
  338. Begin
  339. If (s='') or (InOutRes <> 0) then
  340. exit;
  341. Move(s[1], Buffer, Length(s));
  342. Buffer[Length(s)] := #0;
  343. sys_mkdir(@buffer, 511);
  344. Errno2Inoutres;
  345. End;
  346. Procedure RmDir(Const s: String);[IOCheck];
  347. Var
  348. Buffer: Array[0..255] of Char;
  349. Begin
  350. If (s='') or (InOutRes <> 0) then
  351. exit;
  352. Move(s[1], Buffer, Length(s));
  353. Buffer[Length(s)] := #0;
  354. sys_rmdir(@buffer);
  355. Errno2Inoutres;
  356. End;
  357. Procedure ChDir(Const s: String);[IOCheck];
  358. Var
  359. Buffer: Array[0..255] of Char;
  360. Begin
  361. If (s='') or (InOutRes <> 0) then
  362. exit;
  363. Move(s[1], Buffer, Length(s));
  364. Buffer[Length(s)] := #0;
  365. sys_chdir(@buffer);
  366. Errno2Inoutres;
  367. { file not exists is path not found under tp7 }
  368. if InOutRes=2 then
  369. InOutRes:=3;
  370. End;
  371. procedure GetDir (DriveNr: byte; var Dir: ShortString);
  372. var
  373. thisdir : stat;
  374. rootino,
  375. thisino,
  376. dotdotino : longint;
  377. rootdev,
  378. thisdev,
  379. dotdotdev : dev_t;
  380. thedir,dummy : string[255];
  381. dirstream : pdir;
  382. d : pdirent;
  383. mountpoint,validdir : boolean;
  384. predot : string[255];
  385. begin
  386. drivenr:=0;
  387. dir:='';
  388. thedir:='/'#0;
  389. if sys_stat(@thedir[1],thisdir)<0 then
  390. exit;
  391. rootino:=thisdir.ino;
  392. rootdev:=thisdir.dev;
  393. thedir:='.'#0;
  394. if sys_stat(@thedir[1],thisdir)<0 then
  395. exit;
  396. thisino:=thisdir.ino;
  397. thisdev:=thisdir.dev;
  398. { Now we can uniquely identify the current and root dir }
  399. thedir:='';
  400. predot:='';
  401. while not ((thisino=rootino) and (thisdev=rootdev)) do
  402. begin
  403. { Are we on a mount point ? }
  404. dummy:=predot+'..'#0;
  405. if sys_stat(@dummy[1],thisdir)<0 then
  406. exit;
  407. dotdotino:=thisdir.ino;
  408. dotdotdev:=thisdir.dev;
  409. mountpoint:=(thisdev<>dotdotdev);
  410. { Now, Try to find the name of this dir in the previous one }
  411. dirstream:=opendir (@dummy[1]);
  412. if dirstream=nil then
  413. exit;
  414. repeat
  415. d:=sys_readdir (dirstream);
  416. validdir:=false;
  417. if (d<>nil) and
  418. (not ((d^.name[0]='.') and ((d^.name[1]=#0) or ((d^.name[1]='.')
  419. and (d^.name[2]=#0))))) and
  420. (mountpoint or (d^.ino=thisino)) then
  421. begin
  422. dummy:=predot+'../'+strpas(@(d^.name[0]))+#0;
  423. validdir:=not (sys_stat (@(dummy[1]),thisdir)<0);
  424. end
  425. else
  426. validdir:=false;
  427. until (d=nil) or
  428. ((validdir) and (thisdir.dev=thisdev) and (thisdir.ino=thisino) );
  429. { At this point, d.name contains the name of the current dir}
  430. if (d<>nil) then
  431. thedir:='/'+strpas(@(d^.name[0]))+thedir;
  432. { closedir also makes d invalid }
  433. if (closedir(dirstream)<0) or (d=nil) then
  434. exit;
  435. thisdev:=dotdotdev;
  436. thisino:=dotdotino;
  437. predot:=predot+'../';
  438. end;
  439. { Now rootino=thisino and rootdev=thisdev so we've reached / }
  440. dir:=thedir
  441. end;
  442. {*****************************************************************************
  443. SystemUnit Initialization
  444. *****************************************************************************}
  445. {$ifdef I386}
  446. { this should be defined in i386 directory !! PM }
  447. const
  448. fpucw : word = $1332;
  449. FPU_Invalid = 1;
  450. FPU_Denormal = 2;
  451. FPU_DivisionByZero = 4;
  452. FPU_Overflow = 8;
  453. FPU_Underflow = $10;
  454. FPU_StackUnderflow = $20;
  455. FPU_StackOverflow = $40;
  456. {$endif I386}
  457. Procedure ResetFPU;
  458. begin
  459. {$ifdef I386}
  460. asm
  461. fninit
  462. fldcw fpucw
  463. end;
  464. {$endif I386}
  465. end;
  466. {$ifdef BSD}
  467. procedure SignalToRunerror(Sig: longint; SigContext: SigContextRec;someptr:pointer); cdecl;
  468. {$else}
  469. {$ifdef Solaris}
  470. procedure SignalToRunerror(Sig: longint; SigContext: SigContextRec;someptr:pointer); cdecl;
  471. {$else}
  472. procedure SignalToRunerror(Sig: longint; SigContext: SigContextRec); cdecl;
  473. {$endif}
  474. {$ENDIF}
  475. var
  476. res,fpustate : word;
  477. begin
  478. res:=0;
  479. case sig of
  480. SIGFPE :
  481. begin
  482. { this is not allways necessary but I don't know yet
  483. how to tell if it is or not PM }
  484. {$ifdef I386}
  485. fpustate:=0;
  486. res:=200;
  487. {$ifndef FreeBSD}
  488. if assigned(SigContext.fpstate) then
  489. fpuState:=SigContext.fpstate^.sw;
  490. {$else}
  491. fpustate:=SigContext.en_sw;
  492. {$ifdef SYSTEM_DEBUG}
  493. writeln('xx:',sigcontext.en_tw,' ',sigcontext.en_cw);
  494. {$endif SYSTEM_DEBUG}
  495. {$endif}
  496. {$ifdef SYSTEM_DEBUG}
  497. Writeln(stderr,'FpuState = ',FpuState);
  498. {$endif SYSTEM_DEBUG}
  499. if (FpuState and $7f) <> 0 then
  500. begin
  501. { first check te more precise options }
  502. if (FpuState and FPU_DivisionByZero)<>0 then
  503. res:=200
  504. else if (FpuState and FPU_Overflow)<>0 then
  505. res:=205
  506. else if (FpuState and FPU_Underflow)<>0 then
  507. res:=206
  508. else if (FpuState and FPU_Denormal)<>0 then
  509. res:=216
  510. else if (FpuState and (FPU_StackOverflow or FPU_StackUnderflow))<>0 then
  511. res:=207
  512. else if (FpuState and FPU_Invalid)<>0 then
  513. res:=216
  514. else
  515. res:=207; {'Coprocessor Error'}
  516. end;
  517. {$endif I386}
  518. ResetFPU;
  519. end;
  520. SIGILL,
  521. SIGBUS,
  522. SIGSEGV :
  523. res:=216;
  524. end;
  525. { give runtime error at the position where the signal was raised }
  526. if res<>0 then
  527. begin
  528. {$ifdef I386}
  529. {$ifdef FreeBSD}
  530. HandleErrorAddrFrame(res,SigContext.sc_eip,SigContext.sc_ebp);
  531. {$else}
  532. HandleErrorAddrFrame(res,SigContext.eip,SigContext.ebp);
  533. {$endif}
  534. {$else}
  535. HandleError(res);
  536. {$endif}
  537. end;
  538. end;
  539. Procedure InstallSignals;
  540. const
  541. {$Ifndef BSD}
  542. {$ifdef solaris}
  543. act: SigActionRec =(sa_flags:SA_SIGINFO;Handler:(sa:@signaltorunerror;sa_mask:0);
  544. {$else}
  545. act: SigActionRec = (handler:(Sa:@SignalToRunError);sa_mask:0;sa_flags:0;
  546. Sa_restorer: NIL);
  547. {$endif}
  548. {$ELSE}
  549. act: SigActionRec = (handler:(Sa:@SignalToRunError);sa_flags:SA_SIGINFO;
  550. sa_mask:0);
  551. {$endif}
  552. oldact: PSigActionRec = Nil; {Probably not necessary anymore, now
  553. VAR is removed}
  554. begin
  555. ResetFPU;
  556. SigAction(SIGFPE,@act,oldact);
  557. {$ifndef Solaris}
  558. SigAction(SIGSEGV,@act,oldact);
  559. SigAction(SIGBUS,@act,oldact);
  560. SigAction(SIGILL,@act,oldact);
  561. {$endif}
  562. end;
  563. procedure SetupCmdLine;
  564. var
  565. bufsize,
  566. len,j,
  567. size,i : longint;
  568. found : boolean;
  569. buf : array[0..1026] of char;
  570. procedure AddBuf;
  571. begin
  572. reallocmem(cmdline,size+bufsize);
  573. move(buf,cmdline[size],bufsize);
  574. inc(size,bufsize);
  575. bufsize:=0;
  576. end;
  577. begin
  578. size:=0;
  579. bufsize:=0;
  580. i:=0;
  581. while (i<argc) do
  582. begin
  583. len:=strlen(argv[i]);
  584. if len>sizeof(buf)-2 then
  585. len:=sizeof(buf)-2;
  586. found:=false;
  587. for j:=1 to len do
  588. if argv[i][j]=' ' then
  589. begin
  590. found:=true;
  591. break;
  592. end;
  593. if bufsize+len>=sizeof(buf)-2 then
  594. AddBuf;
  595. if found then
  596. begin
  597. buf[bufsize]:='"';
  598. inc(bufsize);
  599. end;
  600. move(argv[i]^,buf[bufsize],len);
  601. inc(bufsize,len);
  602. if found then
  603. begin
  604. buf[bufsize]:='"';
  605. inc(bufsize);
  606. end;
  607. if i<argc then
  608. buf[bufsize]:=' '
  609. else
  610. buf[bufsize]:=#0;
  611. inc(bufsize);
  612. inc(i);
  613. end;
  614. AddBuf;
  615. end;
  616. Begin
  617. { Set up signals handlers }
  618. InstallSignals;
  619. { Setup heap }
  620. InitHeap;
  621. InitExceptions;
  622. { Arguments }
  623. SetupCmdLine;
  624. { Setup stdin, stdout and stderr }
  625. OpenStdIO(Input,fmInput,StdInputHandle);
  626. OpenStdIO(Output,fmOutput,StdOutputHandle);
  627. OpenStdIO(StdOut,fmOutput,StdOutputHandle);
  628. OpenStdIO(StdErr,fmOutput,StdErrorHandle);
  629. { Reset IO Error }
  630. InOutRes:=0;
  631. End.
  632. {
  633. $Log$
  634. Revision 1.17 2001-09-30 21:10:20 peter
  635. * erase(directory) returns now 2 to be tp compatible
  636. Revision 1.16 2001/08/05 12:24:20 peter
  637. * m68k merges
  638. Revision 1.15 2001/07/16 19:51:36 marco
  639. * A small note, copied from the Solaris patch. Do_close needs errnotoiores?
  640. Revision 1.14 2001/07/15 11:57:16 peter
  641. * merged m68k updates
  642. Revision 1.13 2001/07/13 22:05:09 peter
  643. * cygwin updates
  644. Revision 1.12 2001/06/02 19:24:49 peter
  645. * chdir rte 2 mapped to 3
  646. Revision 1.11 2001/06/02 00:31:31 peter
  647. * merge unix updates from the 1.0 branch, mostly related to the
  648. solaris target
  649. Revision 1.10 2001/04/23 20:33:31 peter
  650. * also install sig handlers for sigill,sigbus
  651. Revision 1.9 2001/04/13 22:39:05 peter
  652. * removed warning
  653. Revision 1.8 2001/04/12 17:53:43 peter
  654. * fixed usage of already release memory in getdir
  655. Revision 1.7 2001/03/21 21:08:20 hajny
  656. * GetDir fixed
  657. Revision 1.6 2001/03/16 20:09:58 hajny
  658. * universal FExpand
  659. Revision 1.5 2001/02/20 21:31:12 peter
  660. * chdir,mkdir,rmdir with empty string fixed
  661. Revision 1.4 2000/12/17 14:00:57 peter
  662. * removed debug writelns
  663. Revision 1.3 2000/10/09 16:35:51 marco
  664. * Fixed the first (of many) ioctls that make building the IDE hard.
  665. Revision 1.2 2000/09/18 13:14:51 marco
  666. * Global Linux +bsd to (rtl/freebsd rtl/unix rtl/linux structure)
  667. Revision 1.6 2000/09/11 13:48:08 marco
  668. * FreeBSD support and removal of old sighandler
  669. Revision 1.5 2000/08/13 08:43:45 peter
  670. * don't check for directory in do_open (merged)
  671. Revision 1.4 2000/08/05 18:33:51 peter
  672. * paramstr(0) fix for linux 2.0 kernels (merged)
  673. Revision 1.3 2000/07/14 10:33:10 michael
  674. + Conditionals fixed
  675. Revision 1.2 2000/07/13 11:33:49 michael
  676. + removed logs
  677. }