🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Leigh B. Stoller Thu, 22 Sep 1988 17:25
Gcc and X11 imake (2nd try)
#1689
Author: Leigh B. Stoller
Date: Thu, 22 Sep 1988 17:25
50 lines
1450 bytes
Hi,
  Here at the University of Utah we recently installed the gcc
compiler suite as the default on our BSD4.3 hp9000's. This caused a
problem in the X11 imake utility, which depends heavily on /lib/cpp.

The problem results from some of the Imakefiles having the following.
(see server/os/4.2bsd/Imakefile)

SpecialObjectRule(osinit.o, $(IRULESRC)/$(MACROFILE), -DADMPATH=\"$(FOO)/foo\")

When this file is run through gcc cpp, it has trouble with \". For example
the results of pcc cpp on:

#define foo(x) =x=
foo(\"$(BAR)/bar\")

is:

# 1 ""


 =\"$(BAR)/bar\"=


while the results of gcc cpp are:

:3: unterminated macro call
:3: only 0 args to macro `foo'
# 1 ""


==


An alternative syntax for the for the Imakefiles could be:

#define foo(x) =x=
foo('"$(BAR)/bar"')

The single quotes produce the same results as escaping the double quotes.


The other solution would be to change gcc cpp to handle this case, as pcc
cpp does.

Either way is fine by me.


Thanks,
Leigh Stoller
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads