From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ed7075f5ab49c273 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-05 10:14:04 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!news-out.visi.com!green.octanews.net!news-out.octanews.net!news.glorb.com!newsgate.cistron.nl!amsnews01.chello.com!news01.chello.no!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Files opened for exclusive read Date: Fri, 5 Mar 2004 18:14:04 +0000 (UTC) Organization: PVV Message-ID: References: <686be06c.0403050513.632eb334@posting.google.com> NNTP-Posting-Host: k-083152.nt.ntnu.no X-Trace: tyfon.itea.ntnu.no 1078510444 7253 129.241.83.152 (5 Mar 2004 18:14:04 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Fri, 5 Mar 2004 18:14:04 +0000 (UTC) User-Agent: slrn/0.9.8.0 (Linux) X-Received-Date: Fri, 05 Mar 2004 19:13:45 MET (news01.chello.no) Xref: archiver1.google.com comp.lang.ada:6092 Date: 2004-03-05T18:14:04+00:00 List-Id: On 2004-03-05, Robert I. Eachus wrote: > Look into mode strings for your compiler. When you open a file in > Text_IO there is a mode parameter. The meaning of the mode parameter is > implementation defined. Of course, the possible settings using the mode > string will depend on the operating system as well, and Windows does not > 'simply' support file sharing. In GNAT 3.15p a mode string of > "shared=yes" will allow you to share a file within an Ada program (have > it open under two different names with different positions). But if you > want to share a file with say an external C program, you probably have > to use Interfaces.C_Strings. The problem of course is the buffering > that otherwise goes on. Will shared=yes be silently ignored on a linux/unix OS where this is not an issue? -- Rox-Filer; *the* file manager => http://rox.sf.net/