[prev in list] [next in list] [prev in thread] [next in thread] 

List:       spread-users
Subject:    RE: [Spread-users] Hi, here's a bug, and a patch.
From:       "Andrew Barnert" <Andrew.Barnert () teneros ! com>
Date:       2006-05-04 17:18:03
Message-ID: 384422E6306C7D439E6C327F5FCFFDCE010FC48D () EXCH-US02 ! nuitysystems ! com
[Download RAW message or body]

--===============1781646927==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C66F9E.B3BD673A"

This is a multi-part message in MIME format.


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@samurai.com]
Sent: Thu 5/4/2006 2:25 AM
To: Andrew Barnert
Cc: spread-users@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


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: [Spread-users] Hi, here's a bug, and a patch.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>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.<BR> <BR>
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.<BR> <BR>
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.)<BR> <BR>
-----Original Message-----<BR>
From: Neil Conway [<A \
                HREF="mailto:neilc@samurai.com">mailto:neilc@samurai.com</A>]<BR>
Sent: Thu 5/4/2006 2:25 AM<BR>
To: Andrew Barnert<BR>
Cc: spread-users@lists.spread.org<BR>
Subject: Re: [Spread-users] Hi, here's a bug, and a patch.<BR>
<BR>
Andrew Barnert said:<BR>
&gt; Anyway, I found a bug in spread-3.17.3. Spread's C/C++ interface defines<BR>
&gt; NULL as (void *)0, which is perfectly fine for C, but not for C++.<BR>
<BR>
Why does Spread need to provide its own definition of NULL in any case? It<BR>
should be provided by any reasonably modern platform -- IMHO the right fix<BR>
would be to just remove the #ifndef NULL block (and #include &lt;stddef.h&gt; as<BR>
needed).<BR>
<BR>
-Neil<BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>



_______________________________________________
Spread-users mailing list
Spread-users@lists.spread.org
http://lists.spread.org/mailman/listinfo/spread-users

--===============1781646927==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic