tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Changing basename(3) and dirname(3) for future posix compatibility



    Date:        Sun, 3 Dec 2017 12:36:00 +0100
    From:        Edgar =?iso-8859-1?B?RnXf?= <ef%math.uni-bonn.de@localhost>
    Message-ID:  <20171203113600.GL4339%trav.math.uni-bonn.de@localhost>

  | Has anyone scanned NetBSD's (or pkgsrc's) codebase for such uses?

I am in the process of doing that - that's what led to PR lib/52779
we have code that does

	dir = dirname(buf);
	strlcpy(buf, dir);

which I suspect is probably an undefined sequence, that happens to work.

  | What does Windo^WLinu^Wglibc do?

Not sure, but the austin group people wouldn't be suggesting changing
things in a way that would be fatal to them I think/

  | Is this becasuse the basename of "C:\Program Files\Important\" is defined 
  | to be "Important" sans slash -- err, of "/etc/pam.d/" to be "pam.d"?

Yes.

kre



Home | Main Index | Thread Index | Old Index