Nmap Development mailing list archives

Re: FC4 compilation issue


From: Fyodor <fyodor () insecure org>
Date: Fri, 20 Jan 2006 10:42:13 -0800

On Fri, Jan 20, 2006 at 12:42:21PM -0500, Will Cladek wrote:
I consulted Red Hat's bugzilla, and it turns out this seems to be a problem in nmap.  In the file 
nbase/nbase.h, the following lines appear:

#ifndef HAVE___ATTRIBUTE__
#define __attribute__(args)
#endif

That #define of __attribute__ is somehow messing with the extern declaration of those functions in 
gthr-default.h, and commenting out this line removes the error.  (Don't ask me why... I'm not that 
good at this stuff!  :)

That raises the question of why HAVE___ATTRIBUTE__ is not being
defined on your FC4 box (it is defined on my FC3).  The definition is
made as part of this rather simple AC_C___ATTRIBUTE__ macro in
nbase/aclocal.m4:

dnl
dnl Test for __attribute__
dnl

AC_DEFUN(AC_C___ATTRIBUTE__, [
AC_MSG_CHECKING(for __attribute__)
AC_CACHE_VAL(ac_cv___attribute__, [
AC_TRY_COMPILE([
#include <stdlib.h>
],
[
static void foo(void) __attribute__ ((noreturn));

static void
foo(void)
{
  exit(1);
}
],
ac_cv___attribute__=yes,
ac_cv___attribute__=no)])
if test "$ac_cv___attribute__" = "yes"; then
  AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has
  __attribute__])
fi
AC_MSG_RESULT($ac_cv___attribute__)
])


If you, or someone else with a system that can reproduce the problem,
can figure out what is wrong, I'd be happy to apply the patch.  Maybe
you could check your config.log to determine why this test seems to be
failing.

Cheers,
Fyodor


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev


Current thread: