patch from Jim Meyering <meyering@eng.ascend.com>