This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Warning removal
- To: RDBrown at mira dot net
- Subject: Re: Patch: Warning removal
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Mon, 8 Jan 2001 11:13:10 -0500 (EST)
- Cc: dje at watson dot ibm dot com, gcc-patches at gcc dot gnu dot org, law at redhat dot com
> 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