At 11:41 AM 4/1/2002 -0500, Michael G Schwern wrote:
>Parrot no longer builds on VMS.  Here's the basic problem.
>
>Given:
>
>[]wibble.c
>
>    #include "foo/foo.h"
>
>    int main (void) {
>        printf("Loaded\n");
>        exit(0);
>    }
>
>[.include.foo]foo.h
>
>    #include <stdio.h>
>    #include <stdlib.h>
>
>
>$ cc/decc /include=[.include] wibble.c
>
>#include "foo/foo.h"
>..^
>%CC-F-NOINCLFILEF, Cannot find file "foo/foo.h" specified in #include directive.
>at line number 1 in file USER1:[SCHWERN.TMP]WIBBLE.C;7
>$ cc/decc /include="./include" wibble.c
>$ 
>
>
>Why can't the first command find [.include.foo]foo.h but the second
>can?


The first version will try to parse [.include]foo/foo.h which is not a valid filespec. 
 The second version will, in the words of the Compaq C Users' Guide:

<quote>A place containing a "/" character is considered to be a UNIX-style name. If 
the name in the #include directive also contains a "/" character that is not the first 
character and is not preceded by a "!" character (it is not an absolute UNIX-style 
pathname), then the name in the #include directive is appended to the named place, 
separated by a "/" character, before applying the decc$to_vms pathname translation 
function. The result of the decc$to_vms translation is then used as the filespec to 
try to open.</quote>

That's from 
<http://www.openvms.compaq.com/commercial/c/5492p004.html#include_quoted_form_sec>.  
Bottom line is the compiler appends the pieces before vmsifying them.

Reply via email to