Subject: port-macppc/21541: 'ntohl()' function isn't in libc
To: None <gnats-bugs@gnats.netbsd.org>
From: Tsuyoshi MOMOSE <t-momose@pound.netbsd.org>
List: netbsd-bugs
Date: 05/11/2003 22:27:36
>Number: 21541
>Category: port-macppc
>Synopsis: 'ntohl()' function isn't in libc
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-macppc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 11 22:28:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Tsuyoshi MOMOSE
>Release: NetBSD 1.6.1
>Organization:
>Environment:
System: NetBSD pound 1.6.1 NetBSD 1.6.1 (MOMOSE_TITANIUM) #2: Sun May 11 02:32:35 UTC 2003 root@pound:/usr/src/sys/arch/macppc/compile/MOMOSE_TITANIUM macppc
Architecture: powerpc
Machine: macppc
>Description:
There is no 'ntohl()' or other converting network/host byte order
functions in libc. Normally, these functions are treated as
defined macro, but when '-Dlint' option is specified in cc, the
macro is skipped and try to link the function in libc. But the
linking failed because there isn't such functions in libc.
This problem will prevents to build kame snap on big-endian
architecture other than netbsd/macppc.
>How-To-Repeat:
foo.c:
#include <sys/types.h>
main()
{
ntohl(1);
}
sucess
% cc foo.c
failed
% cc -Dlint foo.c
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: