Thomas Anders wrote on 5/25/2006 3:13 PM:
> Johannes Schmidt-Fischer wrote:
> 
>> regarding problem #9 in your list: both ntohl() and ntohs() aren't
>> implemented as functions in HP-UX 10.20 (and btw 11.0/11i too) but
>> instead as macros returning the given argument without change. Details
>> can be found in either <arpa/inet.h> or <netinet/in.h>.
>>
>> I think that in any of the snmpnetstat sources the including of either
>> of these include files is missing such that the compiler generates code
>> for calling functions with those two names (and these two functions do
>> not exist in any of the libraries used when binding snmpnetstat).
>>
>> Probably including
>>
>> - <net-snmp/net-snmp-config.h>
>> - <net-snmp/net-snmp-includes.h>
>>
>> will do.
> 
> 
> OTOH:
> - it builds fine on HP-UX 11.00, 11.11 and 11.23
> - it even builds fine on HP-UX 10.20 with HP's cc, just not with gcc
> (4.0.2)
> - the includes given above are there (AFAICS)
> 
> So either it's a bit more complicated than that or I'm missing something
> obvious.

When building net-snmp for HP-UX 10.20 I'm using gcc too, but the
version is 2.95.2 (and I cannot update that version since the server is
used for other ports as well).

As you maybe know gcc uses its special set of system include files. That
means that the system include files under /usr/include will be silently
replaced during compilation if the same include file exists in the gcc
system include file tree (note that most of the include files will be
taken from the standard location but there are some exceptions).

For gcc 2.95.2 I can say that neither <arpa/inet.h> nor <netinet/in.h>
come from gcc's special system include file tree but that can be
different for newer versions of gcc.

Please check in your gcc installation whether any of these include files
exists in the system include file tree and what are the differences
between those files and the standard files. Probably the macro
definitions are missing.

Another possibility is that gcc fiddles around with the define
_XOPEN_SOURCE_EXTENDED. If that define is set the macros will be defined
in <arpa/inet.h>, if not the macros will be defined in <netinet/in.h>.
For this reason best would be to make sure that both includes will be
used in <net-snmp/net-snmp-includes.h> if the resp. defines are set.

Johannes

> +Thomas
> 

-- 
Johannes Schmidt-Fischer

InterFace AG                 phone  +49 (0)89 / 610 49 - 207
Leipziger Str. 16            fax    +49 (0)89 / 610 49 - 85
D-82008 Unterhaching         mobile +49 (0)171/ 787 76 01
http://www.InterFace-AG.com  mailto:[EMAIL PROTECTED]


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to