The Sun CPP takes a flag which disables this behavior. Autoconf
should detect it and the snarfer should use it.
Mikael's suggestion --- that we use real identifiers as the snarfing
markers --- sounds like a better solution, though.
bernard URBAN <[EMAIL PROTECTED]> writes:
> >>>>> "Dirk" == Dirk Herrmann <[EMAIL PROTECTED]> writes:
>
> Dirk> On 6 Jun 2000, bernard URBAN wrote:
> >> Hum... ALL *.x files contain only a newline !!! ALL *.doc are
> >> void !!!
>
> And now, the awful truth will been revealed: guile depends absolutely
> on gcc...
>
> Here is the problem: the C preprocessor of Sun, used by
> guile-doc-snarf, generates $ $ $ instead of $$$ (as do gcc), and this
> for all the triples used by the snarfing mechanism.
>
> This breaks guile-snarf.awk, and hence *.x and *.doc are void.
>
> Dirk> But, there's more to it: I just discovered a similar problem
> Dirk> when trying to use the threads stuff.
>
> Dirk> Here's what I found: In scm_make_gsubr, for a couple of
> Dirk> parameter numbers there exist special cases. But, if none
> Dirk> of these special cases is used, the following code is
> Dirk> executed: scm_set_procedure_property_x (cclo, scm_sym_name,
> Dirk> SCM_CAR (symcell)); But, scm_sym_name has to be initialized!
> Dirk> If it is not initialized, it is 0, and thus equal to all
> Dirk> other uninitialized globals.
>
> Dirk> Thus, scm_init_gsubr has to be called _before_ the first
> Dirk> snarfed header file is executed. Up to now this problem has
> Dirk> not appeared yet, but in the new threads.c, there is a
> Dirk> function with 4 mandatory parameters, and this is not one of
> Dirk> the special cases.
>
> Dirk> Here is what I did:
>
> Dirk> scm_weaks_prehistory (); /* Must come after
> Dirk> scm_init_storage */ scm_init_subr_table (); scm_init_root
> Dirk> (); + scm_init_gsubr (); #ifdef USE_THREADS -
> Dirk> scm_init_threads (base); + scm_init_threads (base); /*
> Dirk> Requires gsubr */ #endif - start_stack (base); -
> Dirk> scm_init_gsubr (); + start_stack (base); /* Requires threads
> Dirk> */ scm_init_feature (); scm_init_alist (); scm_init_arbiters
> Dirk> ();
>
> Dirk> The dependencies between the different packages can become
> Dirk> quite messy.
>
> This is a real and decent bug !
>
> Coming back to the C preprocessor, I do not know if it is the only one
> in this case, as the behaviour is ok for the semantics of C.
> Perhaps putting the characters between "" will help ?
> This will also avoid a compiler choking on $ or @, I am not sure these
> 2 are legal outsite "".
>
> Other solution is to have cccp in guile...
>
> Sincerely.
>
> --
>
> B. Urban