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