Subject: bin/37275: bind9.4: some arch does not match configured 'platform.h'
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <hayashi@totalware.gifu.gifu.jp>
List: netbsd-bugs
Date: 11/04/2007 09:40:01
>Number:         37275
>Category:       bin
>Synopsis:       bind9.4: some arch does not match configured 'platform.h'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 04 09:40:00 +0000 2007
>Originator:     Akihiko HAYASHI
>Release:        current (4.99.34)
>Organization:
>Environment:
NetBSD gld198.totalware.gifu.gifu.jp 4.99.34 NetBSD 4.99.34 (HDL_G.nat) #0: Thu Nov  1 12:17:32 JST 2007  hayashi@fomalhaut.totalware.gifu.gifu.jp:/usr/home/hayashi/netbsd/armobj/sys/arch/evbarm/compile/HDL_G.nat evbarm

>Description:
from importing bind9.4, named does not work on evbarm arch.

src/usr.sbin/bind/include/isc/platform.h is configured by 
src/dist/bind/configure.in
> if test "$have_atomic" = "yes"; then
> 	ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
> 	ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
> 	ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
> else
> 	ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
> 	ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
> 	ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
> fi

src/usr.sbin/bind/include/isc/platform.h is configured for $have_atomic = "yes" archs(i386, x86_64, sparc, mips...).
but $have_atomic = "no" on some archs.

>How-To-Repeat:
test on evbarm arch
>Fix:
configure bind9.4.1-P1 on evbarm and i386, and check diffs.
I made patch. 
http://world.uraru.net/~a.rin/NetBSD/bind.platform.diff

this patch's macro condition expression is refered src/usr.sbin/bind/include/isc/atomic.h, but I dont check other archs.