History log of /freebsd/lib/libc/gen/dirname.3 (Results 1 – 25 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# fa9896e0 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line nroff pattern

Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0
# d02c951f 26-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r318658 through r318963.


# 3d54bd22 23-May-2017 Enji Cooper <ngie@FreeBSD.org>

dirname(3): fix section ordering

IMPLEMENTATION NOTES come before RETURN VALUES

MFC after: 2 weeks
Reported by: make manlint
Sponsored by: Dell EMC Isilon


Revision tags: release/11.0.1
# 8c4282b3 24-Sep-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r305892 through r306302.


Revision tags: release/11.0.0
# fd85bff5 18-Sep-2016 Ed Schouten <ed@FreeBSD.org>

Replace dirname(3) by a copy that complies to POSIX.

It turns out that the path normalization that our brand new copy of
dirname(3) does is actually not allowed by the draft version of the
upcoming

Replace dirname(3) by a copy that complies to POSIX.

It turns out that the path normalization that our brand new copy of
dirname(3) does is actually not allowed by the draft version of the
upcoming version of POSIX. It has to behave identically to the
dirname(1) utility.

This change replaces our new dirname(3) implementation by yet another
version that doesn't implement the path normalization logic; it merely
looks for the end of the directory name and overwrites that with a null
byte.

More details: See note #3370 at http://austingroupbugs.net/view.php?id=1073

PR: 212193
Reviewed by: emaste, jilles
Differential Revision: https://reviews.freebsd.org/D7790

show more ...


# 27067774 16-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r303250 through r304235.


# 569e9018 13-Aug-2016 Enji Cooper <ngie@FreeBSD.org>

MFhead @ r304038


# e2f68161 12-Aug-2016 Ed Schouten <ed@FreeBSD.org>

Reimplement dirname(3) to be thread-safe.

Now that we've updated the prototypes of the basename(3) and dirname(3)
functions to conform to POSIX, let's go ahead and reimplement dirname(3)
in such a w

Reimplement dirname(3) to be thread-safe.

Now that we've updated the prototypes of the basename(3) and dirname(3)
functions to conform to POSIX, let's go ahead and reimplement dirname(3)
in such a way that it's thread-safe, but also guaranteed to succeed. C
libraries like glibc, musl and the one that's part of Solaris already
follow such an approach.

Move the existing implementation to another source file,
freebsd11_dirname.c to keep existing users of the API that pass in a
constant string happy, using symbol versioning.

Put a new version of the function in dirname.c, obtained from CloudABI's
C library. This version scans through the pathname string from left to
right, normalizing it, while discarding the last pathname component.

Reviewed by: emaste, jilles
Differential Revision: https://reviews.freebsd.org/D7355

show more ...


# 329ecc7f 29-Jul-2016 Ed Schouten <ed@FreeBSD.org>

Mention that basename(3) and dirname(3) will change in the future.

Update the existing manual pages for basename(3) and dirname(3) to
mention that in future versions of FreeBSD, these functions will

Mention that basename(3) and dirname(3) will change in the future.

Update the existing manual pages for basename(3) and dirname(3) to
mention that in future versions of FreeBSD, these functions will no
longer use internal buffers for storing the results.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D7356

show more ...


# 938809f9 28-Jul-2016 Ed Schouten <ed@FreeBSD.org>

Fix up prototypes of basename(3) and dirname(3) to comply to POSIX.

POSIX allows these functions to be implemented in a way that the
resulting string is stored in the input buffer. Though some may f

Fix up prototypes of basename(3) and dirname(3) to comply to POSIX.

POSIX allows these functions to be implemented in a way that the
resulting string is stored in the input buffer. Though some may find
this annoying, this has the advantage that it makes it possible to
implement this function in a thread-safe way. It also means that they
can be implemented in a way that they work for paths of arbitrary
length, as the output string of these functions is never longer than
max(1, len(input)).

Portable code already needs to be written with this in mind, so in my
opinion it makes very little sense to allow the existing behaviour.
Prevent the base system from falling back to this by switching over to
POSIX prototypes.

I'm not going to bump the __FreeBSD_version for this. The reason is that
it's possible to account for this change in a portable way, without
depending on a specific version of FreeBSD. An exp-run was done some
time ago. As far as I know, all regressions as a result of this have
already been fixed.

I'll give this change some time to settle. In the long run I want to
replace our copies by ones that are thread-safe and don't depend on
PATH_MAX/MAXPATHLEN.

show more ...


Revision tags: release/10.3.0
# f487a357 21-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Revert lib/libc/gen/dirname.3@r289695

This is why I use branches usually, not commit directly to head


# 6cf8c0fe 21-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Revert r289694

I committed some other undesirable local changes by accident


Revision tags: release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0
# e57c2b13 04-Dec-2008 Dag-Erling Smørgrav <des@FreeBSD.org>

integrate from head@185615


Revision tags: release/6.4.0_cvs, release/6.4.0
# 7b1fac00 03-Nov-2008 Xin LI <delphij@FreeBSD.org>

Sync with OpenBSD's dirname(3) - license change, avoid strcpy() over
string constant, use memcpy() instead of strncpy() and improve code
readibility. No functional change.


Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0
# e965ede2 12-Oct-2006 Ruslan Ermilov <ru@FreeBSD.org>

More accurately document the implementation details of internal storage.

PR: docs/82508


Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0
# 1a0a9345 03-Jul-2004 Ruslan Ermilov <ru@FreeBSD.org>

Mechanically kill hard sentence breaks.


Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0
# 57bd0fc6 27-Dec-2002 Jens Schweikhardt <schweikh@FreeBSD.org>

english(4) police.


# 5c564bae 18-Dec-2002 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: Fixed abuses of the .Ar and .Em macros.


# 95f4226b 18-Dec-2002 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: "The .Fn function".


Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs, release/4.5.0_cvs, release/4.4.0_cvs
# 32eef9ae 01-Oct-2001 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: Use the new .In macro for #include statements.


# 8dfd7bcd 10-Jul-2001 David E. O'Brien <obrien@FreeBSD.org>

MFS: add the FreeBSD history.


Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0
# 251c176f 17-Nov-2000 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: use certified section headers wherever possible.


Revision tags: release/4.1.1_cvs
# 1250db81 31-Aug-2000 Dag-Erling Smørgrav <des@FreeBSD.org>

Import XPG4-compliant basename(3) and dirname(3) from OpenBSD.
The man pages need some adjustments.

PR: 12960, 12962
Submitted by: James Howard <howardjp@wam.umd.edu>
Obtained from: OpenBSD


Revision tags: release/6.4.0_cvs, release/6.4.0
# 7b1fac00 03-Nov-2008 Xin LI <delphij@FreeBSD.org>

Sync with OpenBSD's dirname(3) - license change, avoid strcpy() over
string constant, use memcpy() instead of strncpy() and improve code
readibility. No functional change.


Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0
# e965ede2 12-Oct-2006 Ruslan Ermilov <ru@FreeBSD.org>

More accurately document the implementation details of internal storage.

PR: docs/82508


12