On 26 Feb 2009, at 11:53, Donatas Petrauskas wrote:

> Maybe that is the problem, because mine copy of oniguruma.h has  
> HAVE_STDARG_H:
>
> #ifdef HAVE_STDARG_H
> # ifndef  HAVE_STDARG_PROTOTYPES
> #  define HAVE_STDARG_PROTOTYPES 1
> # endif
> #endif

Okay, I found this line, and now I'm confused.  Om my machine,  
HAVE_STDARG_PROTOTYPES is not being defined, but OgreKit still builds  
correctly.

gcc -E shows that the prototype is being expanded to:

extern
int onig_error_code_to_str ();

This ought to be triggering a warning, but somehow isn't.  Calling a  
function like this with more than zero parameters works, but is not  
encouraged.  Do you have any standard CFLAGS set which add to the  
normal warnings defined in the Étoilé makefile?  Note that we treat  
warnings as errors, so turning on additional warnings may stop the  
build from working for you.

The HAVE_STDARG_H thing looks like something that would need to be  
defined by autoconf, but in this case it is meaningless - the header  
is only using variadic function declarations when HAVE_STDARG_H is  
present, but this is incorrect.  Variadic function declarations are  
valid in all C dialects.  stdarg.h supersedes vararg.h, but you only  
need either for definitions of variadic functions, not for their  
definitions.  For now, you can try adding this line above the include  
for onguruma.h:

#define HAVE_STDARG_H 1

Please also file a bug with oniguruma.  They should not be testing for  
feature macros like this in a public header like this.

David



_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à