amd64 port update

"Gene C." <[email protected]>
Newsgroups gmane.comp.security.nessus.devel
Message-ID <[email protected]>
OK, I have what I believe are a set of "good" patches which "cleanly" port 
nessus to the amd64 64 bit application environment.  I will be uploading 
these patches later today.

Some comments --

1.  For casting types, I am using mostly "ssize_t".  Microsoft recommends 
using size_t (and ssize_t) since they are polymorphic on their Windows 
systems (4 byte on 32 bit systems and 8 bytes on 64 bit systems ... same as 
pointers).  I could have used "long" in many places but there appears to be 
more code intended to run under MS Windows than I originally realized.  For 
consistency, I am using "ssize_t" (or "size_t" where that is appropriate).

2. There are some patches which add function prototypes.  All of these 
produced cast problems on the amd64 and do not appear to cause problems on 
the i386, etc.  I have mentioned memmem() before.  Without the prototype, 
there are cast warnings.  Even if a system does not have memmem(), then the 
nessus "slow" one defined in strutils.c is used ... and a prototype is still 
needed.

3.  I found a library setup problem with libtool.  I was getting strange 
warnings about libraries not shared from libtool on the amd64.  I found that 
nessus-config had "$PREFIX/lib" hard coded.  The patch changes that to 
"@libdir@" which becomes "/usr/lib" on the i386 and "/usr/lib64" on the 
amd64.  So, no more strange messages from libtool on the amd64.  However, now 
I get some strange (different) messages from libtool on the i386 .. can't 
win.

4. I ran the compiles with "-Wall -pedantic" to try and get things sorted out.  
Currently, everything compiles clean on the amd64 except for 
nessus-core/nessus/regex.c ... I get some warnings about print format 
discrepancies.  On the i386, nessus-core/nessus/regex.c compiles clean but 
some other files now get warnings about "long int format, int arg" [and I am 
using a ssize_t cast].

I welcome comments, corrections, etc.  Hopefully, these patches are "system 
independent" (runs on *BSD, Solaris, IRIX, etc.).  If not, please point out 
my errors.
-- 
Gene Czarcinski

_______________________________________________
Nessus-devel mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.