sysunix.inc 18 KB

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