-
Notifications
You must be signed in to change notification settings - Fork 990
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QFileSystemEngine::canonicalName: don't use malloc()'ing realpath()
It is available in POSIX.1-2008 but is not worth it. The Linux man page says it only works up to PATH_MAX anyway and the POSIX documentation says it's UB if PATH_MAX isn't defined. This cleans up the source code out of these messy #if and should be faster, because we avoid a heap allocation (stack is always faster). Instead, we only relegate the heap version to the case where PATH_MAX isn't defined (i.e., GNU HURD), because in that case the realpath() function can't be used with a stack allocation. Pick-to: 6.7 Change-Id: Ie30a3caf09ef4176bb36fffd17cde1ed5c5dad59 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
- Loading branch information
1 parent
48aad48
commit e32009f
Showing
1 changed file
with
10 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters