1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/lib/libc/gen
Ed Schouten fd85bff53e 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
2016-09-18 20:47:55 +00:00
..
__getosreldate.c Avoid a redecleartion of __getosreldate(). 2016-08-24 00:02:20 +00:00
__pthread_mutex_init_calloc_cb_stub.c
__xuname.c
_once_stub.c
_pthread_stubs.c Add implementation of robust mutexes, hopefully close enough to the 2016-05-17 09:56:22 +00:00
_rand48.c
_spinlock_stub.c
_thread_init.c
alarm.3
alarm.c
arc4random.3
arc4random.c libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
assert.c
auxv.c
basename.3 Mention that basename(3) and dirname(3) will change in the future. 2016-07-29 16:25:09 +00:00
basename.c Fix up prototypes of basename(3) and dirname(3) to comply to POSIX. 2016-07-28 16:20:27 +00:00
cap_rights_get.3
cap_sandboxed.3
cap_sandboxed.c
check_utility_compat.3
check_utility_compat.c
clock_getcpuclockid.3 Grammar fixes. 2016-08-04 11:38:53 +00:00
clock_getcpuclockid.c
clock.3
clock.c
closedir.c
confstr.3
confstr.c
crypt.c
ctermid.3
ctermid.c
daemon.3
daemon.c
devname.3
devname.c libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
directory.3 directory(3): Deprecate readdir_r(). Clarify dirent buffers. 2016-08-31 20:38:40 +00:00
dirfd.c
dirname_compat.c Reimplement dirname(3) to be thread-safe. 2016-08-12 07:03:58 +00:00
dirname.3 Replace dirname(3) by a copy that complies to POSIX. 2016-09-18 20:47:55 +00:00
dirname.c Replace dirname(3) by a copy that complies to POSIX. 2016-09-18 20:47:55 +00:00
disklabel.c
dl_iterate_phdr.3
dladdr.3
dlfcn.c
dlinfo.3
dllockinit.3
dlopen.3
drand48.c
dup3.3
dup3.c
elf_utils.c If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols 2016-02-08 19:24:13 +00:00
erand48.c
err.3
err.c libc: replace 0 with NULL for pointers. 2016-04-10 19:33:58 +00:00
errlst.c
errno.c
exec.3 Add sbin and /usr/local directories to _PATH_DEFPATH. 2016-01-05 16:21:20 +00:00
exec.c libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
fdevname.c
feature_present.3
feature_present.c
fmtcheck.3
fmtcheck.c
fmtmsg.3
fmtmsg.c
fnmatch.3
fnmatch.c 1) Eliminate possibility to call __*collate_range_cmp() with inclomplete 2016-07-14 09:07:25 +00:00
fpclassify.3
fpclassify.c
frexp.3
frexp.c
fstab.c
ftok.3
ftok.c
fts-compat.c Fix 1016718 Resource leak. 2016-05-25 06:55:53 +00:00
fts-compat.h
fts.3
fts.c FTS: Remove stale reference to nfs4 fs which was removed in r192578. 2016-05-21 01:31:41 +00:00
ftw.3
ftw.c
gen-private.h
getbootfile.3
getbootfile.c
getbsize.3
getbsize.c
getcap.3
getcap.c
getcontext.3
getcwd.3
getcwd.c
getdiskbyname.3
getdomainname.3
getdomainname.c
getfsent.3
getgrent.3 Fix up setgrent(3) to have a POSIX-compliant prototype. 2016-07-31 08:05:15 +00:00
getgrent.c Fix up setgrent(3) to have a POSIX-compliant prototype. 2016-07-31 08:05:15 +00:00
getgrouplist.3
getgrouplist.c
gethostname.3
gethostname.c
getloadavg.3
getloadavg.c
getlogin.c
getmntinfo.3
getmntinfo.c libc: replace 0 with NULL for pointers. 2016-04-10 19:33:58 +00:00
getnetgrent.3 Implement an NSS backend for netgroups and add getnetgrent_r(3). 2016-06-09 01:28:44 +00:00
getnetgrent.c Implement an NSS backend for netgroups and add getnetgrent_r(3). 2016-06-09 01:28:44 +00:00
getosreldate.3
getosreldate.c
getpagesize.3
getpagesize.c Remove trailing whitespace and use nitems(mib) instead of 2 when 2016-04-19 22:59:21 +00:00
getpagesizes.3
getpagesizes.c
getpass.3
getpeereid.3
getpeereid.c libc: Use namespace.h in a few more files. 2015-12-20 23:05:20 +00:00
getprogname.3
getprogname.c
getpwent.3
getpwent.c libc: make some more use of the nitems() macro. 2016-04-16 17:52:00 +00:00
getttyent.3
getttyent.c
getusershell.3
getusershell.c
getutxent.3
getutxent.c
getvfsbyname.3 getvfsbyname(3): Remove [EFAULT] error. 2016-08-30 21:43:57 +00:00
getvfsbyname.c
glob.3 Both C99 and POSIX directly prohibits any standard function to set errno 2016-07-31 01:14:06 +00:00
glob.c Although the code amount is not big, move POSIX error processing into 2016-08-03 09:09:34 +00:00
initgroups.3
initgroups.c
isatty.c
isgreater.3
isinf.c
isnan.c
jrand48.c
lcong48.c
ldexp.3
ldexp.c
libc_dlopen.c
lockf.3
lockf.c Fix lockf(3) cancellation behaviour. 2015-12-20 11:55:39 +00:00
lrand48.c
makecontext.3
Makefile.inc Reimplement dirname(3) to be thread-safe. 2016-08-12 07:03:58 +00:00
modf.3
modf.c
mrand48.c
nftw.c
nice.3
nice.c
nlist.3
nlist.c libc: make some more use of the nitems() macro. 2016-04-16 17:52:00 +00:00
nrand48.c
opendir.c libc: replace 0 with NULL for pointers. 2016-04-10 19:33:58 +00:00
pause.3
pause.c
pmadvise.c
popen.3
popen.c popen() requires check for fdopen() failure 2015-11-20 22:36:41 +00:00
posix_spawn_file_actions_addopen.3
posix_spawn_file_actions_init.3
posix_spawn.3 Add sbin and /usr/local directories to _PATH_DEFPATH. 2016-01-05 16:21:20 +00:00
posix_spawn.c Fix Coverity CID 1016714 Resource leak in process_file_actions_entry() 2016-05-25 07:13:53 +00:00
posix_spawnattr_getflags.3
posix_spawnattr_getpgroup.3
posix_spawnattr_getschedparam.3
posix_spawnattr_getschedpolicy.3
posix_spawnattr_getsigdefault.3
posix_spawnattr_getsigmask.3
posix_spawnattr_init.3
psignal.3 Fix the signature of the psignal() function. 2016-05-30 13:51:27 +00:00
psignal.c Fix the signature of the psignal() function. 2016-05-30 13:51:27 +00:00
pututxline.c
pw_scan.c
pw_scan.h
raise.3
raise.c
rand48.3
rand48.h
readdir.c
readpassphrase.3
readpassphrase.c Fix bug in the readpassphrase(3) function, which can be exposed 2016-01-24 22:20:13 +00:00
recvmmsg.c Add implementations of sendmmsg(3) and recvmmsg(3) functions which 2016-01-29 14:12:12 +00:00
rewinddir.c
rfork_thread.3
scandir_b.c
scandir.3
scandir.c
seed48.c
seekdir.c
sem_destroy.3
sem_getvalue.3
sem_init.3
sem_new.c sem: Don't free nameinfo that is still in list when open() fails. 2016-01-22 14:52:31 +00:00
sem_open.3
sem_post.3
sem_timedwait.3 - Add the 'restrict' type qualifier to match function prototype. 2016-08-17 07:25:50 +00:00
sem_wait.3
sem.c
semctl.c Disable support for compat syscalls on arm64. These symbols were never 2016-04-06 16:09:10 +00:00
sendmmsg.c Add implementations of sendmmsg(3) and recvmmsg(3) functions which 2016-01-29 14:12:12 +00:00
setdomainname.c
sethostname.c
setjmp.3
setjmperr.c
setmode.3
setmode.c
setproctitle.3
setproctitle.c libc: do not include <sys/types.h> where <sys/param.h> was already included 2016-04-18 21:05:15 +00:00
setprogname.c
siginterrupt.3
siginterrupt.c
siglist.c Initialize lists of signals using C99 designators 2016-09-02 00:16:19 +00:00
signal.3
signal.c
sigsetops.3
sigsetops.c
sleep.3
sleep.c
srand48.c
statvfs.3
statvfs.c
stringlist.3
stringlist.c
strtofflags.3
strtofflags.c
Symbol.map Reimplement dirname(3) to be thread-safe. 2016-08-12 07:03:58 +00:00
sysconf.3
sysconf.c libc: Use namespace.h in a few more files. 2015-12-20 23:05:20 +00:00
sysctl.3
sysctl.c
sysctlbyname.c
sysctlnametomib.c
syslog.3
syslog.c
tcgetpgrp.3
tcgetsid.3
tcsendbreak.3
tcsetattr.3
tcsetpgrp.3
tcsetsid.3
telldir.c
telldir.h
termios.c
time.3
time.c
times.3
times.c
timezone.3
timezone.c
tls.c Re-use our roundup2() macro instead of reinventing the wheel. 2016-04-18 16:25:37 +00:00
trivial-getcontextx.c
ttyname.3
ttyname.c
ttyslot.c
tzset.3
ualarm.3
ualarm.c
ucontext.3
ulimit.3
ulimit.c
uname.3
uname.c
unvis-compat.c
usleep.3
usleep.c
utime.3 utimes(2),utime(3): Add deprecation in favour of utimensat(2) and futimens(2). 2016-06-09 22:14:58 +00:00
utime.c
utxdb.c
utxdb.h
valloc.3
valloc.c
wait3.c
wait.c
waitid.c
waitpid.c
wordexp.3
wordexp.c