delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/11/23:43:07

Message-ID: <35F9EDC2.248CBBFF@montana.com>
Date: Fri, 11 Sep 1998 21:42:58 -0600
From: bowman <bowman AT montana DOT com>
Reply-To: bowman AT montana DOT com
MIME-Version: 1.0
To: "djgpp AT delorie DOT com" <djgpp AT delorie DOT com>
Subject: strcmp and nulls, one more time, Sam

I found a some discussion in the archives, but no resolution. Just for
my clarification:

1. strcmp against a null will fail, causing a segfault under cwsdpmi,
perhaps    not if using the Win95 dpmi.

2. this is a djgpp feature or misfeature, and not a bug.

3. ported packages that assume a graceful failure of strcmp will need a
test    of parameters, and some additional logic to handle the null.

4. ANSI C does not stipulate that strcmp should handle nulls.


Hacking around the problem is no big deal, I just want to have my ducks
in a row before I bring the problem back to the maintainers of the
package in question.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019