A>  Could you share your experience on [EMAIL PROTECTED]?
T> I do on occasion...

Good :)

<context>
Current code for AC_CHECK_DECL uses

#ifndef $1
  char *p = (char *) $1;
#endif

Thomas suggests

<thomas>
> | #undef $1  
> | struct zowie { int a; double b; struct zowie *c; char d; };  
> | extern struct zowie *$1();  
>
> Why is it that complex?  We just 
>
>   char *p = (char *) $1; 

because some compilers won't error on a char* - a struct is better,
and it's complex to make it less likely that it matches an existing
struct.
</thomas>
</context>



First of all, I don't get what this #ifndef is doing here in
Autoconf, it does not test what I need, so AFAIC I'd vote for

  char *p = (char *) $1;

or maybe

  #undef $1
  char *p = (char *) $1;

A difference I see between Thomas' approach and Autoconf's is that
Autoconf does not try to force the symbol whose declaration is being
checked to be a function.  AC_CHECK_DECL can them be used for errno,
sys_siglist and others.

In this case, Thomas, do you think we still need all the zowie stuff?

Akim

Reply via email to