[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Change in strncmp, at least on PowerPC
From: |
Bob Schmertz |
Subject: |
Change in strncmp, at least on PowerPC |
Date: |
Thu, 22 Jan 2004 10:15:21 -0800 (PST) |
Hi,
I've discovered a change in the behavior of strncmp on my iBook running
Gentoo, ever since upgrading my glibc last weekend or so. The problem is
this: if strncmp is called with a null pointer for at least one of the
strings, and n is supplied as 0, it segfaults. On the previous Gentoo
version of glibc (don't know what that was), as well as on my Fedora
system at work (glibc 2.3.2-101), this call returns 0, which seems
reasonable (the empty set always equals the empty set).
This difference has broken zsh on the PPC platform. Zsh is a widely
ported shell, which suggests that other C libraries also return 0 in this
situation, and there are undoubtedly other apps out there that rely on
this behavior. And of course, the behavior is different from what it is
on other architectures.
=====
Cheers,
Bob Schmertz
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
- Change in strncmp, at least on PowerPC,
Bob Schmertz <=