Re: GTK 2.10 compilation help



> From: Trond Hasle Amundsen <t h amundsen usit uio no>
...
> Valdis Kletnieks vt edu writes:
> 
> > On Thu, 20 Jul 2006 15:59:05 +0200, Trond Hasle Amundsen said:
> >
> >> Try this patch:
> >
> >> +#define __STDC__ 1
> >
> > Ick. :)

Yea.  Don't mess with the __STDC__ setting directly.

> > There's 3 possibilities here:
> >
> > 1) Sun's compiler is actually standard-compliant, but doesn't define that
> > symbol itself.  Not sure how/why it would do that.
> >
> > 2) Sun's compiler is actually standards-busticated, and defining that just
> > *seems* to work, but papers over any deficiencies. Also bad news.

Aside:

Sun's compilation system is actually the "Gold Standard" of standards
conformance.  Since I work for Sun, I don't expect you to take my word for
it. If you can find contacts in the standards groups, ask them.

I hope these aren't fighting words.  If you disagree, please keep it to
yourself and just dismiss the above as one lunatic's delusion.

> > 3) Sun's compiler has multiple personalities (ANSI, K&R, etc), selected by
> > invoking under different names/flags. Setting $PATH and/or $CC correctly to
> > select an ANSI personality should make it work without having to hack the
> > source.
> >
> > A quick perusal of the nearest Solaris 9 box I have handy indicates that
> > it's the 3rd.
> 
> Agreed. It seems like the 3rd, but it may also be that Solaris 8 have
> headers which need a certain C personaliy. When I first experienced
> this problem a long while ago, I tried setting the C compiler's
> personality different ways, but then the compilation failed at other
> places in the code. Eventually i gave up and came up with that patch,
> which works like a charm and I've used it ever since :)

It is the 3rd.

Goodness and truth should be found in selecting the appropriate -X[c|a|t|s]
flag and probably setting -D__EXTENSIONS__ on the cc command line.

Logically, I would expect "-Xa -D__EXTENSIONS__", but from the patch I
suspect that "-Xc -D__EXTENSIONS__" might be the true answer.  If this
is true, it traces back to a long standing disagreement between Sun and
Gnu about the detailed semantics of __STDC__. A lot of work went into
the Solaris 10 system headers to make them compatible with gcc which
also *might* help here, but that does you no good if you are using an
earlier release.

- Joseph Kowalski

My comments are my own and don't necessarily reflect those of Sun Microsystems.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]