[Spread-users] Hi, here's a bug, and a patch.

Andrew Barnert Andrew.Barnert at teneros.com
Thu May 4 13:18:03 EDT 2006


Yeah, you're probably right. I was thinking of that. Spread won't compile on a pre-ANSI compiler anyway, or probably on a freestanding implementation.

Since I don't know the code at all, I was trying to be conservative. I assumed there must be some reason someone would explicitly define NULL, and I just didn't know it.

But even if that's true, there's no reason the uses of NULL couldn't be eliminated, or changed to a local define that wouldn't screw up the rest of the world. (I only noticed one inessential place.)

-----Original Message-----
From: Neil Conway [mailto:neilc at samurai.com]
Sent: Thu 5/4/2006 2:25 AM
To: Andrew Barnert
Cc: spread-users at lists.spread.org
Subject: Re: [Spread-users] Hi, here's a bug, and a patch.
 
Andrew Barnert said:
> Anyway, I found a bug in spread-3.17.3. Spread's C/C++ interface defines
> NULL as (void *)0, which is perfectly fine for C, but not for C++.

Why does Spread need to provide its own definition of NULL in any case? It
should be provided by any reasonably modern platform -- IMHO the right fix
would be to just remove the #ifndef NULL block (and #include <stddef.h> as
needed).

-Neil




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20060504/6d9678ab/attachment.html 


More information about the Spread-users mailing list