Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Never trust a computer you can't repair yourself.


computers / comp.os.vms / Re: C compiler snag

SubjectAuthor
* C compiler snagRichard Levitte
+* Re: C compiler snagCraig A. Berry
|+* Re: C compiler snagRichard Whalen
||`- Re: C compiler snagRichard Levitte
|`* Re: C compiler snagDavid Jones
| +- Re: C compiler snagRichard Levitte
| `* Re: C compiler snagCraig A. Berry
|  `* Re: C compiler snagJake Hamby
|   +* Re: C compiler snagSteven Schweda
|   |`* Re: C compiler snagabrsvc
|   | +- Re: C compiler snagSteven Schweda
|   | `- Re: C compiler snagDavid Jones
|   `- Re: C compiler snagCraig A. Berry
`* Re: C compiler snagJohn E. Malmberg
 `* Re: C compiler snagJohn Reagan
  +* Re: C compiler snagSimon Clubley
  |`* Re: C compiler snagDave Froble
  | `* Re: C compiler snagSimon Clubley
  |  `* Re: C compiler snagDave Froble
  |   `- Re: C compiler snagSimon Clubley
  `* Re: C compiler snagJohn E. Malmberg
   +* Re: C compiler snagJohn Reagan
   |`* Re: C compiler snagSimon Clubley
   | +* Re: C compiler snagSimon Clubley
   | |`- Re: C compiler snagJohn E. Malmberg
   | `* net: device (Re: C compiler snag)Craig A. Berry
   |  `* Re: net: device (Re: C compiler snag)Simon Clubley
   |   `- Re: net: device (Re: C compiler snag)Craig A. Berry
   `- Re: C compiler snagCraig A. Berry

Pages:12
C compiler snag

<31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14919&group=comp.os.vms#14919

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a37:e11:: with SMTP id 17mr11424030qko.499.1621417882710;
Wed, 19 May 2021 02:51:22 -0700 (PDT)
X-Received: by 2002:ac8:5e4a:: with SMTP id i10mr10706912qtx.118.1621417882563;
Wed, 19 May 2021 02:51:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 19 May 2021 02:51:22 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:470:28:a97:0:0:1:1;
posting-account=xUWTYAoAAABY1mIetTAK3RSKrNCNVnz8
NNTP-Posting-Host: 2001:470:28:a97:0:0:1:1
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
Subject: C compiler snag
From: rich...@levitte.org (Richard Levitte)
Injection-Date: Wed, 19 May 2021 09:51:22 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Richard Levitte - Wed, 19 May 2021 09:51 UTC

Hey folks,

it's been long since I've been present here... been all busy with OpenSSL, not much time for something else.

Now, speaking of OpenSSL, I'm hitting an "interesting" snag that I can't seem to find a good solution for. It's easy to demonstrate, with this set of files:

humpf.c
[.incl]h.h
something.h

----- humpf.c
#include "./incl/h.h"

int main()
{ }
-----

----- [.incl]h.h
#include "../something.h"
-----

----- something.h
int foo(void);
-----

The content of those files isn't terribly interesting, but the inclusion sequence is, i.e. humpf.c includes "./incl/h.h" includes "../something.h". Structures like this may seem strange, but they do exist. So now for the snag:

-----
$ cc humpf.c

#include "../something.h"
..^
%CC-F-NOINCLFILEF, Cannot find file "../something.h" specified in #include directive.
at line number 1 in file USER:[LEVITTE.TEST.CC-INCL-2.INCL]h.h;1
-----

So my question is, is there any trick that I can do with the compiler to make this go through without error? i would rather not have to restructure the inclusion if I can.

Version data:

(alpha) $ cc/version
VSI C V7.4-002 on OpenVMS Alpha V8.4-2L2

(itanium) $ cc/version
VSI C V7.4-001 on OpenVMS IA64 V8.4-2L1

Re: C compiler snag

<s82uek$kf3$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14921&group=comp.os.vms#14921

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Wed, 19 May 2021 06:57:06 -0500
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <s82uek$kf3$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 May 2021 11:57:08 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="bd79f9f7f97e9af937e2167375b4deda";
logging-data="20963"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18a4PX/Rntj16mDghQ3DAqbbnRL2FE7I2s="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.10.1
Cancel-Lock: sha1:Eo2Uu5U200a0a6vdF3KJMyCkFMA=
In-Reply-To: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
Content-Language: en-US
 by: Craig A. Berry - Wed, 19 May 2021 11:57 UTC

On 5/19/21 4:51 AM, Richard Levitte wrote:
> Hey folks,
>
> it's been long since I've been present here... been all busy with
> OpenSSL, not much time for something else.
>
> Now, speaking of OpenSSL, I'm hitting an "interesting" snag that I
> can't seem to find a good solution for. It's easy to demonstrate, with
> this set of files:
>
> humpf.c
> [.incl]h.h
> something.h
>
> ----- humpf.c
> #include "./incl/h.h"
>
> int main()
> {
> }
> -----
>
> ----- [.incl]h.h
> #include "../something.h"
> -----
>
> ----- something.h
> int foo(void);
> -----
>
> The content of those files isn't terribly interesting, but the inclusion sequence is, i.e. humpf.c includes "./incl/h.h" includes "../something.h". Structures like this may seem strange, but they do exist. So now for the snag:
>
> -----
> $ cc humpf.c
>
> #include "../something.h"
> .^
> %CC-F-NOINCLFILEF, Cannot find file "../something.h" specified in #include directive.
> at line number 1 in file USER:[LEVITTE.TEST.CC-INCL-2.INCL]h.h;1
> -----
>

> So my question is, is there any trick that I can do with the
> compiler to make this go through without error? i would rather not have to
> restructure the inclusion if I can.

Have you tried specifying the current working directory in Unix format
on the command line:
cc/include="./" humpf.c

?

I think I remember something like that being necessary for some
situation, but I'm not sure if it was this situation exactly.

Other than that, SET WATCH FILE is your friend for figuring out where
exactly the compiler is looking for the file it can't find.

> Version data:
>
> (alpha) $ cc/version
> VSI C V7.4-002 on OpenVMS Alpha V8.4-2L2
>
> (itanium) $ cc/version
> VSI C V7.4-001 on OpenVMS IA64 V8.4-2L1
>

Re: C compiler snag

<a1fd132d-2924-4b78-aee7-8034cadcab06n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14926&group=comp.os.vms#14926

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:2226:: with SMTP id n6mr12074570qkh.496.1621427445157;
Wed, 19 May 2021 05:30:45 -0700 (PDT)
X-Received: by 2002:a37:42c3:: with SMTP id p186mr11715720qka.352.1621427444830;
Wed, 19 May 2021 05:30:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 19 May 2021 05:30:44 -0700 (PDT)
In-Reply-To: <s82uek$kf3$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=146.115.158.54; posting-account=s7HKuwoAAADMBfdW6Z_Cf7mUOCtdYG2x
NNTP-Posting-Host: 146.115.158.54
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s82uek$kf3$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a1fd132d-2924-4b78-aee7-8034cadcab06n@googlegroups.com>
Subject: Re: C compiler snag
From: rvwha...@gmail.com (Richard Whalen)
Injection-Date: Wed, 19 May 2021 12:30:45 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Richard Whalen - Wed, 19 May 2021 12:30 UTC

On Wednesday, May 19, 2021 at 7:57:10 AM UTC-4, Craig A. Berry wrote:
> On 5/19/21 4:51 AM, Richard Levitte wrote:
> > Hey folks,
> >
> > it's been long since I've been present here... been all busy with
> > OpenSSL, not much time for something else.
> >
> > Now, speaking of OpenSSL, I'm hitting an "interesting" snag that I
> > can't seem to find a good solution for. It's easy to demonstrate, with
> > this set of files:
> >
> > humpf.c
> > [.incl]h.h
> > something.h
> >
> > ----- humpf.c
> > #include "./incl/h.h"
> >
> > int main()
> > {
> > }
> > -----
> >
> > ----- [.incl]h.h
> > #include "../something.h"
> > -----
> >
> > ----- something.h
> > int foo(void);
> > -----
> >
> > The content of those files isn't terribly interesting, but the inclusion sequence is, i.e. humpf.c includes "./incl/h.h" includes "../something.h". Structures like this may seem strange, but they do exist. So now for the snag:
> >
> > -----
> > $ cc humpf.c
> >
> > #include "../something.h"
> > .^
> > %CC-F-NOINCLFILEF, Cannot find file "../something.h" specified in #include directive.
> > at line number 1 in file USER:[LEVITTE.TEST.CC-INCL-2.INCL]h.h;1
> > -----
> >
>
> > So my question is, is there any trick that I can do with the
> > compiler to make this go through without error? i would rather not have to
> > restructure the inclusion if I can.
> Have you tried specifying the current working directory in Unix format
> on the command line:
> cc/include="./" humpf.c
>
> ?
>
> I think I remember something like that being necessary for some
> situation, but I'm not sure if it was this situation exactly.
>
> Other than that, SET WATCH FILE is your friend for figuring out where
> exactly the compiler is looking for the file it can't find.
> > Version data:
> >
> > (alpha) $ cc/version
> > VSI C V7.4-002 on OpenVMS Alpha V8.4-2L2
> >
> > (itanium) $ cc/version
> > VSI C V7.4-001 on OpenVMS IA64 V8.4-2L1
> >

I think that you need to look at /NESTED_INCLUDE_DIRECTORY

Re: C compiler snag

<97ab1e80-7d4e-4174-be3b-525e3814d0adn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14929&group=comp.os.vms#14929

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:aed:20e3:: with SMTP id 90mr7939254qtb.165.1621428384722;
Wed, 19 May 2021 05:46:24 -0700 (PDT)
X-Received: by 2002:a0c:aa1d:: with SMTP id d29mr8039595qvb.47.1621428384566;
Wed, 19 May 2021 05:46:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!usenet.pasdenom.info!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 19 May 2021 05:46:24 -0700 (PDT)
In-Reply-To: <s82uek$kf3$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=74.140.8.188; posting-account=CO-_tAoAAACjjs2KLAw3xVKCy6Z_J3VK
NNTP-Posting-Host: 74.140.8.188
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s82uek$kf3$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <97ab1e80-7d4e-4174-be3b-525e3814d0adn@googlegroups.com>
Subject: Re: C compiler snag
From: osuvma...@gmail.com (David Jones)
Injection-Date: Wed, 19 May 2021 12:46:24 +0000
Content-Type: text/plain; charset="UTF-8"
 by: David Jones - Wed, 19 May 2021 12:46 UTC

On Wednesday, May 19, 2021 at 7:57:10 AM UTC-4, Craig A. Berry wrote:

> Have you tried specifying the current working directory in Unix format
> on the command line:
> cc/include="./" humpf.c
>
> ?
>
> I think I remember something like that being necessary for some
> situation, but I'm not sure if it was this situation exactly.
>

I replicated the problem, and got it work with
cc/include="./incl" humpf.c

Specifying various values of /nest_include made no difference.

Re: C compiler snag

<s831il$b0e$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14931&group=comp.os.vms#14931

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wb8...@qsl.net_work (John E. Malmberg)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Wed, 19 May 2021 07:50:49 -0500
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <s831il$b0e$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 May 2021 12:50:29 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c1a289563dcff0b115556cb316416733";
logging-data="11278"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18m8dWM6X+62WRKFXpMVvp9"
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
Cancel-Lock: sha1:YGLjArlXhb1J/xgTPV49RnRUyUE=
In-Reply-To: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
Content-Language: en-US
 by: John E. Malmberg - Wed, 19 May 2021 12:50 UTC

On 5/19/2021 4:51 AM, Richard Levitte wrote:
> Hey folks,
>
> it's been long since I've been present here... been all busy with
> OpenSSL, not much time for something else.

<snip>

>
> -----
> $ cc humpf.c
>
> #include "../something.h"
> .^
> %CC-F-NOINCLFILEF, Cannot find file "../something.h" specified in #include directive.
> at line number 1 in file USER:[LEVITTE.TEST.CC-INCL-2.INCL]h.h;1
> -----
>
> So my question is, is there any trick that I can do with the compiler
> to make this go through without error? i would rather not have to
> restructure the inclusion if I can.

Only solution that I have found is to run a pre-build script to find and
re-edit the source code to change "../" to path or a logical name.

I don't thing that is ever going to get fixed in the Alpha/IA64 compilers.

Regards,
-John

Re: C compiler snag

<c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14934&group=comp.os.vms#14934

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:b1b:: with SMTP id t27mr12216194qkg.42.1621433170452;
Wed, 19 May 2021 07:06:10 -0700 (PDT)
X-Received: by 2002:a37:8185:: with SMTP id c127mr4416916qkd.477.1621433170262;
Wed, 19 May 2021 07:06:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 19 May 2021 07:06:10 -0700 (PDT)
In-Reply-To: <s831il$b0e$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=73.60.215.82; posting-account=M3IgSwoAAADJd6EnOmsrCCfB6_OyTOkv
NNTP-Posting-Host: 73.60.215.82
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s831il$b0e$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
Subject: Re: C compiler snag
From: xyzzy1...@gmail.com (John Reagan)
Injection-Date: Wed, 19 May 2021 14:06:10 +0000
Content-Type: text/plain; charset="UTF-8"
 by: John Reagan - Wed, 19 May 2021 14:06 UTC

On Wednesday, May 19, 2021 at 8:50:32 AM UTC-4, John E. Malmberg wrote:
> On 5/19/2021 4:51 AM, Richard Levitte wrote:
> > Hey folks,
> >
> > it's been long since I've been present here... been all busy with
> > OpenSSL, not much time for something else.
> <snip>
> >
> > -----
> > $ cc humpf.c
> >
> > #include "../something.h"
> > .^
> > %CC-F-NOINCLFILEF, Cannot find file "../something.h" specified in #include directive.
> > at line number 1 in file USER:[LEVITTE.TEST.CC-INCL-2.INCL]h.h;1
> > -----
> >
> > So my question is, is there any trick that I can do with the compiler
> > to make this go through without error? i would rather not have to
> > restructure the inclusion if I can.
> Only solution that I have found is to run a pre-build script to find and
> re-edit the source code to change "../" to path or a logical name.
>
> I don't thing that is ever going to get fixed in the Alpha/IA64 compilers.
>
> Regards,
> -John
I doubt the compilers are at fault. At somepoint, we give that filespec to the CRTL's open/fopen.

Relative filespecs are controlled by various DECC$ feature logicals <insert ugly comment here>.
DECC$POSIX_COMPLIANT_PATHNAMES might help but setting that the DCL prompt before the
compilation might be too big of a hammer as some code <insert 2nd ugly comment here>.

I have the same issue with some of the files in LLVM that use relative filespecs.

Re: C compiler snag

<s83hkj$4l8$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14941&group=comp.os.vms#14941

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Wed, 19 May 2021 17:24:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <s83hkj$4l8$2@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s831il$b0e$1@dont-email.me> <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
Injection-Date: Wed, 19 May 2021 17:24:35 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="bb2f3beedb84725d491f50a8dba724ae";
logging-data="4776"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lfnhRWVQ5SnHWtWRP1bWD0VtEasfUIR4="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:SLak7JmSnW2fkCYg6aqf1vw5c20=
 by: Simon Clubley - Wed, 19 May 2021 17:24 UTC

On 2021-05-19, John Reagan <xyzzy1959@gmail.com> wrote:
> I doubt the compilers are at fault. At somepoint, we give that filespec to the CRTL's open/fopen.
>
> Relative filespecs are controlled by various DECC$ feature logicals <insert ugly comment here>.
> DECC$POSIX_COMPLIANT_PATHNAMES might help but setting that the DCL prompt before the
> compilation might be too big of a hammer as some code <insert 2nd ugly comment here>.
>
> I have the same issue with some of the files in LLVM that use relative filespecs.

That just means you don't have enough logicals to control behaviour, John.

You just need a few more logicals for extra configuration options. :-)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: C compiler snag

<3c031c67-1164-44c5-b50a-8f6b80cb4d82n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14946&group=comp.os.vms#14946

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ae9:ef55:: with SMTP id d82mr771166qkg.3.1621448766623;
Wed, 19 May 2021 11:26:06 -0700 (PDT)
X-Received: by 2002:a37:59c4:: with SMTP id n187mr815223qkb.218.1621448766457;
Wed, 19 May 2021 11:26:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!usenet.pasdenom.info!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 19 May 2021 11:26:06 -0700 (PDT)
In-Reply-To: <a1fd132d-2924-4b78-aee7-8034cadcab06n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:470:28:a97:0:0:1:1;
posting-account=xUWTYAoAAABY1mIetTAK3RSKrNCNVnz8
NNTP-Posting-Host: 2001:470:28:a97:0:0:1:1
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s82uek$kf3$1@dont-email.me> <a1fd132d-2924-4b78-aee7-8034cadcab06n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3c031c67-1164-44c5-b50a-8f6b80cb4d82n@googlegroups.com>
Subject: Re: C compiler snag
From: rich...@levitte.org (Richard Levitte)
Injection-Date: Wed, 19 May 2021 18:26:06 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Richard Levitte - Wed, 19 May 2021 18:26 UTC

onsdag 19 maj 2021 kl. 14:30:46 UTC+2 skrev rvwh...@gmail.com:

> I think that you need to look at /NESTED_INCLUDE_DIRECTORY

That defaults to INCLUDE_FILE, which seems sensible.

Re: C compiler snag

<99a84ae5-7c6e-410f-9752-038de852d33fn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14947&group=comp.os.vms#14947

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a37:644c:: with SMTP id y73mr717197qkb.331.1621448993367; Wed, 19 May 2021 11:29:53 -0700 (PDT)
X-Received: by 2002:ac8:74c2:: with SMTP id j2mr873855qtr.185.1621448993226; Wed, 19 May 2021 11:29:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 19 May 2021 11:29:52 -0700 (PDT)
In-Reply-To: <97ab1e80-7d4e-4174-be3b-525e3814d0adn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:470:28:a97:0:0:1:1; posting-account=xUWTYAoAAABY1mIetTAK3RSKrNCNVnz8
NNTP-Posting-Host: 2001:470:28:a97:0:0:1:1
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s82uek$kf3$1@dont-email.me> <97ab1e80-7d4e-4174-be3b-525e3814d0adn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <99a84ae5-7c6e-410f-9752-038de852d33fn@googlegroups.com>
Subject: Re: C compiler snag
From: rich...@levitte.org (Richard Levitte)
Injection-Date: Wed, 19 May 2021 18:29:53 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
 by: Richard Levitte - Wed, 19 May 2021 18:29 UTC

onsdag 19 maj 2021 kl. 14:46:25 UTC+2 skrev osuv...@gmail.com:
> I replicated the problem, and got it work with
> cc/include="./incl" humpf.c

Ah! That actually makes sense, albeit a bit strangely. What I understand is that with this, "../something.h" will among others get to look at "./incl/../something.h", and that will find the header file in question.

Gotta admit, though, that it's a bit annoying having to do this sort of trick...

Anyway, thanks! This does help quite a bit.

Cheers,
Richard

Re: C compiler snag

<s83lff$4sa$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14948&group=comp.os.vms#14948

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Wed, 19 May 2021 13:30:05 -0500
Organization: A noiseless patient Spider
Lines: 59
Message-ID: <s83lff$4sa$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s82uek$kf3$1@dont-email.me>
<97ab1e80-7d4e-4174-be3b-525e3814d0adn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 May 2021 18:30:07 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="bd79f9f7f97e9af937e2167375b4deda";
logging-data="5002"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yJ1vRaTCpUpONBIQHnfFRoJYHcokRBac="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.10.1
Cancel-Lock: sha1:FlZVfZlzSyT1mJuAjfFXook243k=
In-Reply-To: <97ab1e80-7d4e-4174-be3b-525e3814d0adn@googlegroups.com>
Content-Language: en-US
 by: Craig A. Berry - Wed, 19 May 2021 18:30 UTC

On 5/19/21 7:46 AM, David Jones wrote:
> On Wednesday, May 19, 2021 at 7:57:10 AM UTC-4, Craig A. Berry wrote:
>
>> Have you tried specifying the current working directory in Unix format
>> on the command line:
>> cc/include="./" humpf.c

Nope, that doesn't work.

> I replicated the problem, and got it work with
> cc/include="./incl" humpf.c

That works for this made-up case but may not be general enough. It also
works because ./incl/../something.h is the same as ./something.h, and
the grandchild may not always be in the same location as the
grandparent. You could specify any subdirectory, even a nonexistent
one, and the result would be the same. For example, this works:

$ cc/include="./nosuchdir" humpf

A bit of poking with SET WATCH FILE/CLASS=ALL and DFU shows that the
first place the compiler looks for something.h when no include
directories are specified explicitly is the parent directory one level
up from where humpf.c is located. The next place it looks is relative
to the POSIX root but at that point it's already given up on finding it
relative to the program being compiled.

So the compiler is honoring the relative portion of the path, but it is
considering it relative to the grandparent .c file or the current
working directory of the compile operation (which are the same in this
case) and *not* relative to the file containing the #include directive
(h.h).

Whether this is a bug or a feature I don't know. But it is definitely
different from what other compilers do.

> Specifying various values of /nest_include made no difference.
>

P.S. DFU was necessary because SET WATCH FILE gives you only the FID,
not the name, of the directory in a "Read only directory access"
message. So you have to take a message like this:

%XQP, Thread #0, Read only directory access (15599,12,0)

and find out what it is with:

$ mcr dfu search/fid=15599 dka7:

Disk and File Utilities for OpenVMS V3.2
%DFU-I-SEARCH, Start search on DKA7: ($2$DKA7:)

$2$DKA7:[000000]PSX$ROOT.DIR;1
1/16

%DFU-I-EOF, End of file INDEXF.SYS, Primary headers : 1

%DFU-S-FND , Files found : 1, Size : 1/16

Re: C compiler snag

<s841g1$oue$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14952&group=comp.os.vms#14952

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Wed, 19 May 2021 17:57:20 -0400
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <s841g1$oue$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s831il$b0e$1@dont-email.me>
<c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
<s83hkj$4l8$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 May 2021 21:55:14 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="cdeeeb90c971ce7a88e9b866ae5a6203";
logging-data="25550"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lIN8ib3O0OrW1Kd/GlXAnMCZlQfxy0D4="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:uDqCflLqQy8TRAeVXcslG7LGJYw=
In-Reply-To: <s83hkj$4l8$2@dont-email.me>
 by: Dave Froble - Wed, 19 May 2021 21:57 UTC

On 5/19/2021 1:24 PM, Simon Clubley wrote:
> On 2021-05-19, John Reagan <xyzzy1959@gmail.com> wrote:
>> I doubt the compilers are at fault. At somepoint, we give that filespec to the CRTL's open/fopen.
>>
>> Relative filespecs are controlled by various DECC$ feature logicals <insert ugly comment here>.
>> DECC$POSIX_COMPLIANT_PATHNAMES might help but setting that the DCL prompt before the
>> compilation might be too big of a hammer as some code <insert 2nd ugly comment here>.
>>
>> I have the same issue with some of the files in LLVM that use relative filespecs.
>
> That just means you don't have enough logicals to control behaviour, John.
>
> You just need a few more logicals for extra configuration options. :-)
>
> Simon.
>

Simon is now in big trouble with several people.

No, the smily isn't going to save you.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: C compiler snag

<s8460a$nlu$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14954&group=comp.os.vms#14954

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Wed, 19 May 2021 23:12:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <s8460a$nlu$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s831il$b0e$1@dont-email.me> <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com> <s83hkj$4l8$2@dont-email.me> <s841g1$oue$1@dont-email.me>
Injection-Date: Wed, 19 May 2021 23:12:11 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="08015f1ac925a4ff59de9f32a2ff3314";
logging-data="24254"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PWSSZF0nBBgHZ7xWRSzM7WPI60x7OqGI="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:jwFTyBJt3if26Wo4qSEgdvQaYPo=
 by: Simon Clubley - Wed, 19 May 2021 23:12 UTC

On 2021-05-19, Dave Froble <davef@tsoft-inc.com> wrote:
> On 5/19/2021 1:24 PM, Simon Clubley wrote:
>> On 2021-05-19, John Reagan <xyzzy1959@gmail.com> wrote:
>>> I doubt the compilers are at fault. At somepoint, we give that filespec to the CRTL's open/fopen.
>>>
>>> Relative filespecs are controlled by various DECC$ feature logicals <insert ugly comment here>.
>>> DECC$POSIX_COMPLIANT_PATHNAMES might help but setting that the DCL prompt before the
>>> compilation might be too big of a hammer as some code <insert 2nd ugly comment here>.
>>>
>>> I have the same issue with some of the files in LLVM that use relative filespecs.
>>
>> That just means you don't have enough logicals to control behaviour, John.
>>
>> You just need a few more logicals for extra configuration options. :-)
>>
>> Simon.
>>
>
> Simon is now in big trouble with several people.
>
> No, the smily isn't going to save you.
>

Well, it wouldn't be the first time that Simon has upset some people
around here. :-)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: C compiler snag

<s847k8$ea$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14957&group=comp.os.vms#14957

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Wed, 19 May 2021 19:41:47 -0400
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <s847k8$ea$2@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s831il$b0e$1@dont-email.me>
<c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
<s83hkj$4l8$2@dont-email.me> <s841g1$oue$1@dont-email.me>
<s8460a$nlu$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 19 May 2021 23:39:53 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="82d46104316b0355690dbd91ead02d61";
logging-data="458"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ya4Tgv0gV/kSEnOI6t8cTqF0eBzhiBj8="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:oGUJdAIzz8PjYl80uK1TeSGTZgI=
In-Reply-To: <s8460a$nlu$1@dont-email.me>
 by: Dave Froble - Wed, 19 May 2021 23:41 UTC

On 5/19/2021 7:12 PM, Simon Clubley wrote:
> On 2021-05-19, Dave Froble <davef@tsoft-inc.com> wrote:
>> On 5/19/2021 1:24 PM, Simon Clubley wrote:
>>> On 2021-05-19, John Reagan <xyzzy1959@gmail.com> wrote:
>>>> I doubt the compilers are at fault. At somepoint, we give that filespec to the CRTL's open/fopen.
>>>>
>>>> Relative filespecs are controlled by various DECC$ feature logicals <insert ugly comment here>.
>>>> DECC$POSIX_COMPLIANT_PATHNAMES might help but setting that the DCL prompt before the
>>>> compilation might be too big of a hammer as some code <insert 2nd ugly comment here>.
>>>>
>>>> I have the same issue with some of the files in LLVM that use relative filespecs.
>>>
>>> That just means you don't have enough logicals to control behaviour, John.
>>>
>>> You just need a few more logicals for extra configuration options. :-)
>>>
>>> Simon.
>>>
>>
>> Simon is now in big trouble with several people.
>>
>> No, the smily isn't going to save you.
>>
>
> Well, it wouldn't be the first time that Simon has upset some people
> around here. :-)

You claiming to be a troll?

:-)

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: C compiler snag

<s84924$6qi$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14959&group=comp.os.vms#14959

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Thu, 20 May 2021 00:04:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <s84924$6qi$2@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s831il$b0e$1@dont-email.me> <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com> <s83hkj$4l8$2@dont-email.me> <s841g1$oue$1@dont-email.me> <s8460a$nlu$1@dont-email.me> <s847k8$ea$2@dont-email.me>
Injection-Date: Thu, 20 May 2021 00:04:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="08015f1ac925a4ff59de9f32a2ff3314";
logging-data="6994"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fHPhtGsO8SnnWwI5X8MyoF2G9yNDoC6E="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:CvlGEMoQL7RtxbQoDov6ZVYIqUc=
 by: Simon Clubley - Thu, 20 May 2021 00:04 UTC

On 2021-05-19, Dave Froble <davef@tsoft-inc.com> wrote:
> On 5/19/2021 7:12 PM, Simon Clubley wrote:
>> On 2021-05-19, Dave Froble <davef@tsoft-inc.com> wrote:
>>> On 5/19/2021 1:24 PM, Simon Clubley wrote:
>>>> On 2021-05-19, John Reagan <xyzzy1959@gmail.com> wrote:
>>>>> I doubt the compilers are at fault. At somepoint, we give that filespec to the CRTL's open/fopen.
>>>>>
>>>>> Relative filespecs are controlled by various DECC$ feature logicals <insert ugly comment here>.
>>>>> DECC$POSIX_COMPLIANT_PATHNAMES might help but setting that the DCL prompt before the
>>>>> compilation might be too big of a hammer as some code <insert 2nd ugly comment here>.
>>>>>
>>>>> I have the same issue with some of the files in LLVM that use relative filespecs.
>>>>
>>>> That just means you don't have enough logicals to control behaviour, John.
>>>>
>>>> You just need a few more logicals for extra configuration options. :-)
>>>>
>>>> Simon.
>>>>
>>>
>>> Simon is now in big trouble with several people.
>>>
>>> No, the smily isn't going to save you.
>>>
>>
>> Well, it wouldn't be the first time that Simon has upset some people
>> around here. :-)
>
> You claiming to be a troll?
>
>:-)
>

No David. Just someone willing to speak some uncomfortable truths
when needed.

(However, the comment to John was a joke.)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: C compiler snag

<s88ccl$2ss$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14992&group=comp.os.vms#14992

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wb8...@qsl.net_work (John E. Malmberg)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Fri, 21 May 2021 08:26:05 -0500
Organization: A noiseless patient Spider
Lines: 86
Message-ID: <s88ccl$2ss$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s831il$b0e$1@dont-email.me>
<c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 21 May 2021 13:25:42 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="da3fe444ce62d1c98158a0d56698a335";
logging-data="2972"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19meTL0LDnbl3b8iVSyNxgi"
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
Cancel-Lock: sha1:5O7+iPPa1LSMf0/MMF4hhpf05eI=
In-Reply-To: <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
Content-Language: en-US
 by: John E. Malmberg - Fri, 21 May 2021 13:26 UTC

On 5/19/2021 9:06 AM, John Reagan wrote:
> On Wednesday, May 19, 2021 at 8:50:32 AM UTC-4, John E. Malmberg wrote:
>> On 5/19/2021 4:51 AM, Richard Levitte wrote:
>>> Hey folks,
>>>
>>> it's been long since I've been present here... been all busy with
>>> OpenSSL, not much time for something else.
>> <snip>
>>>
>>> -----
>>> $ cc humpf.c
>>>
>>> #include "../something.h"
>>> .^
>>> %CC-F-NOINCLFILEF, Cannot find file "../something.h" specified in #include directive.
>>> at line number 1 in file USER:[LEVITTE.TEST.CC-INCL-2.INCL]h.h;1
>>> -----
>>>
>>> So my question is, is there any trick that I can do with the compiler
>>> to make this go through without error? i would rather not have to
>>> restructure the inclusion if I can.
>> Only solution that I have found is to run a pre-build script to find and
>> re-edit the source code to change "../" to path or a logical name.
>>
>> I don't thing that is ever going to get fixed in the Alpha/IA64 compilers.
>>
>> Regards,
>> -John
> I doubt the compilers are at fault. At somepoint, we give that filespec to the CRTL's open/fopen.
>
> Relative filespecs are controlled by various DECC$ feature logicals <insert ugly comment here>.
> DECC$POSIX_COMPLIANT_PATHNAMES might help but setting that the DCL prompt before the
> compilation might be too big of a hammer as some code <insert 2nd ugly comment here>.
>
> I have the same issue with some of the files in LLVM that use relative filespecs.

The C compiler seems to isolate it self, and ignores most of the DECC$
feature logical settings that I have tried.

I will have to add some tests to gnulib-assist to see if I can duplicate
the exact problem, but for that I need to know what exactly the
compilers are passing to the CRTL.

By itself, the CRTL seems to handle most of the the "../" cases for path
to a filename.

The compiler however is doing some extra stuff with processing the
directory found in a header file depending on the options set for the
compiler on the command line (And possibly #pragmas)

And I have demonstrated that the Compiler handling of filenames is
different than the CRTL in that the <net/xxxx.h> headers in the text
library can not be accessed by the compiler if decnet is running.

The CRTL does does not have a issue with converting "net/xxx.h" to
[.net]xxx.h for finding files. Only the C Compiler treats "net/xxx.h"
as net:xxx.h and then fails the compile, very similar to the ".." failure.

The behavior that I see:

If the directory is present in the specification and is a logical name,
that logical name is used. CRTL feature settings do not appear to
affect this for the C compiler, but do affect it for user programs.

Depending on the compiler settings, if a directory is present in the
specification and exists in the source code, then the header will be
used from that directory instead of the OpenVMS text libraries, except
if the directory is specified as "..".

The case of ".." is a case where this does not work, and I can not
reproduce this failure with just test programs on the CRTL, regardless
of the feature settings.

If the directory is present and is not ".." and does not exist, it
discards it and uses the OpenVMS text libraries for the headers. This
has turned out to be a very useful feature to insure that my code
includes the OpenVMS header file instead of a file with the same name
used by a project. (Pretty common in open source porting)

Either way the current behavior of the compiler is incorrect. If it is
in the CRTL, then it is bug and should get fixed there, otherwise it
should get fixed or worked around in the compiler, just like the
handling of the decnet NET: device needs to get fixed in the compiler.

Regards,
-John

Re: C compiler snag

<e701f21c-d6fb-48ad-ad2d-69a019992210n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14993&group=comp.os.vms#14993

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:100e:: with SMTP id d14mr11756078qte.192.1621607690216; Fri, 21 May 2021 07:34:50 -0700 (PDT)
X-Received: by 2002:ae9:e406:: with SMTP id q6mr12211779qkc.406.1621607689934; Fri, 21 May 2021 07:34:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 21 May 2021 07:34:49 -0700 (PDT)
In-Reply-To: <s88ccl$2ss$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=73.60.215.82; posting-account=M3IgSwoAAADJd6EnOmsrCCfB6_OyTOkv
NNTP-Posting-Host: 73.60.215.82
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s831il$b0e$1@dont-email.me> <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com> <s88ccl$2ss$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e701f21c-d6fb-48ad-ad2d-69a019992210n@googlegroups.com>
Subject: Re: C compiler snag
From: xyzzy1...@gmail.com (John Reagan)
Injection-Date: Fri, 21 May 2021 14:34:50 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 90
 by: John Reagan - Fri, 21 May 2021 14:34 UTC

On Friday, May 21, 2021 at 9:25:44 AM UTC-4, John E. Malmberg wrote:
> On 5/19/2021 9:06 AM, John Reagan wrote:
> > On Wednesday, May 19, 2021 at 8:50:32 AM UTC-4, John E. Malmberg wrote:
> >> On 5/19/2021 4:51 AM, Richard Levitte wrote:
> >>> Hey folks,
> >>>
> >>> it's been long since I've been present here... been all busy with
> >>> OpenSSL, not much time for something else.
> >> <snip>
> >>>
> >>> -----
> >>> $ cc humpf.c
> >>>
> >>> #include "../something.h"
> >>> .^
> >>> %CC-F-NOINCLFILEF, Cannot find file "../something.h" specified in #include directive.
> >>> at line number 1 in file USER:[LEVITTE.TEST.CC-INCL-2.INCL]h.h;1
> >>> -----
> >>>
> >>> So my question is, is there any trick that I can do with the compiler
> >>> to make this go through without error? i would rather not have to
> >>> restructure the inclusion if I can.
> >> Only solution that I have found is to run a pre-build script to find and
> >> re-edit the source code to change "../" to path or a logical name.
> >>
> >> I don't thing that is ever going to get fixed in the Alpha/IA64 compilers.
> >>
> >> Regards,
> >> -John
> > I doubt the compilers are at fault. At somepoint, we give that filespec to the CRTL's open/fopen.
> >
> > Relative filespecs are controlled by various DECC$ feature logicals <insert ugly comment here>.
> > DECC$POSIX_COMPLIANT_PATHNAMES might help but setting that the DCL prompt before the
> > compilation might be too big of a hammer as some code <insert 2nd ugly comment here>.
> >
> > I have the same issue with some of the files in LLVM that use relative filespecs.
> The C compiler seems to isolate it self, and ignores most of the DECC$
> feature logical settings that I have tried.
>
> I will have to add some tests to gnulib-assist to see if I can duplicate
> the exact problem, but for that I need to know what exactly the
> compilers are passing to the CRTL.
>
> By itself, the CRTL seems to handle most of the the "../" cases for path
> to a filename.
>
> The compiler however is doing some extra stuff with processing the
> directory found in a header file depending on the options set for the
> compiler on the command line (And possibly #pragmas)
>
> And I have demonstrated that the Compiler handling of filenames is
> different than the CRTL in that the <net/xxxx.h> headers in the text
> library can not be accessed by the compiler if decnet is running.
>
> The CRTL does does not have a issue with converting "net/xxx.h" to
> [.net]xxx.h for finding files. Only the C Compiler treats "net/xxx.h"
> as net:xxx.h and then fails the compile, very similar to the ".." failure.
>
> The behavior that I see:
>
> If the directory is present in the specification and is a logical name,
> that logical name is used. CRTL feature settings do not appear to
> affect this for the C compiler, but do affect it for user programs.
>
> Depending on the compiler settings, if a directory is present in the
> specification and exists in the source code, then the header will be
> used from that directory instead of the OpenVMS text libraries, except
> if the directory is specified as "..".
>
> The case of ".." is a case where this does not work, and I can not
> reproduce this failure with just test programs on the CRTL, regardless
> of the feature settings.
>
> If the directory is present and is not ".." and does not exist, it
> discards it and uses the OpenVMS text libraries for the headers. This
> has turned out to be a very useful feature to insure that my code
> includes the OpenVMS header file instead of a file with the same name
> used by a project. (Pretty common in open source porting)
>
> Either way the current behavior of the compiler is incorrect. If it is
> in the CRTL, then it is bug and should get fixed there, otherwise it
> should get fixed or worked around in the compiler, just like the
> handling of the decnet NET: device needs to get fixed in the compiler.
>
> Regards,
> -John
I'll do more research but there is nothing of your description that matches what
I know. There is some GEM code mixed in as well. I don't see the C compiler (or
the C++) compiler doing anything to avoid DECC$ logicals. For example, turn on
DECC$POSIX_COMPLIANT_PATHNAMES and watch the compiler not able to find
..TLB files, etc.

Re: C compiler snag

<s88lgb$o6v$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14994&group=comp.os.vms#14994

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Fri, 21 May 2021 11:01:14 -0500
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <s88lgb$o6v$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s831il$b0e$1@dont-email.me>
<c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
<s88ccl$2ss$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 21 May 2021 16:01:15 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7a20c2cfda0dca24b548ccbcac410e60";
logging-data="24799"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2iNXmRnJb7RIaQkvtTY1hEh7XAwg5S4k="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.10.2
Cancel-Lock: sha1:LrSnNguxu4iSmOQSU9t8EBU2rGk=
In-Reply-To: <s88ccl$2ss$1@dont-email.me>
Content-Language: en-US
 by: Craig A. Berry - Fri, 21 May 2021 16:01 UTC

On 5/21/21 8:26 AM, John E. Malmberg wrote:
> Depending on the compiler settings, if a directory is present in the
> specification and exists in the source code, then the header will be
> used from that directory instead of the OpenVMS text libraries, except
> if the directory is specified as "..".
>
> The case of ".." is a case where this does not work, and I can not
> reproduce this failure with just test programs on the CRTL, regardless
> of the feature settings.

You seem to have missed my analysis showing that ../ does work but the
question about handling relative paths is relative to what? As far as I
can find, there is no standard and how this is handled is
implementation-defined. Most compilers seem to specify that it's
relative to the file in which the #include directive is found. The VMS
compiler doesn't do that but looks for the header relative to either the
top-level compilation unit or the current working directory from which
the compile command was run. The two were one and the same in the
example originally posted, so it's impossible to know which without
further analysis (or reading the compiler sources, which I don't have).

Re: C compiler snag

<s88rev$2r8$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14997&group=comp.os.vms#14997

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Fri, 21 May 2021 17:42:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <s88rev$2r8$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s831il$b0e$1@dont-email.me> <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com> <s88ccl$2ss$1@dont-email.me> <e701f21c-d6fb-48ad-ad2d-69a019992210n@googlegroups.com>
Injection-Date: Fri, 21 May 2021 17:42:56 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f8fbefe2ee13716461696436e5273a06";
logging-data="2920"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JYgD5OntZnvh8WGyXSixdoBYeolYdVew="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:MtIftZKbl98zP8JnPM1OE72FNTU=
 by: Simon Clubley - Fri, 21 May 2021 17:42 UTC

On 2021-05-21, John Reagan <xyzzy1959@gmail.com> wrote:
> I'll do more research but there is nothing of your description that matches what
> I know. There is some GEM code mixed in as well. I don't see the C compiler (or
> the C++) compiler doing anything to avoid DECC$ logicals. For example, turn on
> DECC$POSIX_COMPLIANT_PATHNAMES and watch the compiler not able to find
> .TLB files, etc.

John is very right about this. There is a problem when you use net/
within an include statement. The following code compiles: !!!

---------------------------------------------------------------------------
$ type nettest.c
#include <stdio.h>
#include <net/does_not_exist.h>

int main(int argc, char *argv[])
{
printf("Testing net include\n");
return 0;
}
$ cc nettest.c
---------------------------------------------------------------------------

Change this to the following and you get the expected error:

---------------------------------------------------------------------------
$ type nettest.c
#include <stdio.h>
#include <net1/does_not_exist.h>

int main(int argc, char *argv[])
{
printf("Testing net include\n");
return 0;
}
$ cc nettest.c

#include <net1/does_not_exist.h>
..^
%CC-F-NOINCLFILEF, Cannot find file <net1/does_not_exist.h> specified in #includ
e directive.
---------------------------------------------------------------------------

$ cc/version
VSI C V7.4-002 on OpenVMS Alpha V8.4-2L2

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: C compiler snag

<s88rlk$2r8$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14998&group=comp.os.vms#14998

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Fri, 21 May 2021 17:46:28 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <s88rlk$2r8$2@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s831il$b0e$1@dont-email.me> <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com> <s88ccl$2ss$1@dont-email.me> <e701f21c-d6fb-48ad-ad2d-69a019992210n@googlegroups.com> <s88rev$2r8$1@dont-email.me>
Injection-Date: Fri, 21 May 2021 17:46:28 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f8fbefe2ee13716461696436e5273a06";
logging-data="2920"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QBn1HmJqphomiLMEY0rg3aUKogzLuubM="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:ztXuLtLfUR+J+G263OUpxYJ5IwM=
 by: Simon Clubley - Fri, 21 May 2021 17:46 UTC

On 2021-05-21, Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
> On 2021-05-21, John Reagan <xyzzy1959@gmail.com> wrote:
>> I'll do more research but there is nothing of your description that matches what
>> I know. There is some GEM code mixed in as well. I don't see the C compiler (or
>> the C++) compiler doing anything to avoid DECC$ logicals. For example, turn on
>> DECC$POSIX_COMPLIANT_PATHNAMES and watch the compiler not able to find
>> .TLB files, etc.
>
> John is very right about this. There is a problem when you use net/
> within an include statement. The following code compiles: !!!

That is John Malmberg is right about this. Too many people called John
around here. :-)

Simon.

>
> ---------------------------------------------------------------------------
> $ type nettest.c
> #include <stdio.h>
> #include <net/does_not_exist.h>
>
> int main(int argc, char *argv[])
> {
> printf("Testing net include\n");
> return 0;
> }
> $ cc nettest.c
> ---------------------------------------------------------------------------
>
> Change this to the following and you get the expected error:
>
> ---------------------------------------------------------------------------
> $ type nettest.c
> #include <stdio.h>
> #include <net1/does_not_exist.h>
>
> int main(int argc, char *argv[])
> {
> printf("Testing net include\n");
> return 0;
> }
> $ cc nettest.c
>
> #include <net1/does_not_exist.h>
> .^
> %CC-F-NOINCLFILEF, Cannot find file <net1/does_not_exist.h> specified in #includ
> e directive.
> ---------------------------------------------------------------------------
>
> $ cc/version
> VSI C V7.4-002 on OpenVMS Alpha V8.4-2L2
>
> Simon.
>

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

net: device (Re: C compiler snag)

<s891og$kms$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=14999&group=comp.os.vms#14999

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: net: device (Re: C compiler snag)
Date: Fri, 21 May 2021 14:30:22 -0500
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <s891og$kms$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s831il$b0e$1@dont-email.me>
<c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
<s88ccl$2ss$1@dont-email.me>
<e701f21c-d6fb-48ad-ad2d-69a019992210n@googlegroups.com>
<s88rev$2r8$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 21 May 2021 19:30:24 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7a20c2cfda0dca24b548ccbcac410e60";
logging-data="21212"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gfGazNDHQUTusgi9xZp+Q95RqPkNZjXQ="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.10.2
Cancel-Lock: sha1:8a7SehG94dkTQbOmdPl6+z57uvs=
In-Reply-To: <s88rev$2r8$1@dont-email.me>
Content-Language: en-US
 by: Craig A. Berry - Fri, 21 May 2021 19:30 UTC

On 5/21/21 12:42 PM, Simon Clubley wrote:
> There is a problem when you use net/
> within an include statement. The following code compiles: !!!
>
> ---------------------------------------------------------------------------
> $ type nettest.c
> #include <stdio.h>
> #include <net/does_not_exist.h>
>
> int main(int argc, char *argv[])
> {
> printf("Testing net include\n");
> return 0;
> }
> $ cc nettest.c
> ---------------------------------------------------------------------------

Bug or feature I don't know, but again it seems to have nothing to do
with the compiler. Opening a non-existent file on the net: device
returns success. What you expect from opening a non-existent file:

$ perl -e "open my $f, '<', 'nosuchfile.dat' or die $^E;"
%RMS-E-FNF, file not found at -e line 1.
%SYSTEM-F-ABORT, abort

What you get when you prepend "net:" to the filename:

$ perl -e "open my $f, '<', 'net:nosuchfile.dat' or die $^E;"
$ show symbol $status
$STATUS == "%X00000001"

Note that you can't reproduce this with DCL:

$ open f net:nosuchfile.dat
%DCL-E-INVRFM, invalid record format for record I/O - file not opened

So the compiler is just converting net/does_not_exist.h to VMS syntax
net:does_not_exist.h and getting a successful open but nothing happens
when you read from it (except EOF I guess). The filename portion
doesn't matter and seems to be ignored. As far as I can tell, the
behavior is identical to that of _NLA0:.

The compiler could also be led astray by:

#include "nl/foo.h"

Re: net: device (Re: C compiler snag)

<s897pn$9to$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=15001&group=comp.os.vms#15001

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: net: device (Re: C compiler snag)
Date: Fri, 21 May 2021 21:13:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <s897pn$9to$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com> <s831il$b0e$1@dont-email.me> <c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com> <s88ccl$2ss$1@dont-email.me> <e701f21c-d6fb-48ad-ad2d-69a019992210n@googlegroups.com> <s88rev$2r8$1@dont-email.me> <s891og$kms$1@dont-email.me>
Injection-Date: Fri, 21 May 2021 21:13:27 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f8fbefe2ee13716461696436e5273a06";
logging-data="10168"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VvLSIRU31YNRmkr17OJywSR8ChzfGFB4="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:It4bFRF6yfX/1Q73AdjBsmS4S4c=
 by: Simon Clubley - Fri, 21 May 2021 21:13 UTC

On 2021-05-21, Craig A. Berry <craigberry@nospam.mac.com> wrote:
> On 5/21/21 12:42 PM, Simon Clubley wrote:
>> There is a problem when you use net/
>> within an include statement. The following code compiles: !!!
>>
>> ---------------------------------------------------------------------------
>> $ type nettest.c
>> #include <stdio.h>
>> #include <net/does_not_exist.h>
>>
>> int main(int argc, char *argv[])
>> {
>> printf("Testing net include\n");
>> return 0;
>> }
>> $ cc nettest.c
>> ---------------------------------------------------------------------------
>
> Bug or feature I don't know, but again it seems to have nothing to do
> with the compiler. Opening a non-existent file on the net: device
> returns success. What you expect from opening a non-existent file:
>

I'm not so sure. Based on what has been said so far, I think this
is a compiler specific problem.

I think John Malmberg is right and that the compiler is wrongly
looking for a device (NET:) with the name of the net/ include directory
and using that instead of looking for a [.net] directory.

>
> So the compiler is just converting net/does_not_exist.h to VMS syntax
> net:does_not_exist.h and getting a successful open but nothing happens
> when you read from it (except EOF I guess). The filename portion
> doesn't matter and seems to be ignored. As far as I can tell, the
> behavior is identical to that of _NLA0:.
>

That's my understanding as well. What it should be doing instead is
looking for [.net]does_not_exist.h and then reporting an error when
it doesn't find the file in that location.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: net: device (Re: C compiler snag)

<s89dao$ida$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=15003&group=comp.os.vms#15003

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: net: device (Re: C compiler snag)
Date: Fri, 21 May 2021 17:47:51 -0500
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <s89dao$ida$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s831il$b0e$1@dont-email.me>
<c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
<s88ccl$2ss$1@dont-email.me>
<e701f21c-d6fb-48ad-ad2d-69a019992210n@googlegroups.com>
<s88rev$2r8$1@dont-email.me> <s891og$kms$1@dont-email.me>
<s897pn$9to$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 21 May 2021 22:47:52 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="64ff6baa1b9eab01bb5ccda06a2f3aba";
logging-data="18858"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qW/cKsDlRDo/UKKW7kWqsXh8sdACvLa4="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
Gecko/20100101 Thunderbird/78.10.2
Cancel-Lock: sha1:FF5Ard5Qrb1VIPM/KY2vQYvg2v8=
In-Reply-To: <s897pn$9to$1@dont-email.me>
Content-Language: en-US
 by: Craig A. Berry - Fri, 21 May 2021 22:47 UTC

On 5/21/21 4:13 PM, Simon Clubley wrote:
> On 2021-05-21, Craig A. Berry <craigberry@nospam.mac.com> wrote:
>> On 5/21/21 12:42 PM, Simon Clubley wrote:
>>> There is a problem when you use net/
>>> within an include statement. The following code compiles: !!!
>>>
>>> ---------------------------------------------------------------------------
>>> $ type nettest.c
>>> #include <stdio.h>
>>> #include <net/does_not_exist.h>
>>>
>>> int main(int argc, char *argv[])
>>> {
>>> printf("Testing net include\n");
>>> return 0;
>>> }
>>> $ cc nettest.c
>>> ---------------------------------------------------------------------------
>>
>> Bug or feature I don't know, but again it seems to have nothing to do
>> with the compiler. Opening a non-existent file on the net: device
>> returns success. What you expect from opening a non-existent file:
>>
>
> I'm not so sure. Based on what has been said so far, I think this
> is a compiler specific problem.
>
> I think John Malmberg is right and that the compiler is wrongly
> looking for a device (NET:) with the name of the net/ include directory
> and using that instead of looking for a [.net] directory.

I think John M is right that something goes wrong, but it's not clear to
me how much, if any, is the compiler's fault and how much is just how
things fall out from all the different special devices.

The compiler would have to have some special handling of prefixes such
as "sys/" and "net/" in order to look things up in
sys$library:decc$rtldef.tlb because a text library is just a key lookup
and there is no nesting. But the fact that the "nl/" prefix shows the
exact same behavior as the "net/" prefix suggests that this isn't the
problem, because /usr/include/nl is not a location that needs to be
emulated in the same way that /usr/include/sys and /usr/include/net do.

>> So the compiler is just converting net/does_not_exist.h to VMS syntax
>> net:does_not_exist.h and getting a successful open but nothing happens
>> when you read from it (except EOF I guess). The filename portion
>> doesn't matter and seems to be ignored. As far as I can tell, the
>> behavior is identical to that of _NLA0:.
>>
>
> That's my understanding as well. What it should be doing instead is
> looking for [.net]does_not_exist.h and then reporting an error when
> it doesn't find the file in that location.

That's the expected behavior for the source code on a Unix system, but
on VMS that's not necessarily correct behavior if "net" is a device name
or a logical name. The logical name case can be suppressed with
DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION -- you'll probably have to do
that if you have a 'sys" logical name defined.

It does seem possible the compiler is cutting off the prefix and testing
it as a device. That would explain why the following two tests behave
identically:

#include "net/nosuchfile.dat"
#include "nl/nosuchfile.dat"

This one is interesting:

#include "tt/nosuchfile.dat"

It will hang waiting for input from your terminal.

Re: C compiler snag

<s89il3$239$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=15004&group=comp.os.vms#15004

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wb8...@qsl.net_work (John E. Malmberg)
Newsgroups: comp.os.vms
Subject: Re: C compiler snag
Date: Fri, 21 May 2021 19:19:07 -0500
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <s89il3$239$1@dont-email.me>
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s831il$b0e$1@dont-email.me>
<c41b88b1-6fad-4d41-aed3-a03df1eb0eaan@googlegroups.com>
<s88ccl$2ss$1@dont-email.me>
<e701f21c-d6fb-48ad-ad2d-69a019992210n@googlegroups.com>
<s88rev$2r8$1@dont-email.me> <s88rlk$2r8$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 22 May 2021 00:18:43 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="af13cf23aa91607d67c2e6f33695e345";
logging-data="2153"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Hh2+r5H+GQimpczomkyN9"
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
Cancel-Lock: sha1:dgovnqlac74K49itcsBWt4ENTtc=
In-Reply-To: <s88rlk$2r8$2@dont-email.me>
Content-Language: en-US
 by: John E. Malmberg - Sat, 22 May 2021 00:19 UTC

On 5/21/2021 12:46 PM, Simon Clubley wrote:
> On 2021-05-21, Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
>> On 2021-05-21, John Reagan <xyzzy1959@gmail.com> wrote:
>>> I'll do more research but there is nothing of your description that matches what
>>> I know. There is some GEM code mixed in as well. I don't see the C compiler (or
>>> the C++) compiler doing anything to avoid DECC$ logicals. For example, turn on
>>> DECC$POSIX_COMPLIANT_PATHNAMES and watch the compiler not able to find
>>> .TLB files, etc.
>>
>> John is very right about this. There is a problem when you use net/
>> within an include statement. The following code compiles: !!!
>
> That is John Malmberg is right about this. Too many people called John
> around here. :-)

Wrong reproducer. The bug demonstrated in the GNV gnulib_assist self test.

The bug only trips for me with decnet phase IV running which creates a
NET0: device.

type [.vms]test_vms_if_h.c
#ifdef VMS_CRTL
#include <net/if.h>
#else
#include "vms/if.h"
#endif
#pragma assert_m non_zero(__IF_LOADED) "if.h did not get loaded."

Note, I have not tested the fragments posted here.

$ cdef = VMS_CRTL=1"
$ define/user decc$user_include "sys$disk:[.vms]"
$ CC/define=('cdef')'psize''cfloat''cinc'/noobj -
[.vms]test_vms_stdio_h.c

The <net/if.h> is a standard header file used in network programming in C.

You simply can not compile that source if DECNET phase IV is running.
Not sure about Phase V, yanked that out a while back.

I will be posting an update to the gnulib_assist sometime this weekend
after which all the things I have tests for will pass.

Current checked in code has a bug where it is skipping some tests and
the rename wrappers to generate correct rename behavior is not implemented.

Regards,
-John

Re: C compiler snag

<0f28d7d5-c01b-446d-a18b-a2d443967078n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22420&group=comp.os.vms#22420

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:4050:b0:69f:f11b:8814 with SMTP id i16-20020a05620a405000b0069ff11b8814mr530424qko.747.1651792420642;
Thu, 05 May 2022 16:13:40 -0700 (PDT)
X-Received: by 2002:a05:6214:21e9:b0:45a:995c:fc32 with SMTP id
p9-20020a05621421e900b0045a995cfc32mr331471qvj.32.1651792420488; Thu, 05 May
2022 16:13:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Thu, 5 May 2022 16:13:40 -0700 (PDT)
In-Reply-To: <s83lff$4sa$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:245c:a190:2a46:b4d8;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:245c:a190:2a46:b4d8
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s82uek$kf3$1@dont-email.me> <97ab1e80-7d4e-4174-be3b-525e3814d0adn@googlegroups.com>
<s83lff$4sa$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0f28d7d5-c01b-446d-a18b-a2d443967078n@googlegroups.com>
Subject: Re: C compiler snag
From: jake.ha...@gmail.com (Jake Hamby)
Injection-Date: Thu, 05 May 2022 23:13:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 95
 by: Jake Hamby - Thu, 5 May 2022 23:13 UTC

On Wednesday, May 19, 2021 at 11:30:09 AM UTC-7, Craig A. Berry wrote:
> On 5/19/21 7:46 AM, David Jones wrote:
> > On Wednesday, May 19, 2021 at 7:57:10 AM UTC-4, Craig A. Berry wrote:
> >
> >> Have you tried specifying the current working directory in Unix format
> >> on the command line:
> >> cc/include="./" humpf.c
> Nope, that doesn't work.
> > I replicated the problem, and got it work with
> > cc/include="./incl" humpf.c
> That works for this made-up case but may not be general enough. It also
> works because ./incl/../something.h is the same as ./something.h, and
> the grandchild may not always be in the same location as the
> grandparent. You could specify any subdirectory, even a nonexistent
> one, and the result would be the same. For example, this works:
>
> $ cc/include="./nosuchdir" humpf
>
> A bit of poking with SET WATCH FILE/CLASS=ALL and DFU shows that the
> first place the compiler looks for something.h when no include
> directories are specified explicitly is the parent directory one level
> up from where humpf.c is located. The next place it looks is relative
> to the POSIX root but at that point it's already given up on finding it
> relative to the program being compiled.
>
> So the compiler is honoring the relative portion of the path, but it is
> considering it relative to the grandparent .c file or the current
> working directory of the compile operation (which are the same in this
> case) and *not* relative to the file containing the #include directive
> (h.h).
>
> Whether this is a bug or a feature I don't know. But it is definitely
> different from what other compilers do.
> > Specifying various values of /nest_include made no difference.
> >
> P.S. DFU was necessary because SET WATCH FILE gives you only the FID,
> not the name, of the directory in a "Read only directory access"
> message. So you have to take a message like this:

Resurrecting this thread: did anyone ever find a resolution to the problem of the C compiler not being able to find headers when they're referenced in quotes with UNIX-style paths? I had trouble with the build script from VSI's Python 3.10.0 port, which I attempted to build on Alpha by changing the strings from I64 to AXP. I finally got a build going only for it to fail with:

CC /FLOAT=IEEE_FLOAT/IEEE=DENORM/NAMES=(AS_IS,SHORTENED)/ACCEPT=NOVAXC_KEYWORDS/REENTRANCY=MULTITHREAD/ARCH=EV56/OPT=(TU
NE=EV67)/ASSUME=NOHEADER_TYPE_DEFAULT/WARNINGS=(WARNINGS=ALL, DISABLE=(EXTRASEMI,MAYLOSEDATA3))/DEBUG/NOOPTIMIZE/LIST=[.
OUT.DEBUG.OBJ.Objects]bytearrayobject/SHOW=ALL/DEFINE=("Py_BUILD_CORE",_USE_STD_STAT, _POSIX_EXIT, __STDC_FORMAT_MACROS,
_LARGEFILE, _SOCKADDR_LEN, __SIGNED_INT_TIME_T, USE_ZLIB_CRC32, _OSF_SOURCE, HAVE_EXPAT_CONFIG_H, XML_POOR_ENTROPY, USE
_PYEXPAT_CAPI, CONFIG_32, ANSI, SOABI="""cpython-310-alpha-openvms""", SHLIB_EXT=""".EXE""", ABIFLAGS="""""", MULTIARCH"""cpython-310-alpha-openvms""", PLATFORM="""OpenVMS""", USE_SSL,_DEBUG)/INCLUDE_DIRECTORY=([], [.Include], [.Include.in
ternal], [.Modules.expat], [.Modules._decimal.libmpdec], [.Modules._multiprocessing], [.Modules._io], [.vms], oss$root:[
include], dtr$library, SSL111$ROOT:[INCLUDE]) /OBJECT=[.OUT.DEBUG.OBJ.Objects]bytearrayobject.obc [.Objects]bytearrayobj
ect.c

#include "clinic/bytearrayobject.c.h"
..^
%CC-F-NOINCLFILEF, Cannot find file "clinic/bytearrayobject.c.h" specified in #include directive.
at line number 75 in file USERS:[JHAMBY.Projects.vms-cpython.Objects]bytearrayobject.c;1
%MMS-F-ABORT, For target [.OUT.DEBUG.OBJ.Objects]bytearrayobject.obc, CLI returned abort status: %X10B91264.

No matter what I do, I can't figure out how to get it to locate the "clinic" subdirectory inside "[.Objects]bytearrayobject.c". Now the file ending in ".c.h" has me slightly worried, but I added "/assume=noheader_type_default" and it made no difference. I'm wondering if the problem is that the compiler is replacing the filename, minus the extension, with the name of the header file copied literally, and ending up with something like "[.Objects]clinic/bytearrayobject.c.h" that RMS can't decipher.

I was hoping maybe this was fixed on I64, since otherwise, how is VSI building Python themselves with their own scripts? Has the C compiler been patched to fix this issue and the patch isn't available to noncommercial users like myself? I'd like to find a fix or a workaround because it makes building programs that use header files containing slashes that are searched relative to the source file name (standard default behavior for UNIX compilers for quoted include files) much more difficult.

Regards,
Jake Hamby

Re: C compiler snag

<13f29181-4697-447f-9ea3-474ef174c667n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=22424&group=comp.os.vms#22424

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a37:de0c:0:b0:69e:cd37:7646 with SMTP id h12-20020a37de0c000000b0069ecd377646mr839978qkj.449.1651799526897;
Thu, 05 May 2022 18:12:06 -0700 (PDT)
X-Received: by 2002:ac8:5905:0:b0:2f3:9fdd:22f1 with SMTP id
5-20020ac85905000000b002f39fdd22f1mr760963qty.191.1651799526735; Thu, 05 May
2022 18:12:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Thu, 5 May 2022 18:12:06 -0700 (PDT)
In-Reply-To: <0f28d7d5-c01b-446d-a18b-a2d443967078n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=76.76.60.100; posting-account=OjKUgAkAAAAXAqdVEKd-Gc8RltEUx3Xq
NNTP-Posting-Host: 76.76.60.100
References: <31cfaa19-d31a-437d-ae72-c9e66b562351n@googlegroups.com>
<s82uek$kf3$1@dont-email.me> <97ab1e80-7d4e-4174-be3b-525e3814d0adn@googlegroups.com>
<s83lff$4sa$1@dont-email.me> <0f28d7d5-c01b-446d-a18b-a2d443967078n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <13f29181-4697-447f-9ea3-474ef174c667n@googlegroups.com>
Subject: Re: C compiler snag
From: sms.anti...@gmail.com (Steven Schweda)
Injection-Date: Fri, 06 May 2022 01:12:06 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Steven Schweda - Fri, 6 May 2022 01:12 UTC

> Resurrecting this thread: did anyone ever find a resolution to the
> problem of the C compiler not being able to find headers when they're
> referenced in quotes with UNIX-style paths? [...]

Looks to me like a different problem.

> [...] I can't figure out how to get it to locate the "clinic"
> subdirectory [...]

That's not the actual problem.

Many "UNIX-style paths" work just fine. Simple paths with multiple
dots also seem to work. _Your_ case fails:

its $ type jh.c;
#include "a.d.g"
#include "sd/b.h"
#include "sd/b.c.h"

its $ cc /noobj jh.c

#include "sd/b.c.h"
..^
%CC-F-NOINCLFILEF, Cannot find file "sd/b.c.h" specified in #include directive.
at line number 3 in file ITS$DKA0:[SMS.itrc.hamby]jh.c;7

The first two directives work. A simple explanation of why the third
one would fail did not leap to my mind.

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor