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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!think!bloom-beacon!bu-cs!purdue!decwrl!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpcljws!jws From: jws@hpcljws.HP.COM (John Stafford) Newsgroups: comp.lang.ada Subject: Re: Ada/UNIX(tm) and the NAME function Message-ID: <920006@hpcljws.HP.COM> Date: 3 Jan 89 20:03:15 GMT References: <8812281638.AA00722@aries> Organization: Hewlett-Packard Calif. Language Lab List-Id: Relative names: My interpretation of NAME is that simply attaching the output of getcwd to a relative name does not meet the specification that "If an environment allows alternative specification of the name ... , the string returned by the function should correspond to the full specification of the name". As noted, on systems with "symbolic links" and "hidden directories" and the like, it really feels like such should be "removed" in order to return "the full specification". Perhaps I am over-reading the RM, I had thought that the spirit of an RM specification was to be as precise as possible. It is at least clear that precision is currently not present when using NAME on UNIX. I can't imagine any sane program comparing the NAMEs of files, although certainly an Ada product should document what its version of NAME does lest somebody think they can reliably do such a thing. I would like to see NAME return the same thing for a given file no matter what path I used to open the file (except if such is not possible, as in the case of hard links). But I suspect I am asking for more than what is required. If I open foo ./foo ./././././././foo is it reasonable that the result returned by NAME should be different in each case? Other issues: I still don't know what one should do if the file can be opened but the name cannot be determined (e.g. due to lack of parent directory access permission). I also am not "Ada knowledgeable" enough to know that it is OK for routines which the RM defines as able to raise some exceptions to raise others as well. I would genuinely appreciate references to why this is OK (at first glance it would seem to me to make an implementation of Ada non-conformant if use of NAME could raise NAME_ERROR).