Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[4.3BSD] List of cpp's predefined macros?

1 view
Skip to first unread message

Dario Niedermann

unread,
Jul 10, 2020, 2:04:34 PM7/10/20
to
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/

Claudio Calvelli

unread,
Jul 10, 2020, 2:57:07 PM7/10/20
to
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

Dario Niedermann

unread,
Jul 13, 2020, 12:54:57 PM7/13/20
to
Claudio Calvelli <c.n...@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...

Richard Tobin

unread,
Jul 13, 2020, 3:40:01 PM7/13/20
to
In article <slrnrgp4dg...@darioniedermann.it>,
Dario Niedermann <da...@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

Dario Niedermann

unread,
Jul 14, 2020, 9:41:52 AM7/14/20
to
Richard Tobin <ric...@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.
0 new messages