History log of /netbsd-src/lib/libc/gen/basename.c (Results 1 – 12 of 12)
Revision Date Author Comments
# 1daaca1c 18-Jan-2023 simonb <simonb@NetBSD.org>

KNF nit: opening brace of a function on next line.


# db6e70af 16-Jul-2014 christos <christos@NetBSD.org>

basename_r and dirname_r are non-standard and different from what we define
here on FreeBSD. Their libgen.h exposes them unconditionally, so hide ours
for now.


# 59925ff2 14-Jul-2014 christos <christos@NetBSD.org>

Factor out the basename and dirname code into basename_r and dirname_r
which are static for now. Inspired by similar changes to android(bionic).


# 3f8ca7c4 24-Nov-2009 tnozaki <tnozaki@NetBSD.org>

guard single-dot from modification by the application
(SUSv3 spec don't forbid this brutal operation).
this idea taken from OpenBSD's version of basename(3) and dirname(3).


# 8e11cb8c 10-May-2008 christos <christos@NetBSD.org>

undo the constification of the argument. Per opengroup.


# ce099b40 28-Apr-2008 martin <martin@NetBSD.org>

Remove clause 3 and 4 from TNF licenses


# 043900c0 23-Apr-2008 plunky <plunky@NetBSD.org>

constify dirname(3) and basename(3)


# c10a556f 17-Oct-2002 thorpej <thorpej@NetBSD.org>

Change basename(3) and dirname(3) to return a pointer to static
storage, rather than modifying their input arguments. While not
reentrant, this is explcitly allowed by IEEE Std 1003.1-2001 (which
al

Change basename(3) and dirname(3) to return a pointer to static
storage, rather than modifying their input arguments. While not
reentrant, this is explcitly allowed by IEEE Std 1003.1-2001 (which
allows either behavior, stating that it is implementation-dependent).

The new semantics are considered less hostile/more useful by most programs
which use basename(3) and/or dirname(3) (several programs in the NetBSD
tree reimplement basename()/dirname() themselves to avoid modification
of the input argument).

This new implementation truncates results to PATH_MAX. The Std does
not address this in the static storage case. However since PATH_MAX
is the maximum pathname length in the Std, this should not be a problem
in practice. Nontheless, it is noted in the BUGS section.

See the basename(3)/dirname(3) regression tests in src/regress/lib/libc.

Inspired by discussion with Niels Provos, related to PR 18647.

show more ...


# 9fbd8888 31-Jan-2002 tv <tv@NetBSD.org>

Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __C

Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.

show more ...


# c08a2cb7 21-Jan-2002 tv <tv@NetBSD.org>

Add hooks for reachover builds from src/tools/compat.


# 60549036 22-Jan-2000 mycroft <mycroft@NetBSD.org>

Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.


# 8bfc0cef 02-Nov-1997 kleink <kleink@NetBSD.org>

Add basename() and dirname(), from XPG4.2.