This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: Warning removal


 > From: RDBrown@mira.net 
 > 
 > +#ifdef HAVE_LDFCN_H
 > +#ifndef HAVE_DECL_LDCLOSE
 > +extern int ldclose PARAMS ((LDFILE *));
 > +#endif
 > +#ifndef HAVE_DECL_LDGETNAME
 >  extern char *ldgetname PARAMS ((LDFILE *, GCC_SYMENT *));
 > +#endif
 > +#ifndef HAVE_DECL_LDTBREAD
 >  extern int ldtbread PARAMS ((LDFILE *, long, GCC_SYMENT *));
 > -extern int ldclose PARAMS ((LDFILE *));
 > +#endif
 > +#endif /* HAVE_LDFCN_H */

HAVE_DECL_* is a three-state macro, these should read:
 > #if defined (HAVE_DECL_LDCLOSE) && !HAVE_DECL_LDCLOSE
 > extern int ldclose PARAMS ((LDFILE *));
 > #endif
You also don't need to wrap it in HAVE_LDFCN_H.



 > +if test "$ac_cv_header_ldfcn_h" = yes; then
 > +  # Check for declarations on COFF platforms, ldtbread varies 
 > +gcc_AC_CHECK_DECLS(ldclose ldgetname ldtbread, , ,[
 > +#include "gansidecl.h"
 > +#include "system.h"
 > +#include <ldfcn.h>
 > +])

Here you *should* wrap #include <ldfcn.h> in HAVE_LDFCN_H.

--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]