Subject: Compiling CLISP with Microsoft VC++ on Windows'95 experience

From: Dmitri Ivanov <[email-masked]>
Date: Wed, 13 Dec 1995 15:43:22 +-300

Hello,

I've been porting CLISP to Microsoft Visual C/C++ 2.2 on Windows'95.
I used old CLISP 1995-08-12 distribution, but the new one is unlikely to
help me avoid difficulties I've experienced. Here is an abstract.

First, to create the set of sources with the help of Microsoft's nmake, I
had to change MAKEFILE by hand.  Briefly, I replaced compiler's options and
managed to pipe files through COMMENT5, ANSIDECL, and DEEMA.

Second, having looked through lispbibl.c, I discovered there no appropriate
support for MSVC (and for Win32, to tell the truth). So I created the
win32.h file of my own using msdos.c as a prototype and included it at
approximately the same position.

Then, I created a new clisp.mak inside the MSVC environment and decided to
add .C-files one by one and compile.

I was not lucky starting with spvw.c. The Microsoft compiler failed to
accept it categorically.

    Fatal error C1056 : compiler limit : out of macro expansion space.

The Quick Reference documentation explains:

   The compiler overflowed an internal buffer during the expansion of a
   macro.

   Try to split the macros into simpler macros or remove nonessential space
   and tab characters from macro definitions that were used in the expansion.

The matter is obvious: macros like `aktualisiere' are too nested and long.
After I had expanded some of them manually, I got the same error on another
line.  Congratulations, Bruno -- you beat Microsoft! :-)

I don't think the root of all evil is basing on Windows'95 instead of NT.

What can I propose to do? To replace macros by inline functions and
delineate them by

#ifdef _MSC_VER
. . .
#endif

That is a big run...  I haven't finished it yet.  I may send more detail,
the draft win32.h and other changes on request.

Sincerely,
                  Dmitri

----------------------------------------------------------------
Dr. Dmitri Ivanov                            Ulter Systems, Inc.
[email-masked]                      77 Shchelkovskoe Shosse
                                           Moscow, 107497 Russia
                                          Phone: +7 095 469-9870
----------------------------------------------------------------

---

From: Marcus Daniels <[email-masked]>
Date: Wed, 13 Dec 1995 21:32:43 GMT

>>>>> "Dmitri" == Dmitri Ivanov <[email-masked]> writes:

Dmitri>     Fatal error C1056 : compiler limit : out of macro
Dmitri> expansion space.

GNU cpp is one way to go.  On my list for the next release is a
integrated preprocessor (to also replace genclisph).  I'd like to
avoid duplicating lots of code just for the sake of a braindead
compiler.  But until I do this, inlines workarounds are ok.

Dmitri> That is a big run...  I haven't finished it yet.  I may send
Dmitri> more detail, the draft win32.h and other changes on request.

I'd like to see this!