FreeS/WAN and new GCC 3.3 Compiler Issues

Ken Bantoft <[email protected]> Fri, 6 Jun 2003 22:22:16 -0400 (EDT)
Newsgroups gmane.network.freeswan.user,gmane.network.freeswan.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----



As I tried to test out dhr's spi.c fix, I snagged a copy of GCC 3.3-4 from 
RedHat's RawHide, and installed it on my RH 8.0 based system.

spi.c now compiles fine, however the rest of FreeS/WAN doesn't.

It seems the log() function (defined in programs/pluto/log.h) now 
conflicts with a new built-in function called.... log().  log() in GCC 3.3 
is the logarithmic function, which dhr tells me used to be in math.h, but 
now appears built it.  Some research found this:

http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00537.html

Which seems to be the patch applied.  I haven't checked the source, 
however the end result is the same - we conflict with the built-in 
function.  Not good.

I chatted with dhr about this via IRC, and asked him if I were to change
the name of the log() function, what would be it become.  plog() was the
answer (same idea as passter()).  So, after changing every call to log() 
(there are quite a few) we now have a building tree again.

Do not sed /log/plog/ this as there are many
calls to DBG_log() and loglog() you'll make things much worse!

Note this impacts the ALG patches, and X.509 patches.  Probably NAT-T, but 
it doesn't exist for 2.00 yet, so I'll fix that when I come to it.  GCC 
3.3 always creates even more warning, which I'll post messages about as I 
get around to finding + fixing them.

FYI: SFS 2.00 tree now has this change implemented across all patches.  
Invidual patches against each file can be grabbed via CVSWeb if needed:

http://www.freeswan.ca/cgi-bin/viewcvs.cgi/freeswan-2/programs/pluto/?cvsroot=SuperFree%2FSWAN

They are marked with "log -> plog (dhr recommendation) to make gcc 3.3 happy.  I hate gcc."



- -- 
Ken Bantoft                Super FreeS/WAN Maintainer
[email protected]            http://www.freeswan.ca
                           PGP Key: finger [email protected]
Dijkstra probably hates me.
	-- Linus Torvalds, in kernel/sched.c

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBPuFMWliWUusaxGxpAQGQ0AP/Ti+Ylx/3MmxCiEULOv2eryYh2IDMBSsO
b3Vs4190OF6ISKciUrQSXzxogcZRp72m5Me7zoHk0zF7zZVV/VQ3UfpLjf8jGkyT
mrwk07E2oaDrE0cJVbFxoUf+N7wSmLm6jbo0FY/MjgU0AI2CEewo0i7yaLyimFsw
vm41rvwJ+Ug=
=aj8b
-----END PGP SIGNATURE-----