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

    From Dario Niedermann@21:1/5 to All on Fri Jul 10 20:04:30 2020
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Claudio Calvelli@21:1/5 to Dario Niedermann on Fri Jul 10 18:57:07 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dario Niedermann@21:1/5 to Claudio Calvelli on Mon Jul 13 18:54:08 2020
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Tobin@21:1/5 to dario@darioniedermann.it on Mon Jul 13 19:38:15 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dario Niedermann@21:1/5 to Richard Tobin on Tue Jul 14 15:41:41 2020
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)