I've just found a problem (bug?) in analog on Solaris 8 when compiling as
64-bit. The problem may also exist in other 64-bit operating systems.
The problem is in alias.c, where addr is defined as an unsigned long. While
this is fine for IPv4 under 32-bit OS's, ulongs are 8 bytes under Solaris 8 on
64-bit platforms. There are, in short, 2 solutions:
1/ only compile as 32-bit using gcc or using cc without -xarch=v9; not
particularly good, as 64-bit programs are faster and analog is quite CPU
intensive with large log files.
2/ change addr to in_addr_t; this will work on Solaris 8 (and presumably,
later versions) but not on Solaris 7 or earlier. It probably also doesn't
work on other OS's.
In the long term, this can be fixed using ./configure, but in the meantime, I
submit the following patch for Solaris 8 users who want to have a 64-bit
analog:
root:e220# diff alias.c.orig alias.c
468c468
< unsigned long addr;
---
> in_addr_t addr;
484c484
< if (addr != (unsigned long)(INET_ADDR_ERR)) { /* cast is implicit anyway
*/
---
> if (addr != (in_addr_t)(INET_ADDR_ERR)) { /* cast is implicit anyway */
--
John Riddoch Email: [EMAIL PROTECTED] Telephone: (01224)262721
http://www.scms.rgu.ac.uk/staff/jr/
In the beginning, there was nothing. And God said, 'Let there be Light.'
And there was still nothing, but you could see a bit better.
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------