Re: [AD] [PATCH] Solaris Fixes and dev notes |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] [PATCH] Solaris Fixes and dev notes
- From: Shawn Walker <binarycrusader@xxxxxxxxxx>
- Date: Sun, 5 Jun 2005 19:06:10 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dbZ5dN6xcfmYmQqrlInETLxzRAuraDK9AfBNLJrEQYc6vKAIim+lv9wh1w6QhrjNci5eXwxtSAbQBXSRznXWOE+wyx99knQSF1QuK85+WRQ1nMvhCYaDaa1Qlpw/ogfjK+5+J0KDt3YfToAZ1lEJuLRZ4I8C6TAVfex623hRrX4=
On 6/5/05, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> On Sun, 2005-06-05 at 12:29 -0500, Shawn Walker wrote:
> > That is something that bothers me, so I'm going to bump a SUN engineer
> > if I can and see if this holds true in general, I'm thinking it
> > probably does.
> >
>
> At least, according to google, I'm not alone in having relied on the
> NULL-handling behavior:
>
> http://mail.jabber.org/pipermail/jabberd/2003-December/001201.html
These are the responses I got from the Solaris community and SUN people:
"Yes, system 5 has always done exactly what you told it to do. The '(null)'
extension was added in BSD and picked up in Linux. To be safe use
printf("%s", variable?variable:"(null)");" - Dave Lampe
"Yes; (null) is not a valid pointer to a string so you are getting undefined
behaviour; our pilosophy is that it is best to detect such errors rather
than hide them by continuing." - Casper Dik (SUN Engineer)
So, in the future, for portability's sake, anywhere that data can be
null should be conditionalized first.
--
Shawn Walker, Software and Systems Analyst
binarycrusader@xxxxxxxxxx - http://binarycrusader.blogspot.com/