Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Don't you wish you had more energy... or less ambition?


comp / comp.unix.bsd.misc / [4.3BSD] List of cpp's predefined macros?

SubjectAuthor
* [4.3BSD] List of cpp's predefined macros?Dario Niedermann
`* Re: [4.3BSD] List of cpp's predefined macros?Claudio Calvelli
 `* Re: [4.3BSD] List of cpp's predefined macros?Dario Niedermann
  `* Re: [4.3BSD] List of cpp's predefined macros?Richard Tobin
   `- Re: [4.3BSD] List of cpp's predefined macros?Dario Niedermann

1
Subject: [4.3BSD] List of cpp's predefined macros?
From: Dario Niedermann
Newsgroups: comp.unix.bsd.misc
Organization: Not speaking for any
Date: Fri, 10 Jul 2020 18:04 UTC
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dario@darioniedermann.it (Dario Niedermann)
Newsgroups: comp.unix.bsd.misc
Subject: [4.3BSD] List of cpp's predefined macros?
Date: Fri, 10 Jul 2020 20:04:30 +0200
Organization: Not speaking for any
Lines: 16
Message-ID: <slrnrghbde.irq.dario@darioniedermann.it>
Injection-Info: reader02.eternal-september.org; posting-host="a06e704039dd0bcf077f5e3020d05966";
logging-data="16748"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19o3gsH4vvOv8vyQT8N1eow"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:d1/cZ2TxRw588P2w9XIIy0nOdRM=
X-Bogomips: 4788.44
X-Linux-Distro: Devuan ASCII
X-Text-Editor: nvi-1.81.6 (2007-11-18)
View all headers

I'm running 4.3BSD-Reno on an emulated VAX-11/780. The C compiler
installed is the one from Berkeley, dated 1985-86 (according to `what`).

I've hit a bit of a roadblock because I can't find a way to list all of
cpp's pre-defined macros on this system. The method I use with GNU cpp
doesn't work, and I don't have a man page installed for cpp
(the cc man page doesn't say anything about this either).

Does anyone know a way to do this?

TIA!

--
Dario Niedermann. Also on the Internet at:

gopher://darioniedermann.it/ <> https://www.darioniedermann.it/

Subject: Re: [4.3BSD] List of cpp's predefined macros?
From: Claudio Calvelli
Newsgroups: comp.unix.bsd.misc
Organization: No thanks
Date: Fri, 10 Jul 2020 18:57 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: c.news@w42.org.invalid (Claudio Calvelli)
Newsgroups: comp.unix.bsd.misc
Subject: Re: [4.3BSD] List of cpp's predefined macros?
Date: Fri, 10 Jul 2020 18:57:07 -0000 (UTC)
Organization: No thanks
Lines: 20
Message-ID: <slrnrgheg3.mkr.c.news@z.w42.org>
References: <slrnrghbde.irq.dario@darioniedermann.it>
Injection-Date: Fri, 10 Jul 2020 18:57:07 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="da377d5e2cf46ba974841f6a81fb9c19";
logging-data="28783"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+i1sVrw6d+nuCz+gyRZ/JNHG/On9H/C9Q="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:1eFD1ULUCJRI/fuwTyKG+vAc4mw=
View all headers

On 2020-07-10, Dario Niedermann wrote:
> I'm running 4.3BSD-Reno on an emulated VAX-11/780. The C compiler
> installed is the one from Berkeley, dated 1985-86 (according to `what`).

> I've hit a bit of a roadblock because I can't find a way to list all of
> cpp's pre-defined macros on this system. The method I use with GNU cpp
> doesn't work, and I don't have a man page installed for cpp
> (the cc man page doesn't say anything about this either).

It may not be possible...

Can't find a manpage for cpp on 4.3 Reno, but I could find cpp manpages
for other 1986 systems which were essentially BSD with some vendor's
additions, and these don't mention a way to get a list of predefined
macros, they only say which macros were defined by that particular vendor.

I may go and get the microVAX out of the attic and see if I can find a
way... unless somebody replies with a way first.

C

Subject: Re: [4.3BSD] List of cpp's predefined macros?
From: Dario Niedermann
Newsgroups: comp.unix.bsd.misc
Organization: Not speaking for any
Date: Mon, 13 Jul 2020 16:54 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dario@darioniedermann.it (Dario Niedermann)
Newsgroups: comp.unix.bsd.misc
Subject: Re: [4.3BSD] List of cpp's predefined macros?
Date: Mon, 13 Jul 2020 18:54:08 +0200
Organization: Not speaking for any
Lines: 24
Message-ID: <slrnrgp4dg.irq.dario@darioniedermann.it>
References: <slrnrghbde.irq.dario@darioniedermann.it>
<slrnrgheg3.mkr.c.news@z.w42.org>
Injection-Info: reader02.eternal-september.org; posting-host="074e51640f075beb86e45a4c42237dd7";
logging-data="3584"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zsU1Z5qqNk50/gy2QKCTT"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:PiibAQ35HDYP1yAWefAx7JhRRkk=
X-Bogomips: 4788.44
X-Linux-Distro: Devuan ASCII
X-Text-Editor: nvi-1.81.6 (2007-11-18)
View all headers

Claudio Calvelli <c.news@w42.org.invalid> wrote:

> It may not be possible...
>
> Can't find a manpage for cpp on 4.3 Reno, but I could find cpp
> manpages for other 1986 systems which were essentially BSD with some
> vendor's additions, and these don't mention a way to get a list of
> predefined macros, they only say which macros were defined by that
> particular vendor.

Thanks for your input. For now, I've settled with grepping
/usr/{include,sys} for #defines, but I'm sure the results are
incomplete. For example, 'vax' is missing, but it's still defined as a
macro, who knows where.

> I may go and get the microVAX out of the attic and see if I can find a
> way... unless somebody replies with a way first.

If you have any news, please let me know...

--
Dario Niedermann. Also on the Internet at:

gopher://darioniedermann.it/ <> https://www.darioniedermann.it/

Subject: Re: [4.3BSD] List of cpp's predefined macros?
From: Richard Tobin
Newsgroups: comp.unix.bsd.misc
Organization: Language Technology Group, University of Edinburgh
Date: Mon, 13 Jul 2020 19:38 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!usenet.inf.ed.ac.uk!.POSTED!not-for-mail
From: richard@cogsci.ed.ac.uk (Richard Tobin)
Newsgroups: comp.unix.bsd.misc
Subject: Re: [4.3BSD] List of cpp's predefined macros?
Date: Mon, 13 Jul 2020 19:38:15 +0000 (UTC)
Organization: Language Technology Group, University of Edinburgh
Lines: 12
Message-ID: <reid77$m8e$1@macpro.inf.ed.ac.uk>
References: <slrnrghbde.irq.dario@darioniedermann.it> <slrnrgheg3.mkr.c.news@z.w42.org> <slrnrgp4dg.irq.dario@darioniedermann.it>
NNTP-Posting-Host: macaroni.inf.ed.ac.uk
X-Trace: macpro.inf.ed.ac.uk 1594669095 22798 129.215.197.42 (13 Jul 2020 19:38:15 GMT)
X-Complaints-To: usenet@macpro.inf.ed.ac.uk
NNTP-Posting-Date: Mon, 13 Jul 2020 19:38:15 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: richard@cogsci.ed.ac.uk (Richard Tobin)
View all headers

In article <slrnrgp4dg.irq.dario@darioniedermann.it>,
Dario Niedermann <dario@darioniedermann.it> wrote:

>Thanks for your input. For now, I've settled with grepping
>/usr/{include,sys} for #defines, but I'm sure the results are
>incomplete. For example, 'vax' is missing, but it's still defined as a
>macro, who knows where.

In the C preprocessor itself. Look for calls to stsym in
/usr/src/lib/cpp/cpp.c

-- Richard

Subject: Re: [4.3BSD] List of cpp's predefined macros?
From: Dario Niedermann
Newsgroups: comp.unix.bsd.misc
Organization: Not speaking for any
Date: Tue, 14 Jul 2020 13:41 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!reader01.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dario@darioniedermann.it (Dario Niedermann)
Newsgroups: comp.unix.bsd.misc
Subject: Re: [4.3BSD] List of cpp's predefined macros?
Date: Tue, 14 Jul 2020 15:41:41 +0200
Organization: Not speaking for any
Lines: 14
Message-ID: <slrnrgrdgl.irq.dario@darioniedermann.it>
References: <slrnrghbde.irq.dario@darioniedermann.it>
<slrnrgheg3.mkr.c.news@z.w42.org> <slrnrgp4dg.irq.dario@darioniedermann.it>
<reid77$m8e$1@macpro.inf.ed.ac.uk>
Injection-Info: reader02.eternal-september.org; posting-host="d9f8b53e06bcab96b899311a8eef232b";
logging-data="21863"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VBkO8SgSpeoVdhuCr5BSx"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:bpHy6rRvcWV3Hav0yQ94wVSvF2g=
X-Bogomips: 4788.44
X-Linux-Distro: Devuan ASCII
X-Text-Editor: nvi-1.81.6 (2007-11-18)
View all headers

Richard Tobin <richard@cogsci.ed.ac.uk> wrote:

> In the C preprocessor itself. Look for calls to stsym in
> /usr/src/lib/cpp/cpp.c

Found them, thank you: indeed, "vax" and other useful macros are
defined there.

Kudos for the remarkable knowledge of the 4.3BSD source code.

--
Dario Niedermann. Also on the Internet at:

gopher://darioniedermann.it/ <> https://www.darioniedermann.it/

1

rocksolid light 0.9.8
clearnet tor