]> git.ipfire.org Git - thirdparty/gcc.git/commit
libiberty: add ldirname function
authorJose E. Marchesi <jose.marchesi@oracle.com>
Mon, 17 Mar 2025 11:47:40 +0000 (12:47 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 18 Mar 2025 10:19:48 +0000 (11:19 +0100)
commit31dd621796f9ff30b3df129a0e47c8d2348fa8c3
tree7e9260f65d08dc9c894258dd6e0d5187270fe178
parent7865869b44d207ce7554305ce3368e1143028cf7
libiberty: add ldirname function

This patch adds a function ldirname to libiberty.  It is implemented
in terms of lbasename.  Basically, given a given pathname, the dirname
part is what is not the basename minus the last directory separator
separating the dirname with the basename.

include/ChangeLog

* libiberty.h (ldirname): New function declaration.
(dos_ldirname): Likewise.
(unix_ldirname): Likewise.

libiberty/ChangeLog

* ldirname.c: New file.
* Makefile.in (CFILES): Add ldirname.c.
(REQUIRED_OFILES): Add ldirname.$(objext).
(./ldirname.$(objext)): New rule.
* makefile.vms (OBJS): Add ldirname.obj.
* configure.com (FILES): Add ldirname.
include/libiberty.h
libiberty/Makefile.in
libiberty/configure.com
libiberty/ldirname.c [new file with mode: 0644]
libiberty/makefile.vms