Nmap Development mailing list archives

nmap-4.20 portability patch


From: Peter O'Gorman <nmap-dev () thewrittenword com>
Date: Tue, 26 Dec 2006 09:19:24 -0600

Hi,

I'm not inclined to split this patch up, sorry, leaving that up to
you.

There are a number of portability issues with nmap-4.20, one of which
is with solaris and identified in an earlier thread.

Others include:
__FUNCTION__ is not portable, this is replaced in the patch with
"function_name" even where that is silly.

// C++ style comments don't work with non-c++ compilers on some
platofrms.

AIX fixes for libdnet and include files ordering. Note that eth- dnet
stuff simply does not work on AIX, but I've had no problems with
defaulting to --send-ip.

hpux does not have va_copy.

irix sucks, it provides some functions, but does not provide
prototypes for them if using a c++ compiler.

AIX xlc and some other compilers do not like enum {
foo,
bar,
};
so the trailing comma was removed.

variable length arrays is a c99 feature, but not all our compilers
are c99 capable.

on one platform (aix?) ip_off is #defined, so we need to change some
var names in fill_ip_raw.

libdnet bsd route - aix works like bsd but does not have the sysctl,
using getkerninfo instead.

Some of our platforms do not have socklen_t, so I swiped the check
from gnulib.

I think this explains most of the patch, please ask if you have more
questions.

Note that while 4.20 works on HPUX11.11 and higher it does not work at
all on hpux11.00 or hpux10.20. I haven't had a chance to look into
this yet, but I'm blaming dnet until then :)
 
Thanks,
Peter

Attachment: nmap-4.20.diff
Description:


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

Current thread: