>The problem is that libast has headers which are meant to "replace" the
>normal system headers, e.g. /usr/include/ast/stdio.h which is included
>as <stdio.h> in the various AST sources. Since $(CPPFLAGS.master)
>includes stuff "-I$(ROOT)/usr/include" and normally comes before any
>other -I options from the Makefile* it breaks this. Using
>$(CPPFLAGS.master) is tricky, too - it MUST come as the last element but
>future changes in -D may then cause silent breakage in the AST sources
>because the last -D specified overrides previous -D options so I prefer
>the current way to expliclity list each single flag. Otherwise it may
>end-up in a horrible pain to figure out a problem which is simply caused
>by a tiny change in the flags used in $(CPPFLAGS.master).
>What should I do here now - leave it as it implemented currently or try
>to "squish" $(CPPFLAGS.master) somewhere into the chain in the hope that
>this won't bite back in the future... ?

This seems wrong; personally I think we should rip out any replacement
for system libraries; such duplication leads to more code which needs
to be maintained.  This includes replacements for <stdio.h>.

(The problem is even bigger if these are indeed shipped as part of
the ksh libraries; having multiple implementations visible to processes
is bad; note that re-exporting symbols like fopen() would be blatantly
illegal in C and therefor also in Solaris; our libraries will malfunction
when they find a different stdio library)

Casper

Reply via email to